Skip to main content
POST
/
tokens
Create One Time Use Token
curl --request POST \
  --url https://api-sandbox.y.uno/v1/tokens \
  --header 'Content-Type: application/json' \
  --header 'private-secret-key: <api-key>' \
  --header 'public-api-key: <api-key>' \
  --data '
{
  "account_id": "{{account_id}}",
  "card_data": {
    "number": "4111111111111111",
    "expiration_month": 12,
    "expiration_year": 29,
    "security_code": "123",
    "holder_name": "John Doe"
  }
}
'
{
  "token": "9107a30f-564c-4469-bd7c-8e1f249fb016",
  "card_data": {
    "holder_name": "John Doe",
    "iin": "41111111",
    "lfd": "1111",
    "number_length": 16,
    "security_code_length": 3,
    "brand": "VISA",
    "type": "DEBIT",
    "category": "CLASSIC",
    "issuer_name": "CONOTOXIA SP Z O O",
    "issuer_code": null,
    "fingerprint": null
  }
}
This endpoint is for PCI compliant merchants only
Create a one-time-use token from the customer’s card data as part of the DIRECT workflow. For DIRECT integrations, this endpoint allows PCI-compliant merchants to tokenize card data directly while maintaining security throughout the process — without the need to use Yuno’s SDK. Unlike the regular workflow, which involves creating a checkout_session and using the SDK to generate a one-time-use token, the DIRECT flow offers an alternative approach for those who prefer to manage the entire process directly from their backend. Use the returned token to create a payment with workflow DIRECT by setting payment_method.type = "CARD" and payment_method.token to the token.

Authorizations

public-api-key
string
header
default:<Your public-api-key>
required
private-secret-key
string
header
default:<Your private-secret-key>
required

Body

application/json
account_id
string
required

The unique identifier of the account. You find this information on Yuno's Dashboard (MAX 64; MIN 36).

Example:

"fe14c7c6-c75e-43b7-bdbe-4c87ad52c482"

card_data
object
required
country
string

Customer's country (ISO 3166-1 MAX 2; MIN 2).

Example:

"US"

customer_payer
object

Response

Created

token
string
Example:

"9107a30f-564c-4469-bd7c-8e1f249fb016"

card_data
object
customer_payer
object