Skip to main content
POST
/
v1
/
checkout
/
sessions
/
{checkout_session}
/
token
{
  "account_id": "fe14c7c6-c75e-43b7-bdbe-4c87ad52c482",
  "card_data": {
    "number": "4111111111111111",
    "expiration_month": 12,
    "expiration_year": 25,
    "security_code": "123",
    "holder_name": "Dee Hock"
  }
}
{
  "token": "dab106a6-9067-4418-ae43-6045663531dc",
  "type": "CARD",
  "card_data": {
    "holder_name": "Dee Hock",
    "iin": "41111111",
    "lfd": "1111",
    "brand": "VISA",
    "type": "DEBIT"
  },
  "country": "US"
}
Creates a one-time-use token within an existing checkout session. This is used in the SDK_CHECKOUT workflow where card data is collected securely on the client side via the Yuno SDK, then tokenized before being sent to your server for payment creation.
Unlike the Direct token endpoint, this endpoint does not require PCI certification because the Yuno SDK handles card data collection in a secure iframe.

Path Parameters

checkout_session
string
required
The checkout session identifier (UUID) returned from Create Checkout Session.Example: a1b2c3d4-e5f6-7890-abcd-ef1234567890

Request Body

account_id
string
required
The unique identifier of the account. Found in Yuno’s Dashboard.Constraints: MAX 64; MIN 36
card_data
object
required
Card details to tokenize.
{
  "account_id": "fe14c7c6-c75e-43b7-bdbe-4c87ad52c482",
  "card_data": {
    "number": "4111111111111111",
    "expiration_month": 12,
    "expiration_year": 25,
    "security_code": "123",
    "holder_name": "Dee Hock"
  }
}
{
  "token": "dab106a6-9067-4418-ae43-6045663531dc",
  "type": "CARD",
  "card_data": {
    "holder_name": "Dee Hock",
    "iin": "41111111",
    "lfd": "1111",
    "brand": "VISA",
    "type": "DEBIT"
  },
  "country": "US"
}

Response Fields

token
string
The one-time-use token. Use this in the Create Payment request as payment_method.token.
vaulted_token
string
Stored payment method token, returned when the card was previously enrolled.
vault_on_success
boolean
Whether the card will be vaulted upon successful payment. Default: true.
type
string
Payment method type.Example: CARD
card_data
object
Tokenized card metadata (no sensitive data).
country
string
ISO 3166-1 alpha-2 country code.

Error Responses

StatusDescription
400Invalid request parameters. Check card_data fields
401Invalid credentials. Verify API keys
403Merchant not authorized for this API