# Create a customer token

Create a reusable Kustom customer token by setting recurring on a Checkout order, completing the purchase and storing the recurring_token from the order.

Set `recurring: true` on a Checkout order. After the customer completes the purchase, read
its `recurring_token` and store it for later charges.

## Before you start

**Recurring must be enabled on your merchant account.** Contact Kustom merchant support.
Without it, order creation returns `400` with `error_code: BAD_VALUE` naming the
`recurring` field.

You also need a working checkout integration — [create an
order](/checkout/integrate/create-order/) and [render the
snippet](/checkout/integrate/render-checkout-snippet/).

These constraints can't be changed on an open order:

- **Flagging an order as recurring removes the financing payment methods.**
- **A token belongs to the merchant ID that created it.** You can't create a token under one MID and charge it under another.

## Step by step

### 1. Flag the order as recurring

Add `recurring` to the create-order call:

```json
{
  "recurring": true
}
```

Kustom displays a recurring payment notice naming your store. You don't supply this text.

### 2. Read the token off the completed order

Read the completed order and store its `recurring_token` against the correct customer.
Treat it as a credential: the API can't detect a token assigned to the wrong customer.

## Check that it works

In Playground:

1. Create an order with `recurring: true` and complete it with [test data](/basics/test-data/).
2. Confirm the checkout offers no financing methods.
3. Read the completed order and confirm a `recurring_token` is present.
4. Confirm your own store holds that token against exactly one customer.

## Related

- [Charge a customer token](/checkout/recurring/charging-a-token/) — what to do with the token you just created
