// API Reference

Vault

Store a card and receive its vault token.

How card data reaches the vault

In production integrations, card data never transits your servers. It reaches Card Vault through one of the secure capture surfaces:

POST /v1/vault

The SDK vault endpoint. Card fields arrive encrypted by the SDK's field-level encryption (RSA-OAEP against the account's SDK public key) -- the values below are produced by the SDK's secure fields, not assembled by your code.

REQUESTHTTP
POST /v1/vault
Authorization: Bearer <session JWT>
Content-Type: application/json

{
  "encryptedPan":    "<SDK secure field>",   // required
  "encryptedExpiry": "<SDK secure field>",   // required, MM/YY
  "encryptedCvv":    "<SDK secure field>",
  "encryptedName":   "<SDK secure field>",
  "usageCode":       0,            // card usage; see Card usage & lifecycle
  "usageExpiry":     "2027-03-31", // optional authorization window
  "segmentCode":     "PROP-A",     // optional; targets a segment
  "fullName":        "Jamie Cardholder",
  "company":         "Acme Stays",
  "email":           "jamie@example.com",
  "phone":           "5555550100",
  "notes":           "Booking #4821"
}

Vaulting runs the full validation pipeline: PAN format and Luhn check, and -- when card verification is enabled on your account -- a zero-value network verification before the card is accepted.

RESPONSE200
{
  "token":  "<vault token>",   // store this; see Tokens
  "brand":  "visa",
  "last4":  "1111",
  "expiry": "12/28"
}

Errors

Errors follow RFC 7807 problem+json with a machine-readable type.

Which token comes back? The vault call returns the long vault token. To charge the card later you use its short charge token -- see Tokens for why the two exist and how to avoid the classic 404.