---
title: "Create a token"
method: POST
path: "/payment/instruments/{instrumentId}/tokens"
tags: ["InstrumentTokens"]
---

# Create a token

`POST /payment/instruments/{instrumentId}/tokens`

Create a token for a payment instrument.

## Path parameters

- `instrumentId` string, uuid, required

## Headers

- `x-idempotency-key` string, uuid, required

## Request body

- object
  - `providerId` string, uuid, required — Id of the provider the token belongs to.
  - `providerConfigId` string, uuid — Id of the configuration in the provider the token belongs to.
  - `type` 'network' | 'vault' | 'psp' | 'networkOffers' | 'networkGateway', required — Type of the token.
  - `reference` string, required — Unique identifier of the token in the provider's system.
  - `meta` object — Any merchant or provider-specific data that should be stored for context in the token, e.g. `holderReference` is required for Adyen tokens.

## Response `201`

Created.

- object
  - `id` string, uuid, required — Id of the token in Payrails.
  - `createdAt` string, date-time, required — Date and time when the Token was created in Payrails.
  - `updatedAt` string, date-time, required — When the Token was last updated.
  - `instrumentId` string, uuid, required — Id of the payment instrument the token belongs to.
  - `status` 'created' | 'enabled' | 'disabled' | 'deleted', required — Status of the token.
  - `type` 'network' | 'vault' | 'psp' | 'networkOffers' | 'networkGateway', required — Type of the token.
  - `providerId` string, uuid, required — Id of the provider the token belongs to.
  - `providerConfigId` string, uuid — Id of the configuration in the provider the token belongs to.
  - `reference` string, required — Unique identifier of the token in the provider's system.
  - `meta` object — Any merchant or provider-specific data that should be stored for context in the token.

## Other responses

- `400` — Bad Request.
- `401` — Unauthorized.
- `403` — Insufficient Scope.
- `404` — Not Found.
- `429` — Too Many Requests.

---

[API](https://skmtc.net/payrails/apis/payrails-api-reference.md) · [All operations](https://skmtc.net/payrails/apis/payrails-api-reference/llms.txt) · [OpenAPI document](https://skmtc-service-staging.skmtc.workers.dev/v1/apis/payrails/payrails-api-reference/revisions/9dd2f0158582/schema)
