Tokenize a Card

Accepts card data along with optional billing details, tokenizes the card,
and securely stores the tokenized payment method. Returns a token ID that can be
used in place of the card number for future transactions.

Authentication is done via Cloudbeds JWT

Test mode

When the property's payment gateway is in test mode, send the CB-Tokenization-Mode: test header so the card is tokenized in the test environment. Omit the header for gateways in live mode.

curl -X POST https://api.payments.cloudbeds.com/vault/v1/tokens/card \
  -H "Authorization: Bearer $TOKEN" \
  -H "X-Property-Id: 123456789" \
  -H "CB-Tokenization-Mode: test" \
  -H "Content-Type: application/json" \
  -d '{
    "card_number": "4111111111111111",
    "cvv": "123",
    "cardholder_name": "Sara Ryder",
    "expiration": { "month": "08", "year": "2028" }
  }'
Recent Requests
Log in to see full request history
TimeStatusUser Agent
Retrieving recent requests…
LoadingLoading…
Body Params

Tokenize Card Request

string
required

The full card number.

string
required

The card verification value.

string

The card brand. Supported values: VISA, MASTERCARD, AMEX, DISCOVER, etc. Defaults to VISA when omitted.

string
required

The name on the card.

expiration
object
required

Card expiration date.

billing_details
object

Billing address and contact information.

Headers
string
string
enum

Required when the property's payment gateway is in test mode; the only accepted value is test. Omit this header for gateways in live mode.

Allowed:
Response

Language
Credentials
Bearer
JWT
LoadingLoading…
Response
Click Try It! to start a request and see the response here! Or choose an example:
application/json