v1

latestOpenAPI 3.0.12026-07-245277551.2 MB
Card Tokenization

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

post/vault/v1/tokens/card

Headers

X-Property-Idstring

Request body

card_numberstring required

The full card number.

cvvstring required

The card verification value.

card_brandstring

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

cardholder_namestring required

The name on the card.

Example request

{
  "card_number": "4111111111111111",
  "cvv": "123",
  "card_brand": "VISA",
  "cardholder_name": "Sara Ryder",
  "expiration": {
    "month": "08",
    "year": "2028"
  },
  "billing_details": {
    "address1": "3033 5th Ave.",
    "address2": "Ste 100",
    "city": "San Diego",
    "country": "US",
    "document_number": "142-test",
    "name": "Denise Foreman",
    "postal_code": "60601",
    "phone": "1234567890",
    "state": "IL"
  }
}

Response

idstring

The UUID of the tokenized payment method.

Example response

{
  "id": "019c4d7e-4feb-73af-99f2-34c2771042f6"
}