Option 2: Pass in card information and your existing tokens
Learn how to pass in card information and existing tokens to store payment methods and process transactions.
In your request, pass in the following required fields. 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. |
|
cardMaskNumber |
string |
The masked card number. |
|
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. |
|
tokens |
object |
Pass in your existing token information through the following nested fields in this container:
|
|
type |
string |
Type of the payment method. Specify
|
For other optional fields, see Create a payment method .
Here is an example of the API request:
{
"type": "CreditCard",
"cardHolderInfo": {
"cardHolderName": "John Doe"
},
"cardType": "Visa",
"expirationMonth": 9,
"expirationYear": 2025,
"cardMaskNumber": "*******1111",
"tokens": {
"gatewayType": "FiservCommerceHub",
"tokenId": "0000030002410000"
},
"accountKey": "8ac680458ed1c4ba018ed2237bfa416a"
}