Authorizing a Payment with a Customer Token
This section provides the information you need to authorize 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 Production in India:
POST
https://api.in.cybersource.com
/pts/v2/payments
Required Fields for Authorizing a Payment with a Customer Token
-
paymentInformation.customer.id
-
Set to the ID of the customer token you want to use.
Related Information
REST Example: Authorizing a Payment with a Customer Token
Request
{ "clientReferenceInformation": { "code": "12345678" }, "paymentInformation": { "customer": { "id": "F45FB3E443AC3C57E053A2598D0A9CFF" } }, "orderInformation": { "amountDetails": { "currency": "USD", "totalAmount": "10.00" } } }
Response to a Successful Request
The request response returns the payment instrument and shipping address IDs that are used as the customer's defaults.
{ "_links": { "authReversal": { "method": "POST", "href": "/pts/v2/payments/7055928871556818104953/reversals" }, "self": { "method": "GET", "href": "/pts/v2/payments/7055928871556818104953" }, "capture": { "method": "POST", "href": "/pts/v2/payments/7055928871556818104953/captures" } }, "clientReferenceInformation": { "code": "12345678" }, "id": "7055928871556818104953", "orderInformation": { "amountDetails": { "authorizedAmount": "10.00", "currency": "USD" } }, "paymentAccountInformation": { "card": { "type": "001" } }, "paymentInformation": { "tokenizedCard": { "type": "001" }, "instrumentIdentifier": { "id": "7010000000016241111", "state": "ACTIVE" }, "shippingAddress": { "id": "0F35F0D99AD088B5E063A2598D0AE066" }, "paymentInstrument": { "id": "0F35E9CFEA463E34E063A2598D0A3FC2" }, "card": { "type": "001" }, "customer": { "id": "B21E6717A6F03479E05341588E0A303F" } }, "pointOfSaleInformation": { "terminalId": "111111" }, "processorInformation": { "approvalCode": "888888", "networkTransactionId": "123456789619999", "transactionId": "123456789619999", "responseCode": "100", "avs": { "code": "X", "codeRaw": "I1" } }, "reconciliationId": "67467352CRIISD1G", "status": "AUTHORIZED", "submitTimeUtc": "2024-01-18T15:48:07Z" }
REST Example: Authorizing a Payment Using a Customer Token Linked to a Network Token
Request
{ "clientReferenceInformation": { "code": "12345678" }, "paymentInformation": { "customer": { "id": "F60328413BAB09A4E053AF598E0A33DB" } }, "orderInformation": { "amountDetails": { "totalAmount": "102.21", "currency": "USD" } } }
Response to a Successful Request
The request response returns the payment instrument and shipping address IDs that are used as the customer's defaults.
{ "_links": { "authReversal": { "method": "POST", "href": "/pts/v2/payments/6778647071126384904953/reversals" }, "self": { "method": "GET", "href": "/pts/v2/payments/6778647071126384904953" }, "capture": { "method": "POST", "href": "/pts/v2/payments/6778647071126384904953/captures" } }, "clientReferenceInformation": { "code": "TC50171_3" }, "id": "6778647071126384904953", "issuerInformation": { "responseRaw": "0110322000000E100002000....." }, "orderInformation": { "amountDetails": { "authorizedAmount": "102.21", "currency": "USD" } }, "paymentAccountInformation": { "card": { "type": "002" } }, "paymentInformation": { "tokenizedCard": { "type": "002" }, "instrumentIdentifier": { "id": "7020000000010603216", "state": "ACTIVE" }, "shippingAddress": { "id": "F60328413BAE09A4E053AF598E0A33DB" }, "paymentInstrument": { "id": "F6032841BE33098EE053AF598E0AB0A5" }, "card": { "type": "002" }, "customer": { "id": "F60328413BAB09A4E053AF598E0A33DB" } }, "pointOfSaleInformation": { "terminalId": "08244117" }, "processingInformation": { "paymentSolution": "014" }, "processorInformation": { "paymentAccountReferenceNumber": "50015OU4U5UYXLV127XTONYN49CL1", "merchantNumber": "000844028303882", "approvalCode": "831000", "networkTransactionId": "0602MCC603474", "transactionId": "0602MCC603474", "responseCode": "00", "avs": { "code": "Y", "codeRaw": "Y" } }, "reconciliationId": "EUHW1EMHIZ3O", "status": "AUTHORIZED", "submitTimeUtc": "2023-03-03T17:31:48Z" }