Gateway Tokens
If you are working with certain gateways such as BlueSnap, Authorize.net, PaySafe, or Spreedly, you may wish or need to use a tokenized credit card number instead of a credit card number. See BlueSnap docs, Authorize.net docs, PaySafe docs, or Spreedly docs).
*Note that the code below applies to API V1 only for Authorize.Net and PaySafe and API V3 for BlueSnap and Spreedly.
Token Based Create Call for Spreedly
{
"AutoCapture": true,
"Attempt3DSecure": false,
"TermsAndConditionsAccepted": true,
"PlanData": {
"TotalAmount": 50.25,
"Currency": "USD",
"NumberOfInstallments": 3,
"PurchaseMethod": "Ecommerce",
"RefOrderNumber": "MerchantOrder123",
"TerminalId": "b628b9a4-4c21-4691-97c4-c9f8da665a60",
"FirstInstallmentAmount": null,
"ExtendedParams": {
"AnyParameterKey1": "AnyParameterVal1",
"AnyParameterKey2": "AnyParameterVal2"
}
},
"Shopper": {
"FullName": "John Doe",
"Email": "John.Doe@email.com",
"PhoneNumber": "+1-972-111-1111",
"Culture": "en-US"
},
"BillingAddress": {
"AddressLine1": "street name and number",
"AddressLine2": "",
"City": "NYC",
"Country": "USA",
"State": "NY",
"Zip": "12345"
},
"PaymentMethod": {
"Type": "SpreedlyToken",
"SpreedlyToken": {
"Token": "906699117"
}
}
}
Token Based Create Call for BlueSnap
{
"AutoCapture": true,
"Attempt3DSecure": false,
"TermsAndConditionsAccepted": true,
"PlanData": {
"TotalAmount": 50.25,
"Currency": "USD",
"NumberOfInstallments": 3,
"PurchaseMethod": "Ecommerce",
"RefOrderNumber": "MerchantOrder123",
"TerminalId": "b628b9a4-4c21-4691-97c4-c9f8da665a60",
"FirstInstallmentAmount": null,
"ExtendedParams": {
"AnyParameterKey1": "AnyParameterVal1",
"AnyParameterKey2": "AnyParameterVal2"
}
},
"Shopper": {
"FullName": "John Doe",
"Email": "John.Doe@email.com",
"PhoneNumber": "+1-972-111-1111",
"Culture": "en-US"
},
"BillingAddress": {
"AddressLine1": "street name and number",
"AddressLine2": "",
"City": "NYC",
"Country": "USA",
"State": "NY",
"Zip": "12345"
},
"PaymentMethod": {
"Type": "BluesnapVaultedShopperToken",
"BluesnapVaultedShopperToken": {
"Token": "36877391",
"Last4Digit": "1111"
}
}
}
Token Based Create Call for Authorize.net (API V1)
{
"PaymentToken": {
"Type": "AuthorizeNetProfileToken",
"Last4Digits": "0015",
"Token": "906699117"
},
"PlanApprovalEvidence": {
"AreTermsAndConditionsApproved": true
},
"ConsumerData": {
"FullName": "Jane Doe",
"Email": "pehigew848@ulforex.com",
"PhoneNumber": "1-555-666-7777"
},
"BillingAddress": {
"State": "WA",
"Country": "US",
"Zip": "98660",
"City": "Vancouver",
"AddressLine": "125 22nd street"
},
"RequestHeader": {
"SessionId": "edc7f28504444a269c6f3216aac0300d-1",
"ApiKey": "4d274b41-425f-416a-8542-75fbc38aebad"
},
"PlanData": {
"Amount": {
"CurrencyCode": "USD",
"Value": 150.0
},
"AutoCapture": true,
"RefOrderNumber": "bb55b712-52fe-4e14-bc21-4d6f0c37c0b5",
"NumberOfInstallments": 4
}
}
Token Based Create Call for PaySafe (API V1)
{
"PaymentToken": {
"Type": "PaysafeIssuedCardID",
"Last4Digits": "0015",
"Token": "906699117"
},
"PlanApprovalEvidence": {
"AreTermsAndConditionsApproved": true
},
"ConsumerData": {
"FullName": "Jane Doe",
"Email": "pehigew848@ulforex.com",
"PhoneNumber": "1-555-666-7777"
},
"BillingAddress": {
"State": "WA",
"Country": "US",
"Zip": "98660",
"City": "Vancouver",
"AddressLine": "125 22nd street"
},
"RequestHeader": {
"SessionId": "edc7f28504444a269c6f3216aac0300d-1",
"ApiKey": "4d274b41-425f-416a-8542-75fbc38aebad"
},
"PlanData": {
"Amount": {
"CurrencyCode": "USD",
"Value": 150.0
},
"AutoCapture": true,
"RefOrderNumber": "bb55b712-52fe-4e14-bc21-4d6f0c37c0b5",
"NumberOfInstallments": 4
}
}