On This Page
Create Multiple Tokens
This section describes how to create multiple tokens in one
TMS
request.You can create these
TMS
tokens in a single request:- Customer token
- Payment instrument
- Shipping address token
- Instrument identifier
You can also include information that is retrieved from a transient token. For
information on transient tokens, see the
Microform Integration
and Unified Checkout
developer guides. A successful response to a request returns status and identifiers for each token.
Endpoint
Test:
POST
https://api.smartpayfuse-test.barclaycard
/tms/v2/tokenizeProduction:
POST
https://api.smartpayfuse.barclaycard
/tms/v2/tokenizeRequired Fields for Creating Multiple Tokens
- processingInformation.actionList
- Set toTOKEN_CREATE.
- processingInformation.actionTokenTypes.customer
- Required when creating a customer token.
- processingInformation.actionTokenTypes.instrumentIdentifier
- Required when creating an instrument identifier.
- processingInformation.actionTokenTypes.paymentInstrument
- Required when creating a payment instrument.
- processingInformation.actionTokenTypes.shippingAddress
- Required when creating a shipping address token.
- tokenInformation.customer.buyerInformation.email
- Required when creating a customer token.
- tokenInformation.customer.buyerInformation.merchantCustomerID
- Required when creating a customer token.
- tokenInformation.customer.clientReferenceInformation.code
- Required when creating a customer token.
- tokenInformation.customer.merchantDefinedInformation.name
- Required when creating a customer token.
- tokenInformation.customer.merchantDefinedInformation.value
- Required when creating a customer token.
- tokenInformation.instrumentIdentifier.card.expirationMonth
- Required when creating an instrument identifier.
- tokenInformation.instrumentIdentifier.card.expirationYear
- Required when creating an instrument identifier.
- tokenInformation.instrumentIdentifier.card.number
- Required when creating an instrument identifier.
- tokenInformation.instrumentIdentifier.type
- Set toenrollable card.
- Required when creating an instrument identifier.
- tokenInformation.paymentInstrument.billTo.address1
- Required when creating a payment instrument.
- tokenInformation.paymentInstrument.billTo.administrativeArea
- Required when creating a payment instrument.
- tokenInformation.paymentInstrument.billTo.company
- Required when creating a payment instrument.
- tokenInformation.paymentInstrument.billTo.country
- Required when creating a payment instrument.
- tokenInformation.paymentInstrument.billTo.email
- Required when creating a payment instrument.
- tokenInformation.paymentInstrument.billTo.firstName
- Required when creating a payment instrument.
- tokenInformation.paymentInstrument.billTo.lastName
- Required when creating a payment instrument.
- tokenInformation.paymentInstrument.billTo.locality
- Required when creating a payment instrument.
- tokenInformation.paymentInstrument.billTo.phoneNumber
- Required when creating a payment instrument.
- tokenInformation.paymentInstrument.billTo.postalCode
- Required when creating a payment instrument.
- tokenInformation.paymentInstrument.card.expirationMonth
- Required when creating a payment instrument.
- tokenInformation.paymentInstrument.card.expirationYear
- Required when creating a payment instrument.
- tokenInformation.paymentInstrument.card.type
- Required when creating a payment instrument.
- tokenInformation.paymentInstrument.default
- Set totrue.
- Required when creating a payment instrument.
- tokenInformation.shippingAddress.default
- Set totrue.
- Required when creating a shipping address tolken.
- tokenInformation.shippingAddress.shipTo.address1
- Required when creating a shipping address tolken.
- tokenInformation.shippingAddress.shipTo.administrativeArea
- Required when creating a shipping address tolken.
- tokenInformation.shippingAddress.shipTo.company
- Required when creating a shipping address tolken.
- tokenInformation.shippingAddress.shipTo.country
- Required when creating a shipping address tolken.
- tokenInformation.shippingAddress.shipTo.email
- Required when creating a shipping address tolken.
- tokenInformation.shippingAddress.shipTo.firstName
- Required when creating a shipping address tolken.
- tokenInformation.shippingAddress.shipTo.lastName
- Required when creating a shipping address tolken.
- tokenInformation.shippingAddress.shipTo.locality
- Required when creating a shipping address tolken.
- tokenInformation.shippingAddress.shipTo.phoneNumber
- Required when creating a shipping address tolken.
- tokenInformation.shippingAddress.shipTo.postalCode
- Required when creating a shipping address tolken.
REST Example: Creating Multiple Tokens
Request
{ "processingInformation": { "actionList": [ "TOKEN_CREATE" ], "actionTokenTypes": [ "customer", "shippingAddress", "paymentInstrument", "instrumentIdentifier" ] }, "tokenInformation": { "customer": { "buyerInformation": { "merchantCustomerID": "Your customer identifier", "email": "[email protected]" }, "clientReferenceInformation": { "code": "TC50171_3" }, "merchantDefinedInformation": [ { "name": "data1", "value": "Your customer data" } ] }, "shippingAddress": { "default": "true", "shipTo": { "firstName": "John", "lastName": "Doe", "company": "Cybersource", "address1": "1 Market St", "locality": "San Francisco", "administrativeArea": "CA", "postalCode": "94105", "country": "US", "email": "[email protected]", "phoneNumber": "4158880000" } }, "paymentInstrument": { "default": "true", "card": { "expirationMonth": "12", "expirationYear": "2031", "type": "001" }, "billTo": { "firstName": "John", "lastName": "Doe", "company": "Cybersource", "address1": "1 Market St", "locality": "San Francisco", "administrativeArea": "CA", "postalCode": "94105", "country": "US", "email": "[email protected]", "phoneNumber": "4158880000" } }, "instrumentIdentifier": { "type": "enrollable card", "card": { "number": "X622943123116478", "expirationMonth": "12", "expirationYear": "2026" } } } }
Response to a Successful Request
{ "responses": [ { "resource": "instrumentIdentifier", "id": "7019519999950381111", "httpStatus": 200 }, { "resource": "customer", "id": "3A886029D05E7FC0E0634136CF0A038D", "httpStatus": 201 }, { "resource": "shippingAddress", "id": "3A886029D0617FC0E0634136CF0A038D", "httpStatus": 201 }, { "resource": "paymentInstrument", "id": "3A886029D0667FC0E0634136CF0A038D", "httpStatus": 201 } ] }