Option 1: Pass in the card number
Learn how to pass in required fields to generate a token for a credit card payment method, ensuring secure transactions.
In your request, pass in the following required fields. A token is generated when validating the payment method with the gateway. Both the card information and the token are stored for the payment method but the token is used in processing subsequent payment transactions.
|
Required Field |
Type |
Description |
|---|---|---|
|
accountKey |
string |
Zuora internal ID of the customer account that will own the payment method. |
|
cardNumber |
string |
The credit card number. |
|
cardHolderInfo |
object |
The container for cardholder information.
The nested
|
|
cardType |
string |
The type of the credit card. |
|
expirationMonth |
integer |
One or two-digit expiration month (1-12) of the credit card. |
|
expirationYear |
integer |
Four-digit expiration year of the credit card. |
|
type |
string |
The type of the payment method. Specify
|
|
tokenize |
boolean |
default: false
Specify
|
Here is an example of the API request for creating a tokenized Credit Card payment method:
{
"accountKey": "8a90d6128d45df2b018d4b90681c05x0",
"cardHolderInfo": {
"cardHolderName": "Amy Lawrence"
},
"cardNumber": "4111111111111111",
"cardType": "Visa",
"expirationMonth": 6,
"expirationYear": 2025,
"type": "CreditCard",
"tokenize": true
}
For other optional fields, see Create a payment method .