Option 2: Pass in your existing token
Learn how to pass in an existing token to create a Credit Card payment method in Zuora, using required fields and token information.
You can pass in the existing token you have obtained from transactions outside of Zuora. A Credit Card payment method is created by using the provided token, and the token is used in processing subsequent payment transactions.
In your request, pass in the following required fields:
|
Required Field |
Type |
Description |
|---|---|---|
|
accountKey |
string |
The Zuora internal ID of the customer account that will own the payment method. While this field is not required when creating an orphan payment method, specifying this field is highly recommended to associate a newly created payment method with an account. |
|
cardMaskNumber |
string |
The masked card number. |
|
cardType |
string |
The type of the credit card. |
|
tokens |
object |
Pass in your existing token information through the following nested fields in this container:
|
|
type |
string |
The 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",
"cardType": "Visa",
"cardMaskNumber": "*******1111",
"tokens": {
"gatewayType": "GlobalPayments",
"tokenId": "10000010AM3T5VJ75UYA"
},
"accountKey": "8ac680458ed1c4ba018ed2237bfa416a"
}