Creating a Payment Token
Create a credit card or ACH token and save it for future use.
Endpoint Access URL: https://rest.everyware.com/api/Default/CreateToken [POST]
The CreateToken method tokenizes a credit card or bank account and saves it in a vault for future use.
Inbound Parameters
Parameter Name | Description | Required/Not |
---|---|---|
FirstName | First name of customer | REQUIRED |
LastName | Last name of customer | REQUIRED |
Address1 | First line of customer’s billing street address | REQUIRED |
Address2 | Second line of customer’s billing street address | OPTIONAL |
City | Customer’s billing address city | REQUIRED |
StateCode | Customer’s billing state code, in two-character format (i.e., “Florida” = “FL”) | REQUIRED |
PostalCode | Customer’s billing zip code | REQUIRED |
CountryCode | Customer’s billing country code, in two-character format, (default is “United States” = “US”) | REQUIRED |
Customer’s email, standard format ([email protected]) | REQUIRED | |
MobilePhone | Mobile phone number of customer, provided in 10 digit format: 3055551212. Must be a valid mobile number | OPTIONAL |
CCNumber | Credit Card number, without spaces | 💳 REQUIRED FOR CREDIT CARD METHOD |
ExpirationMonth | Expiration Date (Month) – with preceding “0”, so May = “05” | 💳 REQUIRED FOR CREDIT CARD METHOD |
ExpirationYear | Expiration Date (Year) – in two digit format, so 2016 = “16” | 💳 REQUIRED FOR CREDIT CARD METHOD |
CVV | Verification Code on credit card 3 digit number for Visa or MC 4 digit number for AMEX | 💳 REQUIRED FOR CREDIT CARD METHOD |
AccountNumber | For ACH transactions, enter the bank account number for the customer. | 🏦 REQUIRED FOR ACH METHOD |
RoutingNumber | For ACH transactions, enter the routing account number for the customer. | 🏦 REQUIRED FOR ACH METHOD |
Sample Use Case 1: Card Payment Token
{
"FirstName": "Test",
"LastName": "Token",
"Address1": "123 Main St",
"Address2": "Apt B",
"City": "Austin",
"StateCode": "TX",
"PostalCode": "73301",
"CountryCode": "US",
"Email": "[email protected]",
"MobilePhone": "5125551212",
"CCNumber": "4111111111111111",
"ExpirationMonth": "02",
"ExpirationYear": "23",
"CVV": "092"
}
curl --location 'https://rest.everyware.com/api/Default/CreateToken' \
--header 'Authorization: Basic [xxx]' \
--header 'Content-Type: application/json' \
--data-raw ' {
"FirstName": "Test",
"LastName": "Token",
"Address1": "123 Main St",
"Address2": "Apt B",
"City": "Austin",
"StateCode": "TX",
"PostalCode": "73301",
"CountryCode": "US",
"Email": "[email protected]",
"MobilePhone": "5125551212",
"CCNumber": "4111111111111111",
"ExpirationMonth": "02",
"ExpirationYear": "23",
"CVV": "092"
}{
{
"IsSuccess": true,
"Message": "The token creation has been processed",
"Data": {
"TokenStatus": true,
"TokenResult": "card_1A23bcDefGHiJKlMNopQrS4T"
},
}
Sample Use Case 2: ACH Payment Token
{
"FirstName": "Test",
"LastName": "Token",
"Address1": "123 Main St",
"Address2": "Apt B",
"City": "Austin",
"StateCode": "TX",
"PostalCode": "73301",
"CountryCode": "US",
"Email": "[email protected]",
"MobilePhone": "5125551212",
"AccountNumber": "123456",
"RoutingNumber": "021000021"
}
curl --location 'https://rest.everyware.com/api/Default/CreateToken' \
--header 'Authorization: Basic [xxx]' \
--header 'Content-Type: application/json' \
--data-raw '{
"FirstName": "Test",
"LastName": "Token",
"Address1": "123 Main St",
"Address2": "Apt B",
"City": "Austin",
"StateCode": "TX",
"PostalCode": "73301",
"CountryCode": "US",
"Email": "[email protected]",
"MobilePhone": "5125551212",
"AccountNumber": "123456",
"RoutingNumber": "021000021"
}
{
"IsSuccess": true,
"Message": "The token creation has been processed",
"Data": {
"TransactionStatus": false,
"InvoiceNumber": null,
"InvoiceID": null,
"ReceiptNumber": null,
"TokenStatus": true,
"TokenResult": "11000015191000112"
},
"OrderNumber": "E438273226",
"SMSID": null
}
Updated 5 months ago