This section provides the minimal set of information required to perform a successful authorization and create TMS tokens (customer, payment isntrument, and shipping address) with a transient token.

Endpoint

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

Required Fields for an Authorization and Creating TMS Tokens with a Transient Token

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.postalCode
orderInformation.shipTo.address1
orderInformation.shipTo.administrativeArea
orderInformation.shipTo.country
orderInformation.shipTo.firstName
orderInformation.shipTo.lastName
orderInformation.shipTo.locality
orderInformation.shipTo.postalCode
processingInformation.actionList
Set this field to
TOKEN_CREATE
.
processingInformation.actionTokenTypes.customer
processingInformation.actionTokenTypes.paymentInstrument
processingInformation.actionTokenTypes.shippingAddress
tokenInformation.transientTokenJwt

REST Interactive Example: Authorization and Creating TMS Tokens with a Transient Token

Process a Payment

POST

Overview

A payment authorizes the amount for the transaction. There are a number of supported payment features, such as E-commerce and Card Present - Credit Card/Debit Card, Echeck, e-Wallets, Level II/III Data, etc..

A payment response includes the status of the request. It also includes processor-specific information when the request is successful and errors if unsuccessful. See the Payments Developer Guides Page.

Authorization can be requested with Capture, Decision Manager, Payer Authentication(3ds), and Token Creation.

Required fields are denoted with an *. Objects with ^ are optional, however if provided, they have required fields under them - marked with an *
  • Request Builder

clientReferenceInformation
code
reconciliationId
pausedRequestId
transactionId
comments
partner
originalTransactionId
developerId
solutionId
thirdPartyCertificationNumber
applicationName
applicationVersion
applicationUser
processingInformation
actionList
enableEscrowOption
actionTokenTypes
binSource
capture
These changes are reflected in the live console.
URL
https://apitest.cybersource.com/pts/v2/payments
Authentication

There are two forms of authentication available: JSON Web Token (JWT) and HTTP Signature. JWT requires signing a P12 Certificate while HTTP Signature is a hash-based method which uses a shared secret key. Authorization Headers are generated based on payload for each request. To learn more about authentication headers click here

For your convenience, you can quickly configure this API Console to send all sample requests with either method, using your own sandbox credentials or the default API Console credentials.

Sandbox Credentials

You are using default sandbox account of smartpay processor. Enter new credentials here to change the account. Don't have keys? Read our guide to learn more about the keys. Required fields are denoted with an *.

Request: Live Console

  • POST:https://apitest.cybersource.com/pts/v2/payments
  • Sample Request:Payment with Flex Token(Create Permanent TMS token)
  • Payment Processor Type:Chase Paymentech (Default)

  • Body

Response

  • Descriptions


Successful response.



Invalid request.



Unexpected system error or system timeout.


REST Example: Authorization and Creating TMS Tokens with a Transient Token

Endpoint:
POST
https://api.cybersource.com
/pts/v2/payments
{ "clientReferenceInformation": { "code": "TC50171_3" }, "processingInformation": { "actionList": [ "TOKEN_CREATE" ], "actionTokenTypes": [ "customer", "paymentInstrument", "shippingAddress" ] }, "orderInformation": { "amountDetails": { "totalAmount": "102.21", "currency": "USD" }, "billTo": { "firstName": "John", "lastName": "Doe", "address1": "1 Market St", "locality": "san francisco", "administrativeArea": "CA", "postalCode": "94105", "country": "US", "email": "
test@cybs.com
", "phoneNumber": "4158880000" }, "shipTo": { "firstName": "John", "lastName": "Doe", "address1": "1 Market St", "locality": "san francisco", "administrativeArea": "CA", "postalCode": "94105", "country": "US" } }, "tokenInformation": { "transientTokenJwt": "eyJraWQiOiIwMFN2SWFHSWZ5YXc4OTdyRGVHOWVGZE9ES2FDS2MxcSIsImFsZyI6IlJTMjU2In0.eyJpc3MiOiJGbGV4LzAwIiwiZXhwIjoxNjE0NzkyNTQ0LCJ0eXBlIjoiYXBpLTAuMS4wIiwiaWF0IjoxNjE0NzkxNjQ0LCJqdGkiOiIxRDBWMzFQMUtMRTNXN1NWSkJZVE04VUcxWE0yS0lPRUhJVldBSURPkhLNjJJSFQxUVE1NjAzRkM3NjA2MDlDIn0.FrN1ytYcpQkn8TtafyFZnJ3dV3uu1XecDJ4TRIVZN-jpNbamcluAKVZ1zfdhbkrB6aNVWECSvjZrbEhDKCkHCG8IjChzl7Kg642RWteLkWz3oiofgQqFfzTuq41sDhlIqB-UatveU_2ukPxLYl87EX9ytpx4zCJVmj6zGqdNP3q35Q5y59cuLQYxhRLk7WVx9BUgW85tl2OHaajEc25tS1FwH3jDOfjAC8mu2MEk-Ew0-ukZ70Ce7Zaq4cibg_UTRx7_S2c4IUmRFS3wikS1Vm5bpvcKLr9k_8b9YnddIzp0p0JOCjXC_nuofQT7_x_-CQayx2czE0kD53HeNYC5hQ" } }
Successful Response
{ "_links": { "authReversal": { "method": "POST", "href": "/pts/v2/payments/6826220442936119603954/reversals" }, "self": { "method": "GET", "href": "/pts/v2/payments/6826220442936119603954" }, "capture": { "method": "POST", "href": "/pts/v2/payments/6826220442936119603954/captures" } }, "clientReferenceInformation": { "code": "TC50171_3" }, "id": "6826220442936119603954", "orderInformation": { "amountDetails": { "authorizedAmount": "102.21", "currency": "USD" } }, "paymentAccountInformation": { "card": { "type": "001" } }, "paymentInformation": { "tokenizedCard": { "type": "001" }, "card": { "type": "001" } }, "pointOfSaleInformation": { "terminalId": "111111" }, "processorInformation": { "approvalCode": "888888", "networkTransactionId": "123456789619999", "transactionId": "123456789619999", "responseCode": "100", "avs": { "code": "X", "codeRaw": "I1" } }, "reconciliationId": "68449782YGMSJXND", "status": "AUTHORIZED", "submitTimeUtc": "2023-04-27T19:00:44Z", "tokenInformation": { "instrumentidentifierNew": false, "instrumentIdentifier": { "state": "ACTIVE", "id": "7010000000016241111" }, "shippingAddress": { "id": "FA56F3248492C901E053A2598D0A99E3" }, "paymentInstrument": { "id": "FA56E8725B06A553E053A2598D0A2105" }, "customer": { "id": "FA56DA959B6AC8FBE053A2598D0AD183" } } }