Skip to main content
POST
Register a card

Authorizations

Authorization
string
header
required

Token from POST /auth/token

Headers

Idempotency-Key
string
required

Required on POST and PUT requests. Use a unique value per logical mutation attempt, for example a UUID.

Body

application/json

Register a card as a customer-owned External Account, via the dedicated POST /external-accounts/cards endpoint. Cards are always customer-owned, so customerId is supplied directly here (no owner discriminator). The owner must be an individual customer, and the cardholder name is always that customer's firstName and lastName (a name the card issuer cannot accept fails with 422 cardholderNameInvalid). The card number and CVV live under details, using aliases in VGS-enabled environments or test digits in sandbox environments with VGS disabled. brand and cardType are derived server-side from the card number and are not accepted on the request.

customerId
string
required

Owning customer ID (cst_ prefix). Cards must be customer-owned.

details
object
required

Card number and CVV plus expiry (write-only); see CardCreateDetails for VGS-enabled and sandbox test-input requirements.

webSessionId
string
required

SDK risk session paired with deviceFingerprint. Required, 1–1024 printable non-space ASCII characters in every environment, including sandbox. Forwarded unchanged; write-only, never returned.

Required string length: 1 - 1024
Pattern: ^[!-~]+$
deviceFingerprint
string
required

SDK device fingerprint paired with webSessionId. Required, 1–1024 printable non-space ASCII characters in every environment, including sandbox. Forwarded unchanged; write-only, never returned.

Required string length: 1 - 1024
Pattern: ^[!-~]+$
billingAddress
object

Card billing address (issuer AVS / fraud). Optional: when omitted, the owning customer's address is used (see billingAddressSource).

label
string
metadata
object

Response

The request has succeeded and a new resource has been created as a result.

A saved payment destination registered for a customer or one of their counterparties. Write-only secrets (full account number, full IBAN) are never present on reads, only their last-4 renderings.

customer
object
required

The customer the account is registered for, also when one of their counterparties owns it.

details
object
required

The account's type-specific values.

id
string

External Account ID (ext_ prefix).

Pattern: ^[a-z]+_([0-9a-hjkmnp-tv-z]{26}|[0-9a-f]{8}-[0-9a-f]{4}-[0-9a-f]{4}-[0-9a-f]{4}-[0-9a-f]{12})$
type
enum<string>

The account type; decides which details keys are present.

Available options:
bankUs,
bankIban,
bankCanada,
card,
walletExternal
owner
object

The counterparty that owns the account. Left out when the account is the customer's own.

asset
string

usd on bank accounts and cards. Left out on wallets, which list their assets in supportedDestinations.

supportedDestinations
object[]

Where this account can be paid, computed per account. A US bank account lists the rails it can receive on, narrowed by what your project and the platform enable; an account Erebor Bank, N.A. provisions reports ach, achSameDay and wire, so a missing rtp there means unverified, not refused. A wallet lists usdc and usdt on each network its family serves. Left out for IBAN and Canadian bank accounts and cards.

unavailableDestinations
object[]

US bank accounts: rails the project has turned on that this account cannot be paid over, each with its reason.

status
enum<string>

Current lifecycle status. A transition to invalid always fires the externalAccount.statusChanged webhook.

Available options:
active,
pending,
rejected,
invalid,
deleted,
failed
failure
object

Why the account failed, was rejected or became invalid. Present only when status is failed, rejected or invalid.

label
string

Optional display label.

metadata
object

Free-form key-value pairs supplied at creation or update.

createdAt
string<date-time>

When the external account was registered.

updatedAt
string<date-time>

When the external account was last updated.