FILTER BY TAG

Process a Sale

Send a sale request to authorize and capture a payment in the same request. A successful sale response includes a redirect URL and a pending status. Redirect the customer to the URL to allow the customer to complete the checkout using GrabPay. When the customer completes the checkout, the customer is redirected to the merchant website using the success-URL provided in the sale request.

Line Items

Line items are included in a request in the
lineItem[]
array.
For more information about how to properly format line items in your request, see Using Line Items.

Tax Amounts

You can include the tax amount for every type of purchased product in the
orderInformation.lineItems[].taxAmount
field when you request the sale service.

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/payments
Test:
POST
https://apitest.cybersource.com
/pts/v2/payments

Response Statuses

Cybersource
responds to your sale request with one of these statuses in the
status
field:
Sale Status
  • FAILED
    : The sale cannot be completed.
  • PENDING
    : The sale request is accepted but is not completed. Request the check status service every 60 minutes to retrieve status updates. See Check a Request Status.
When you send a check status request to retrieve an updated sale status, these are the possible responses:
Check Status for a Sale
  • ABANDONED
    : The customer did not complete the payment using the redirect URL.
  • FAILED
    : The sale cannot be completed.
  • FUNDED
    : The settled amount is funded to the merchant bank account.
  • PENDING
    : The sale request is accepted but is not complete. Continue sending the check status request every 60 minutes.
  • SETTLED
    : The sale request is settled for the requested amount. You cannot receive a settled status until the customer has completed checking out.

Processing a Sale

Follow these steps to successfully process sale.
  1. Send a
    POST
    request to the
    https://api.cybersource.com
    /pts/v2/payments
    endpoint and include these required fields:
    billTo.country
    clientReferenceInformation.code
    merchantInformation.cancelUrl
    merchantInformation.failureUrl
    merchantInformation.successUrl
    orderInformation.amountDetails.currency
    orderInformation.amountDetails.totalAmount
    orderInformation.billTo.address1
    orderInformation.billTo.administrativeArea
    orderInformation.billTo.country
    orderInformation.billTo.email
    orderInformation.billTo.firstName
    orderInformation.billTo.lastName
    orderInformation.billTo.locality
    orderInformation.billTo.phoneNumber
    orderInformation.billTo.postalCode
    orderInformation.lineItems.productCode
    orderInformation.lineItems.productName
    orderInformation.lineItems.productSKU
    orderInformation.lineItems.quantity
    orderInformation.lineItems.totalAmount
    orderInformation.lineItems.unitPrice
    orderInformation.shipTo.address1
    orderInformation.shipTo.country
    orderInformation.shipTo.email
    orderInformation.shipTo.firstName
    orderInformation.shipTo.lastName
    orderInformation.shipTo.locality
    orderInformation.shipTo.phoneNumber
    paymentInformation.paymentType.method.name
    Set to GRABPAY.
    paymentInformation.paymentType.name
    processingInformation.actionList
  2. You can include these optional fields in the request:
  3. Redirect the customer to the returned URL in the
    merchantInformation.successUrl
    response field.
    "successUrl": "
    https://www.valid.merchant.redirect.url.from.request.html?actionsuccess
    "
  4. When the customer completes the checkout using their GrabPay credentials, the customer is redirected to the merchant website based on the URL that you included in the
    merchantInformation.successUrl
    field.
  5. Save the request ID in the
    id
    field from the sale response. Include the request ID in a check status request to confirm that the payment is complete.
    "id": "
    7551853376466526104891
    "

Example: Processing a Sale

Request
{ "clientReferenceInformation": { "code": "123" }, "merchantInformation": { "cancelUrl": "https://www.valid.merchant.redirect.url.from.request.html?actioncancel", "failureUrl": "https://www.valid.merchant.redirect.url.from.request.html?actionfailure", "successUrl": "https://www.valid.merchant.redirect.url.from.request.html?actionsuccess" }, "paymentInformation": { "paymentType": { "method": { "name": "GRABPAY" }, "name": "eWallet" } }, "billTo": { "country": "MY" }, "orderInformation": { "billTo": { "firstName": "John", "lastName": "Doe", "address1": "1 Market St", "locality": "Paris", "administrativeArea": "AR", "postalCode": "75001", "country": "PT", "email": "nredhi@visa.com", "phoneNumber": "33623456789" }, "shipTo": { "firstName": "John", "lastName": "Doe", "address1": "1 Market St", "locality": "Paris", "country": "MY", "email": "nredhi@visa.com", "phoneNumber": "33623456789" }, "amountDetails": { "totalAmount": "600.00", "currency": "MYR" }, "lineItems": [ { "unitPrice": "100.00", "quantity": "6", "productSKU": "testI", "productName": "TV", "productCode": "4564", "totalAmount": "600.00" } ] }, "processingInformation": { "actionList": [ "AP_SALE" ] } }
Response to a Successful Request
{ "_links": { "void": { "method": "POST", "href": "/pts/v2/payments/7551853376466526104891/voids" }, "billingAgreement": { "method": "POST", "href": "/pts/v2/billing-agreements/7551853376466526104891" }, "self": { "method": "POST", "href": "/pts/v2/payments/7551853376466526104891" }, "refund": { "method": "POST", "href": "/pts/v2/payments/7551853376466526104891/refunds" }, "status": { "method": "POST", "href": "/pts/v2/refresh-payment-status/7551853376466526104891" } }, "clientReferenceInformation": { "code": "123" }, "id": "7551853376466526104891", "message": "Request was processed successfully.", "orderInformation": { "amountDetails": { "totalAmount": "600.00", "currency": "MYR" } }, "processorInformation": { "responseDetails": "00001", "paymentUrl": "https://payment.limonetik.com/Razer/Order/PayPage/755025063216", "transactionId": "755025063216", "responseCode": "00001" }, "reconciliationId": "XETXPDYE7WDK", "status": "PENDING", "submitTimeUtc": "2025-08-14T15:28:58Z" }