FILTER BY TAG

Process a Sale

You can process a payment by requesting a sale, which authorizes and captures funds for a payment in the same request. Include the request ID that you received in the create order response in the
processingInformation.intentsId
request field to link the sale to the created order.
A
PENDING
status in the response indicates that the request is successful. After sending a sale request, send a follow-on check status request periodically. The payment is complete when you receive a response with a
COMPLETED
status. For more information about sending a check status request, see Check Status for a Transaction.

Endpoints

Production:
POST
https://api.cybersource.com
/pts/v2/payments
Test:
POST
https://apitest.cybersource.com
/pts/v2/payments

Required Fields for Processing a Sale

agreementInformation.id
Set to one of these values:
  • payPal
    : the PayPal payment method.
  • venmo
    : the Venmo payment method.
Set to
payPal
.
Set to
AP_SALE
.
processingInformation.intentsId
Set to the request ID in the create order response
id
field.

Example: Processing a Sale

Request
{ "agreementInformation":{ "id":"BillingAgreement1" }, "paymentInformation": { "paymentType": { "method": { "name": "payPal" }, "name": "eWallet" } }, "processingInformation": { "actionList": [ "AP_SALE" ], "intentsId": "7266411151136307001991" } }
Response to a Successful Request
{ "submitTimeUtc": "2024-09-18T06:35:32Z", "processorInformation": { "sellerProtection": { "eligibility": "ELIGIBLE" }, "transactionId": "58N37188U0725624T", "orderStatus": "COMPLETED", "orderId": "4P210796DA793354A", "updateTimeUtc": "2024-09-18T06:35:32Z" }, "orderInformation": { "amountDetails": { "totalAmount": "65.00", "currency": "USD" }, "billTo": { "email": "[email protected]", "lastName": "Smith", "firstName": "John" } }, "buyerInformation": { "merchantCustomerId": "FDYJEFZ6G5YPG" }, "message": "Successful", "processingInformation": { "captureOptions": { "finalCapture": "true" } }, "clientReferenceInformation": { "code": "default" }, "reconciliationId": "7266411151136307001991", "status": "COMPLETED", "id": "7266413310926307101991" }

Response Statuses for Processing a Sale

Cybersource
responds to your request with one of these statuses in the
status
response field:
  • INVALID_REQUEST
    : The sale request is not successful. Send a new sale request.
  • PENDING
    : The sale request is successful and is being reviewed by PayPal. 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
field:
  • COMPLETED
    : The sale successfully processed, and the payment is complete.
  • DECLINED
    : The sale request is declined. Send a new sale request.
  • PENDING
    : The sale request is successful and is being reviewed by PayPal. Continue to send the check status request until the status updates. For more information, see Check Status for a Transaction.