Create token
Create a new token in the PCI DSS scope. See PCI Tokens overview for creation sources (session vs pan) and compliance levels.
Send X-Idempotency-Key to make the request safe to retry. A repeat returns the original token, or the original session ID, with Idempotent-Replayed: true instead of creating another; it never returns the security code. The card’s security code (source.security_code) is left out of the comparison, so a repeat that differs only in it replays the original. A key reused with a different request returns 422 IDEMPOTENCY_KEY_MISMATCH, and a repeat while the original runs returns 409 IDEMPOTENCY_KEY_IN_USE. A keyed request whose security code can’t be stored returns 503 CUSTODY_UNAVAILABLE and can be retried with the same key. See Idempotency.
Authorizations
Headers
Makes the write safe to retry. A repeat with the same key, by the same credential, with the same request within 24 hours returns the original outcome with Idempotent-Replayed: true instead of executing again. 1 to 255 visible ASCII characters, sent once. Must not contain card data. See Idempotency.
1 - 255^[!-~]+$"pci-token-7f3c2a9e-0001"
Body
Response
Success response
- Session
- Token
Which variant you get follows the request's source.type, and the two carry no shared tag field — tell them apart by shape.
- A
sessionsource returns the Session object (session_idonly); collect the card client-side with it, then read the token back. - A
pansource returns the Token itself.