Option 3: Pass in card information and the tokenize flag
Learn how to pass in card information and use the tokenize flag to generate a token for secure payment processing.
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 |
Credit card number. |
|
securityCode |
string |
CVV or CVV2 security code of the credit card. To ensure PCI compliance, this value is not stored and cannot be queried. |
|
cardHolderInfo |
object |
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 |
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:
{
"type": "CreditCard",
"accountKey": "402880e58fbd6560018fbd73d76c00b4",
"cardType": "Visa",
"cardHolderInfo": {
"cardHolderName": "Joe Bloggs"
},
"cardNumber": "4111111111111111",
"expirationMonth": 12,
"expirationYear": 2025,
"securityCode": 977,
"tokenize": true
}
For other optional fields, see Create a payment method .