On This Page
Process a Sale
This section describes how to send a sale request to process a payment.
A sale request authorizes and captures a payment in the same request. A successful sale
response includes a redirect URL and a
PENDING
status. Redirect the
customer to the PayTo URL to allow the customer to complete the checkout using their
bank information. When the customer completes the checkout, the customer is redirected
to your website.When you receive a successful response, save the sale request ID in the
id
response field to perform a follow-on check status
request or refund request.Calculating the Grand Total
Include the grand total in the request by using the
orderInformation.amountDetails.totalAmount
field. Endpoints
Production:
POST
https://api.cybersource.com
/pts/v2/paymentsTest:
POST
https://apitest.cybersource.com
/pts/v2/paymentsProcessing a Sale
Processing a sale requires you to use information from the API
response message to redirect the customer to a website where the customer can complete
the checkout. Follow these steps to process a sale.
- Send a POST request to theendpoint and include these required fields:https://api.cybersource.com/pts/v2/payments
ADDITIONAL INFORMATION
- Set to an 18-character value or less.
- Set toAUD.
- orderInformation.invoiceDetails.productDescription
- Set topayToPayByBank.
- Set tobankTransfer.
- Set toAP_SALE.
- If needed, include any of these optional line item fields in the request:
ADDITIONAL INFORMATION
- Redirect the customer to the URL in theprocessorInformation.paymentUrlresponse field."paymentUrl": "https://checkout.banked.com/au/3645bd90-7625-4202-8cc3-a1cb58358899?token=eyJhbGciOiJI"
- Save the request ID in theidfield from the sale response. Include the request ID in a check status request to confirm that the payment is complete."id": "7544094135706957804805"
AFTER COMPLETING THE TASK
When the sale amount is successfully processed,
Cybersource
sends a
SETTLED
webhook notification. See Introduction to Webhooks. If you do not receive a webhook
notification, send a check status request. See Check a Status. Example: Processing a Sale
Request
{ "clientReferenceInformation": { "code": "TC84100-1" }, "processingInformation": { "actionList": [ "AP_SALE" ] }, "orderInformation": { "invoiceDetails": { "productDescription": "test description" }, "amountDetails": { "totalAmount": "1999.99", "currency": "AUD" } }, "paymentInformation": { "paymentType": { "name": "bankTransfer", "method": { "name": "payToPayByBank" } } } }
Response to a Successful Request
{ "orderInformation": { "amountDetails": { "totalAmount": "1999.99", "currency": "AUD" } }, "processorInformation": { "transactionId": "3645bd90-7625-4202-8cc3-a1cb58358899", "paymentUrl": "https://checkout.banked.com/au/3645bd90-7625-4202-8cc3-a1cb58358899?token=eyJhbGciOiJI", "responseCode": "00001", "completeUrl": "merchant_success_url.com" }, "message": "Request was processed successfully.", "clientReferenceInformation": { "code": "TC84100-1" }, "reconciliationId": "KOZX0DMQKX0A", "status": "PENDING", "id": "7544094135706957804805", "submitTimeUtc": "2025-08-05T15:56:53Z" }