Creating a Payment Token
Create a credit card or ACH token and save it for future use.
Access Endpoint 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
Parameters should be passed in a single JSON-body object.
Parameter Name | Description | Optional/Required |
---|---|---|
FirstName | The first name of the customer making the payment. | Required |
LastName | The last name of the customer making the payment. | Required |
Address1 | Line one of the address of the customer making the payment. | Required |
Address2 | Line two of the address of the customer making the payment. | Optional |
City | The city in the address of the customer making the payment. | Required |
StateCode | The state code in the address of the customer making the payment. Format: 2-letter code (TX, FL, etc.) | Required |
PostalCode | The postal/zip code in the address of the customer making the payment. | Required |
CountryCode | The country code in the address of the customer making the payment. Example: United States = US | Required |
The email address of the customer making the payment. Format: [email protected] | Required | |
MobilePhone | The mobile phone number (10-digits max, no formatting) of the customer making the payment. If Everyware messaging and invoicing are not being used, a unique 10-digit number that is not a phone number may be used. Speak with your Everyware representative for more information. Example: 3055551212 | Required |
CCNumber | The credit card number of the customer making the payment. No spaces should be included in the parameter. | 💳 REQUIRED FOR CREDIT CARD METHOD |
ExpirationMonth | The month in which the paying customer's credit card will expire. Months 1-9 require a preceding 0. Example: "05", "11" | 💳 REQUIRED FOR CREDIT CARD METHOD |
ExpirationYear | The year in which the paying customer's credit card will expire. Must be provided in 2-digit format. Example: 2016 = "16" | 💳 REQUIRED FOR CREDIT CARD METHOD |
CVV | The verification code on the paying customer's credit card. For Visa or Master Card, this is a 3-digit number. For American Express, this is a 4-digit number. | 💳 REQUIRED FOR CREDIT CARD METHOD |
CardType | The brand of the card. | Optional |
AccountName | The name associated with the bank account. | Optional |
AccountType | The type of bank account. | Optional |
RoutingNumber | For ACH transactions, enter the routing account number for the customer. | 🏦 REQUIRED FOR ACH METHOD |
AccountNumber | For ACH transactions, enter the bank account number for the customer. | 🏦 REQUIRED FOR ACH METHOD |
PaymentType | The type of payment associated with the token. This can accept the following values: - PaymentType.CreditCard - PaymentType.ACH Default value is set to PaymentType.CreditCard. | Optional |
IndividualID | The ID associated with the individual in the Everyware system. | Optional |
CustomerExternalID | A unique identifier from an external system for the customer that Everyware can store. | Optional |
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 9 months ago