Welcome to Zuora Product Documentation

Explore our rich library of product information

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 cardHolderName field is required. Pass in the card holder's full name as it appears on the card, such as "Amy Lawrence", 50 characters or less.

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:

  • gatewayType Type: string The type of payment gateway to generate the token. This field is case-sensitive. Specify FiservCommerceHub in this field.

  • tokenId Type: string Specify the value of tokenData .

  • secondTokenId Type: string Pass in the second token of the payment method if available.

  • thirdTokenId Type: string Pass in the third token of the payment method if available.

type

string

Type of the payment method. Specify CreditCard in this field.

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"
}