---
title: "Tokenize a card"
method: POST
path: "/credit_cards"
---

# Tokenize a card

`POST /credit_cards`

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

## Request body

- object
  - `card_number` string, required — Number on the card
  - `card_holder` string, required — Name on the card
  - `card_expiry` string, required — Card expiry date; format: MM/YYYY
  - `cvv` string, required — CVV of the card
  - `alias` string — Alias to associate with the card
  - `is_billing` boolean — For Recurring transactions this field can be included set to true, which will make the cvv field optional
  - `customer_id` string — 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_default` boolean — Only applies when customer_id is supplied. When true, this card becomes the customer's default credit card.

## Response `200`

200

- object
  - `successful` boolean
  - `response` object
    - `token` string
    - `card_holder` string
    - `card_number` string
    - `card_expiry` string
    - `card_type` string
    - `card_category` string
    - `card_subcategory` string
    - `card_issuer` string
    - `card_country` string
    - `authorized` boolean
    - `transaction_count` integer
    - `alias` unknown
  - `errors` unknown[]
    - unknown
  - `test` boolean

## Other responses

- `422` — 422

---

[API](https://skmtc.net/fatzebra/apis/gateway.md) · [All operations](https://skmtc.net/fatzebra/apis/gateway/llms.txt) · [OpenAPI document](https://skmtc-service-staging.skmtc.workers.dev/v1/apis/fatzebra/gateway/revisions/6317ad424277/schema)
