Tokens

Request a token

Exchange card details for a reference token that can be used later to request a card payment. Tokens are single use and expire after 15 minutes. To create a token, please authenticate using your public key.

Please note: You should only use the card type for testing purposes.

post/tokens

Request

Request body

OR
OR
OR
OR

Example request

{
  "type": "card",
  "number": "4543474002249996",
  "expiry_month": 6,
  "expiry_year": 2025,
  "name": "Bruce Wayne",
  "cvv": "956",
  "pin": "12",
  "billing_address": {
    "address_line1": "123 High St.",
    "address_line2": "Flat 456",
    "city": "London",
    "zip": "SW1A 1AA",
    "country": "GB"
  },
  "phone": {
    "country_code": "+1",
    "number": "415 555 2671"
  },
  "metadata": {
    "documentNumber": "12345678900",
    "partnerId": "partner_123"
  }
}

Response

Reference token created successfully

OR
OR
OR
OR

Example response

{
  "type": "card",
  "token": "tok_ubfj2q76miwundwlk72vxt2i7q",
  "billing_address": {
    "address_line1": "123 High St.",
    "address_line2": "Flat 456",
    "city": "London",
    "zip": "SW1A 1AA",
    "country": "GB"
  },
  "phone": {
    "country_code": "+1",
    "number": "415 555 2671"
  },
  "expiry_month": 6,
  "expiry_year": 2025,
  "name": "Bruce Wayne",
  "scheme": "VISA",
  "scheme_local": "cartes_bancaires",
  "last4": "9996",
  "bin": "454347",
  "card_type": "CREDIT",
  "card_category": "CONSUMER",
  "issuer": "GOTHAM STATE BANK",
  "issuer_country": "US",
  "product_id": "F",
  "product_type": "CLASSIC",
  "metadata": {
    "documentNumber": "12345678900",
    "partnerId": "partner_123"
  }
}

Changes

No recorded changes to this operation across all 1 revision of this API.