On This Page
Authorize a Payment
You must request an authorization to secure funds for a payment. Include the request ID
that you received in the create order response in the
processingInformation.intentsId
request field to link the authorization to
the created order.Successfully authorized funds expire after 29 days. If the funds are not captured within
3 days of the authorization, you must request Re-authorization to maintain the honor
period. The
honor period
is a 3-day period in which PayPal accepts the capture
request that a merchant submits. If the 3-day honor period expires because you did not
send a re-authorization request, PayPal contacts the card's issuer to re-authorize the
payment. For more information, see Re-authorize a PayPal Payment.The
PENDING
status and a request ID in the id
response field indicate a
successful request. Save the request ID for follow-on requests.Endpoints
Production:
POST
https://api.cybersource.com
/pts/v2/payments/Test:
POST
https://apitest.cybersource.com
/pts/v2/payments/Required Fields for Authorizing a Payment
- agreementInformation.id
- Set to one of these values:
- payPal: the PayPal payment method.
- venmo: the Venmo payment method.
- Set toeWallet.
- Set toAP_AUTH.
- processingInformation.intentsId
- Set to the request ID in the create order responseidfield.
Example: Authorizing a Payment
Request
{ "agreementInformation": { "id": "agreementId-1" }, "paymentInformation": { "paymentType": { "method": { "name": "payPal" }, "name": "eWallet" } }, "processingInformation": { "actionList": [ "AP_AUTH" ], "intentsId": "7261369946776012601991" } }
Response to a Successful Request
{ "submitTimeUtc": "2024-09-12T10:29:56Z", "processorInformation": { "sellerProtection": { "eligibility": "ELIGIBLE", "disputeCategories": [ "ITEM_NOT_RECEIVED", "UNAUTHORIZED_TRANSACTION" ] }, "transactionId": "4AA39743A21277452", "orderStatus": "COMPLETED", "orderId": "7LT08604AM018373M", "updateTimeUtc": "2024-09-12T10:31:10Z", "expirationTimeUtc": "2024-10-11T10:31:10Z" }, "orderInformation": { "amountDetails": { "totalAmount": "28.60", "currency": "USD" }, "billTo": { "email": "jsmith@cybs.com", "lastName": "Smith", "firstName": "John" } }, "updateTimeUtc": "2024-09-12T10:31:10Z", "buyerInformation": { "merchantCustomerId": "FDYJEFZ6G5YPG" }, "message": "Successful", "createTimeUtc": "2024-09-12T10:31:10Z", "clientReferenceInformation": { "code": "default" }, "reconciliationId": "7261369946776012601991", "status": "COMPLETED", "id": "7261370686446012701991" }
Response Statuses for Authorizing a Payment
Cybersource
responds to your request with one of these statuses in
the status
response field:- INVALID_REQUEST: The authorization request was not successful. Send a new authorization request.
- PENDING: The authorization request was successful, and PayPal is reviewing the request. Use the check status request as often as necessary until the status updates.
When you request a status update,
Cybersource
responds with one of
these statuses in the status
response field:- COMPLETED: The authorized funds were successfully captured.
- PENDING: The authorization request was successful, and PayPal is reviewing the request. Continue to send periodic check status requests until the status updates.
- REVERSED: The authorized funds were released back to the customer and cannot be captured.
Follow-On Requests
After the payment is authorized, you can send these follow-on requests using the
request ID from the authorization response message.
- Authorization Reversal
- To cancel the hold on the authorized funds, you must send an authorization reversal request. For more information, see Reverse an Authorization.
- Re-authorization
- To update information in the authorization, such as the payment amount, you must send a re-authorization request. For more information, see Re-authorize a PayPal Payment.
- Capture
- To capture the authorized funds and complete the payment, you must send a capture request. For more information, see Capture a Payment.
- Check Status
- To know when the authorization status updates, you must periodically send a check status request. For more information, see Check Status for a Transaction.