On This Page
Authorizations with a Transient Token
This section provides the information required in order to perform a successful authorization
with a
Unified Checkout
transient token. You can use this method to construct
more complex payment scenarios that are not supported by the
unifiedPayment.complete()
payment method.IMPORTANT
When you process payments through
Unified Checkout
using
unifiedPayments.complete()
, Unified Checkout
invokes
service orchestration directly. When you send an authorization request using a transient
token, you must request the follow-on services that you want to use. For information about
the required fields for the payment services that you request, see the Payments Developer Guide.The transient token is a short-term token that expires after 15 minutes. Doing so eliminates
the need to send sensitive payment data along with the request. For more information on
transient tokens, see Transient Tokens.
To send the transient token with a request, use the
tokenInformation.transientTokenJwt
field. This example shows a transient token in the context of an authorization
request:
"tokenInformation": { "transientTokenJwt": "eyJraWQiOiIwOG4zUnVsRTJGQXJDRktycVRkZFlkWGZSWFhMNXFoNSIsImFsZyI6IlJTMjU2In0.eyJpc3MiOiJGbGV4LzA3IiwiZXhwIjoxNTk3MDg0ODk3LCJ0eXBlIjoiZ2RhLTAuMS4xIiwiaWF0IjoxNTk3MDgzOTk3LCJqdGkiOiIxQzI2VlpSkVJUU1PTzVIMDUwNEtINDdJMEFNMklaRkM0M1Y1TDU0MUhCTE45Q09JM0w3NUYzMTk0RTE5NkExIn0.SNm1VZaZr3DkTqUg9CdV0F5arRe-uQU9oUWPKfWIpbIzIPZutRokv5DSDcM7asZIKNJyNIBx5DLsl_yQPrKgzhwQxZ8qbhto7cu3t-v8DHG2yO951plPQVQnj7x-vEDcXkLUL1F8sqY23R5HW-xSDAQ3AFLawCckn7Q2eudRGeuMhLWH742Gflf9Hz3KyKnmeNKA3o9yW2na16nmeVZaYGqbUSPVITdl5cMA0o9lEob8E3OQH0HHdmIsu5uMA4x7DeBjfTKD1rQxFP3JBNVcv30AIMLkNcw0pHbtHDVzKBWxUVxvnm3zFEdiBuSAco2uWhC9zFqHrrp64ZvzxZqoGA" }
To retrieve non-sensitive data from a
Unified Checkout
transient token, use the payment-details
endpoint. This data includes cardholder name and billing and shipping details. For more information, see Payment Details API.IMPORTANT
Fields supplied directly in an API request supersede those that are also present in the transient token. For example, in the request below, the total amount might have been overridden because of a tax calculation.
Endpoint
Production:
POST
https://api.cybersource.com
/pts/v2/paymentsTest:
POST
https://apitest.cybersource.com
/pts/v2/paymentsProduction in Saudi
Arabia:
POST
https://api.sa.cybersource.com
/up/v1/capture-contextsTest in Saudi
Arabia:
POST
https://apitest.sa.cybersource.com
/up/v1/capture-contextsRequired Field for an Authorization with a Transient Token
REST Example: Requesting an Authorization with a Transient Token
{ "clientReferenceInformation": { "code": "TC50171_3" }, "processingInformation": { "commerceIndicator": "internet" }, "tokenInformation": { "transientTokenJwt": "eyJraWQiOiIwOG4zUnVsRTJGQXJDRktycVRkZFlkWGZSWFhMNXFoNSIsImFs ZyI6IlJTMjU2In0.eyJpc3MiOiJGbGV4LzA3IiwiZXhwIjoxNTk3MDg0ODk3LCJ0eXBlIjoiZ2RhLTAuMS4xIi wiaWF0IjoxNTk3MDgzOTk3LCJqdGkiOiIxQzI2VlpSRkVJUU1PTzVIMDUwNEtINDdJMEFNMklaRkM0M1Y1TDU0 MUhCTE45Q09JM0w3NUYzMTk0RTE5NkExIn0.SNm1VZaZr3DkTqUg9CdV0F5arRe-uQU9oUWPKfWIpbIzIPZutR okv5DSDcM7asZIKNJyNIBx5DLsl_yQPrKgzhwQxZ8qbhto7cu3t-v8DHG2yO951plPQVQnj7x-vEDcXkLUL1F8 sqY23R5HW-xSDAQ3AFLawCckn7Q2eudRGeuMhLWH742Gflf9Hz3KyKnmeNKA3o9yW2na16nmeVZaYGqbUSPVIT dl5cMA0o9lEob8E3OQH0HHdmIsu5uMA4x7DeBjfTKD1rQxFP3JBNVcv30AIMLkNcw0pHbtHDVzKBWxUVxvnm3z FEdiBuSAco2uWhC9zFqHrrp64ZvzxZqoGA" }, "orderInformation": { "amountDetails": { "totalAmount": "21.00", "currency":"USD"}, "billTo": { "firstName": "John", "lastName": "Doe", "address1": "1Market St", "address2": "Address 2", "locality": "san francisco", "administrativeArea": "CA", "postalCode": "94105", "country": "US", "email": "test@cybs.com", "phoneNumber": "4158880000" } } }