Skip to main content

Get Payment Bundle

This method is used to retrieve a cryptogram for an existing TokenEx token that has a network token associated with it. The cryptogram is required by your payment gateway or processor to process customer-initiated transactions (CIT) using a network token. A cryptogram is not typically required for subsequent subscription/recurring merchant-initiated transactions (MIT).

Required API Key Permissions: NetworkTokenizationGeneralAccess

Request Headers: Authentication and Authorization

* denotes a required field
HTTP Request HeaderDescription
tx-tokenex-id*Like a username, this ID logically segments your tokenized data.
tx-apikey*Controls your access to individual functions in the API

Request Body Parameters:

A denotes an applicable field, A* denotes required under certain conditions, N/A is not applicable, and * denotes a required field under all conditions

ParameterDescriptionVisaMastercardAMEX
bundleMetaDataThe type of bundle to be generated. Possible values: Cryptogram, Token. Defaults to Cryptogram if omitted.AAA
amountThe transaction amount.N/AN/A*
merchantIdMerchant identifier assigned by the acquirer.A*N/AA*
tokenAn existing TokenEx token that represents a PAN.***
transactionTypePossible values: ECOM, AFT.*N/AN/A
tokenReferenceIdIf there is more than one network token, indicate which network token to use for this operation.A*A*A*
billTo.firstName, billTo.lastName, billTo.address1, billTo.locality, billTo.administrativeArea, billTo.postalCode, billTo.country, billTo.email, billTo.phoneNumberComing soon Cardholder name, billing address, email, and phone number. Supports Visa's Digital Commerce Authentication Program (DCAP).A*N/AN/A
deviceInfo.id, deviceInfo.ipAddressDevice identifier and IP address. Supports Visa's Digital Commerce Authentication Program (DCAP).A*N/AN/A

Response Body Parameters:

ParameterTypeDescription
tokenstringThe token generated by TokenEx that references the sensitive data.
successboolIndicator if the request was successfully processed by TokenEx.
referenceNumberstringTokenEx reference number for the transaction.
errorstringTokenEx Error Code and human readable description.
messagestringHuman readable message about response from TokenEx.
providerstringIdentifies which provider serviced the request: CybersourceTMS or VisaTGS.
thirdPartyStatusCodestringReserved field; not currently populated.
networkResponse.tokenRequestorIdstringOpaque identifier associated with the domain to which the token belongs. Treat as opaque — do not persist or use in downstream logic. Identify tokens by token + tokenReferenceId.
networkResponse.tokenReferenceIdstringUnique reference identifier for the token generated.
networkResponse.messageIdstringUnique message identifier (GUID format), generated per response.
networkResponse.conversationIdstringMessage identifier assigned for the entire conversation (GUID format). Useful when contacting support.
networkResponse.statusCodestringThe four-digit status code.
networkResponse.statusMessagestringHuman readable comments about the status. Null on success — read statusCode for the outcome.
networkResponse.decodedEncData.paymentBundle.bundleElements[].typestring enumThe type of the bundle element. Possible values: TOKEN, TOKEN_EXP, ECOM_CRYPTOGRAM, ECI.
networkResponse.decodedEncData.paymentBundle.bundleElements[].valuestring or objectThe value of the bundle element.
note

Cryptogram generation is supported for Visa only. Token bundles (bundleMetaData: Token) are supported for all three brands.

POST /v2/NetworkToken/GetPaymentBundle HTTP/1.1
Host: test-api.tokenex.com
tx-apikey: YourAPIKey
tx-tokenex-id: YourTokenExId
Content-Type: application/json

{
"token": "476120FDallZ7718", // Required
"transactionType": "ECOM", // Required for Visa [ECOM, AFT]
"billTo": {
"firstName": "Alex",
"lastName": "Smith",
"address1": "123 Main St",
"locality": "Austin",
"administrativeArea": "TX",
"postalCode": "78701",
"country": "US",
"email": "[email protected]",
"phoneNumber": "5125551234"
},
"deviceInfo": {
"id": "a1b2c3d4-device-id",
"ipAddress": "198.51.100.123"
}
}