Skip to main content
POST
https://api.dintero.com/v1
/
accounts
/
{aid}
/
wallets
/
cards
/
{card_id}
/
tokens
Create a token for the card
curl --request POST \
  --url https://api.dintero.com/v1/accounts/{aid}/wallets/cards/{card_id}/tokens \
  --header 'Authorization: Bearer <token>' \
  --header 'Content-Type: application/json' \
  --data '
{
  "ref_id": "<string>",
  "expires_in": 2
}
'
{
  "ref_id": "<string>",
  "expires_in": 2,
  "id": "3c90c3cc-0d44-4b50-8888-8dd25736052a",
  "created_at": "2023-11-07T05:31:56Z",
  "created_by": "1c92f7e1-2897-4d46-bdcc-c127a914fb4e",
  "metadata": {
    "order_id": "xk39592f"
  },
  "format": {
    "length": 36,
    "prefix": "DINCARD:",
    "symbols": true,
    "numbers": true,
    "characters": true,
    "barcode": false
  },
  "expires_after_transaction": true,
  "token": {
    "value": "DINCARD:6ccfec5d-3a53-47de-910a-97d6dda22e5f",
    "barcode_128": "data:image/png;base64,iVBORw0KGgoAAAANSUhEUgAAADIA..."
  }
}

Documentation Index

Fetch the complete documentation index at: https://docs.dintero.com/llms.txt

Use this file to discover all available pages before exploring further.

Authorizations

Authorization
string
header
required

Bearer authentication (token authentication) should be used for accessing the API.

Use Get Token to get an access token for client credentials. Pass the token in the request header:

Authorization: Bearer {access_token}

where the access_token is JSON Web Tokens (JWT).

Path Parameters

aid
string<^[PT]{1}\d{8}$>
required

An id that uniquely identifies the account.

Required string length: 9
card_id
string
required

The card id you have defined for the card. (must not have trailing or leading spaces)

Maximum string length: 255

Body

application/json

token details

Specify how token should be generated

ref_id
string
required

Unique ref ID provided by the client to support safely retrying requests without accidentally performing the same operation twice

All card transaction must have a unique ref ID, but it is not required that the ref ID is globally unique.

expires_in
integer
required

The lifetime in seconds for the card token. For example, the value "3600" denotes that the token will expire in one hour from the time the response was generated.

Required range: x >= 1
metadata
object

A key-value JSON object to store any additional information. The dintero_* namespace for keys is reserved

Example:
{ "order_id": "xk39592f" }
format
object

specify the format for the token, default format is an UUID prefixed with DINCARD

expires_after_transaction
boolean
default:true

The token can only be used to create one transaction, card lookup by token will be available until token expires by date

Response

Token created

Specify how token should be generated

ref_id
string
required

Unique ref ID provided by the client to support safely retrying requests without accidentally performing the same operation twice

All card transaction must have a unique ref ID, but it is not required that the ref ID is globally unique.

expires_in
integer
required

The lifetime in seconds for the card token. For example, the value "3600" denotes that the token will expire in one hour from the time the response was generated.

Required range: x >= 1
id
string<uuid>
read-only

An UUID that uniquely identifies the resource

created_at
string<date-time>
read-only

The date-time when the resource was created

created_by
string
read-only

The ID of the user/client that created the resource

Example:

"1c92f7e1-2897-4d46-bdcc-c127a914fb4e"

metadata
object

A key-value JSON object to store any additional information. The dintero_* namespace for keys is reserved

Example:
{ "order_id": "xk39592f" }
format
object

specify the format for the token, default format is an UUID prefixed with DINCARD

expires_after_transaction
boolean
default:true

The token can only be used to create one transaction, card lookup by token will be available until token expires by date

token
object
read-only
Last modified on April 8, 2026