Processing with Tokenization
Activating Tokenization
Follow these steps to activate tokenization with a first-time purchase:
- Send a regular transaction with
"TokenizationFlag": "Internal"OR"TokenizationFlag": "External"and include full payment method information
(credit card expiration date, name on card, credit card type, credit card number and CVV2). CVV2 value may be required for subsequent transactions as well (check with your bank). In this case, pass the credit card CVV2 value for all the subsequent transactions with payment token. See Using Payment Token code sample for reference. - The System will return a response with the PaymentMethodToken – the secret transaction token you can use for subsequent transactions on the same card
- Save the transaction token and, for subsequent transactions with this credit card, specify
"PaymentMethodToken": "Your Token"
Keep the token in a safe place and use it in all subsequent transactions instead of credit card information
Request Parameters
Query is based on Regular Transaction Packet including the following Parameters
See Transactions Processing chapter for more information regarding making API requests.
| Name | Type | Required | Description | |
| “creditcard” | object | conditional | Required if payment method = creditcard; null if transaction “type“ = “update”, “adjustment” and payment method = ach; | |
| “tokenization” | object | optional |
Response Parameters
| Name | Type | Required | Description | |
| “paymenttoken” | string | ✓ | Credit card payment token |
Objects Reference
creditCard
| Name | Type | Required | Description | |||||||||||||||||||||||||||||
| “number” | string | conditional | Required if “token” is null. else null | |||||||||||||||||||||||||||||
| “expirationdate” | string | conditional | Required if “token” is null. else null | |||||||||||||||||||||||||||||
| “nameoncard” | string | conditional | Required if “token” is null. else null | |||||||||||||||||||||||||||||
| “type” | enum | conditional | Credit card type. Required when PaymentMethod = CreditCard and “tokenization”.”type”=External Available Values:
| |||||||||||||||||||||||||||||
| “cvv” | string | optional | Required if “token” is null. Else null |
tokenization
| Name | Type | Required | Description | |||||||||||||||||||||||||||||
| “type” | enum | conditional | Null if there is no tokenization object Available Values:
| |||||||||||||||||||||||||||||
| “cardtype“ | enum | conditional | Null if “token” is null Available Values:
| |||||||||||||||||||||||||||||
| “token” | string | conditional | Null if there is no tokenization object | |||||||||||||||||||||||||||||
| “maskednumber” | string | optional | Null if “token” is null | |||||||||||||||||||||||||||||
| “nameoncard“ | string | conditional | Required if “token” is not null AND “type” = 1 (required only for External tokenization) else null |
Initial Transaction
{
.......
"creditCard": {
"number": "4111111111111111",
"expirationDate": "1225",
"nameOnCard": "Eleanor Johansson",
"type": "Visa",
"cvv": "123",
"tokenization": {
"type": "External"
}
......
}
Response with Payment Token
{
.....
"paymentToken": "",
.....
}
}
Using Payment Token
{
.......
"creditCard": {
"tokenization": {
"type": "External",
"cardType": "Visa",
"token": "1232535645746",
"nameOnCard": "Eleanor Johansson"
}
OR
"creditCard": {
"tokenization": {
"type": "Internal",
"token": "1232535645746",
}
......
}