Menu

REST Example: Authorizing a Payment with a Customer Token

Endpoint:
  • Production:
    POST
    https://api.cybersource.com
    /pts/v2/payments
  • Test:
    POST
    https://apitest.cybersource.com
    /pts/v2/payments
Request
{ "clientReferenceInformation": { "code": "RTS-Auth" }, "paymentInformation": { "customer": { "id": "F45FB3E443AC3C57E053A2598D0A9CFF" } }, "orderInformation": { "amountDetails": { "currency": "USD", "totalAmount": "1.00" } }, "processingInformation": { "capture": "false", "commerceIndicator": "internet" } }
Response for a Successful Request
The request response informs the IDs of the payment instrument and shipping address used as the customer's defaults.
{ "_links": { "authReversal": { "method": "POST", "href": "/pts/v2/payments/6760630538166130603955/reversals" }, "self": { "method": "GET", "href": "/pts/v2/payments/6760630538166130603955" }, "capture": { "method": "POST", "href": "/pts/v2/payments/6760630538166130603955/captures" } }, "clientReferenceInformation": { "code": "RTS-Auth" }, "id": "6760630538166130603955", "orderInformation": { "amountDetails": { "authorizedAmount": "1.00", "currency": "USD" } }, "paymentAccountInformation": { "card": { "type": "001" } }, "paymentInformation": { "tokenizedCard": { "type": "001" }, "instrumentIdentifier": { "id": "7030000000014911515", "state": "ACTIVE" }, "shippingAddress": { "id": "F45FB3E443AF3C57E053A2598D0A9CFF" }, "paymentInstrument": { "id": "F45FC6785E3C31A2E053A2598D0A5346" }, "card": { "type": "001" }, "customer": { "id": "F45FB3E443AC3C57E053A2598D0A9CFF" } }, "pointOfSaleInformation": { "terminalId": "111111" }, "processorInformation": { "paymentAccountReferenceNumber": "V0010013019326121174070050420", "approvalCode": "888888", "networkTransactionId": "123456789619999", "transactionId": "123456789619999", "responseCode": "100", "avs": { "code": "X", "codeRaw": "I1" } }, "reconciliationId": "69816021FDTK35GW", "status": "AUTHORIZED", "submitTimeUtc": "2023-02-10T21:04:14Z" }
Back to top