v1

latestOpenAPI 3.1.02026-07-2414085.2 KB

Tokenize a card

Tokenizes a card within the system, returning a token that can be used for subsequent transactions.

post/credit_cards

Request body

card_numberstring required

Number on the card

card_holderstring required

Name on the card

card_expirystring required

Card expiry date; format: MM/YYYY

cvvstring required

CVV of the card

aliasstring

Alias to associate with the card

is_billingboolean

For Recurring transactions this field can be included set to true, which will make the cvv field optional

customer_idstring

The Fat Zebra ID of an existing customer to link this card to, in the form 071-C-ABC123. When supplied, the tokenized card is associated with that customer.

make_defaultboolean

Only applies when customer_id is supplied. When true, this card becomes the customer's default credit card.

Example request

{
  "customer_id": "071-C-ABC123"
}

Response

200

successfulboolean
testboolean

Example response

{
  "successful": true,
  "response": {
    "token": "abcdef",
    "card_holder": "Bob Smitch",
    "card_number": "512345XXXXXX2346",
    "card_expiry": "2030-05-31",
    "card_type": "MasterCard",
    "card_category": "Credit",
    "card_subcategory": "Credit",
    "card_issuer": "Westpac",
    "card_country": "Australia",
    "authorized": true
  },
  "test": true
}