Skip to navigation

Create a card

Creates a virtual or physical card with its spending limits on a card program: the one cardProgramId names, or your default program, the financial account whose default is true. The program’s financial account must be ACTIVE; a default program that cannot issue cards is refused by its ID.

A card for an account holder that is PENDING or PENDING_REVIEW, or sent without cardProgramId while the default program is still PENDING, is held: the response is 202 with the card PENDING. It is issued, with card.updated, once the account holder and the program are ACTIVE, and canceled, with card.canceled, if it can no longer be issued, for example once the program is closed. An account holder that is DECLINED or INACTIVE is refused with NOT_ELIGIBLE. A program named in cardProgramId must be active itself; one that is not is refused with NOT_ELIGIBLE, unless its issuer has not yet decided its application.

Send userId to issue the card to an existing user, or user to name the cardholder inline, and exactly one of them:

  • A user of the account holder with the same email holds the card as they are. A firstName or lastName that differs from theirs is refused with VALIDATION_FAILED, naming the field.
  • Otherwise the user is created as a CARDHOLDER, as POST /users creates one, with a user.created event. To give them another role, create the user with POST /users first.

Sending user also needs users:write; its dateOfBirth, address, verificationRoles and ownershipBps also need users:verify.

The user must be active, and a person on the account for identity verification only cannot hold a card. A card for a person needs their phone number, date of birth, email and address. The card terms are accepted on the user’s behalf when they have not accepted them yet.

The card cannot be used until it is saved with its limits. The response is 202 with the card as saved: a virtual card is PENDING until it is activated, which follows within seconds; a physical card is INACTIVE until its holder activates it. Retry with the same Idempotency-Key after a timeout or a 502: the card is created once, on the same program and for the same user.

A request waits while another card is being issued to the same user; past that wait it answers 503 with Retry-After and creates nothing. It answers the same while the issuer is still activating card issuing on the program’s financial account, or has not yet decided the application of a program named in cardProgramId, whose readiness is then VERIFICATION_IN_REVIEW, APPLICATION_PENDING or ACTION_REQUIRED. Retry any of these with the same Idempotency-Key. A request that left the program or the user to be resolved answers 502 instead once it has added the user or their cardholder, and the card is created on what it resolved.

extend adds cardToken or cardDetails as GET /cards/{cardId} does, with the same permissions; a program whose issuer cannot reveal them is refused before the card is issued. The response then waits up to 5 seconds for the card to be ACTIVE and shows it as it is then. A card that is not active by then, such as a physical card, is answered without them. A retry with the same Idempotency-Key answers the card as saved, without cardToken or cardDetails; read them with GET /cards/{cardId}.

Authentication

AuthorizationBearer

Access token from POST /access-token. Valid for at most 30 minutes.

Headers

Account-HolderstringOptionalformat: "^[A-Za-z0-9_-]+$"1-128 characters

The account holder a platform API key acts on. Platform keys must send it on account holder operations. A company API key acts on its own account holder; it may omit the header or send its own account holder ID.

Idempotency-KeystringRequiredformat: "^(?:[!#-~][!-~]{0,254}|"[!#-\[\]-~]{1,255}")$"1-257 characters

Your unique key for this operation: 1 to 255 visible ASCII characters, ideally a new UUID v4 for each operation. A value in double quotes is accepted and the quotes are removed. Retrying with the same key and the same request returns the first response with Idempotent-Replayed: true; the same key with a different request is refused with IDEMPOTENCY_KEY_REUSED. A key can be used again 30 days after its operation completes.

X-Request-IdstringOptionalformat: "^[A-Za-z0-9._:-]+$"1-128 characters

Your own correlation ID for this request. It is recorded with the request. The X-Request-Id response header is always generated by the server.

Query parameters

extendlist of enumsOptional

Members to add to the card once it is active. cardDetails needs the cardDetails:reveal permission. Repeat the parameter for both.

Allowed values:

Request

This endpoint expects an object.
typeenumRequired

A physical card is shipped to the user’s address. It is refused with VALIDATION_FAILED while the account holder’s business.cardName is longer than 23 characters.

Allowed values:
policyobjectRequired
A card has at least one limit.
userIdstringOptionalformat: "^[A-Za-z0-9_-]+$"1-128 characters

An existing user who holds the card. Alternative to user.

userobjectOptional

The card’s user, named inline. Alternative to userId. A user of the account holder with this email holds the card as they are; a firstName or lastName that differs from theirs is refused. Otherwise the user is added as a CARDHOLDER, as POST /users adds one, with a user.created event. Needs users:write.

cardProgramIdstringOptionalformat: "^[A-Za-z0-9_-]+$"1-128 characters
The card program the card is issued on, from the account holder's own programs. Without it, the card is issued on the account holder's default program.
nicknamestringOptional1-100 characters
Your label for the card.
shippingSpeedenumOptional

How a physical card ships. Without it, the issuer picks the speed. EXPRESS depends on the account holder’s plan.

Allowed values:
commentstringOptional1-1000 characters
A comment saved on the card. The cardholder is notified.
termsAcceptanceobjectOptional

How the card’s user accepted the card terms in your application, recorded when they have not accepted them yet. Without it, the IP address and User-Agent of this request are recorded.

Response headers

X-Request-Idstringformat: "uuid"
Unique ID of this request. Quote it when you contact support.
RateLimitstringOptional

Remaining budget for each rate limit policy, for example "burst"; r=57; t=6 (requests remaining and seconds until the window resets).

RateLimit-PolicystringOptional

The rate limit policies applied to this request, for example "burst"; q=60; w=10 (requests allowed per window of seconds).

Locationstring

Path of the resource, relative to the API host, for example /api/v2/embeddedSessions/0b6f3c1e-5d2a-4c8e-9a71-3f4d2e1b6c90.

Idempotent-ReplayedenumOptional

Sent as true when this response repeats the first response to the same Idempotency-Key. A replay keeps the first response’s status and body, including the requestId of a problem; X-Request-Id is new.

Allowed values:

Response

The card as saved; a virtual card is activated right after. With extend, the card once active, with the members asked for.

idstringformat: "^[A-Za-z0-9_-]+$"1-128 characters

A resource ID. Treat it as an opaque, case-sensitive string.

object"card"

Always card.

livemodeboolean

true on a live platform in production, false on a Sandbox platform and outside production.

accountHolderIdstringformat: "^[A-Za-z0-9_-]+$"1-128 characters

A resource ID. Treat it as an opaque, case-sensitive string.

userIdstringformat: "^[A-Za-z0-9_-]+$"1-128 characters

A resource ID. Treat it as an opaque, case-sensitive string.

typeenum

VIRTUAL and PHYSICAL cards are issued on a card program. An EXTERNAL card was added from an account at another bank, which issues it, sets its limits and services it; it changes here only and publishes no events.

Allowed values:
statusenum

PENDING until the card is issued and activated, INACTIVE while a physical card waits for its holder to activate it or after it was turned off as lost or stolen. statusReason tells these apart.

Allowed values:
policyobject

Spending limits in the account holder’s currency, and the card’s other spending controls. Each limit is at least the narrower ones: transaction, daily, weekly, monthly, then total. A control that is not set is absent. Where the card was issued with a limit tolerance, an authorization slightly above a limit may still be approved; the limits read back here are always the ones that were set.

createdAtdatetime
When the card was created.
updatedAtdatetime
When the card last changed.
cardProgramIdstringOptionalformat: "^[A-Za-z0-9_-]+$"1-128 characters

The card program the card is issued on. Absent on an EXTERNAL card.

statusReasonenumOptional

Why the card is PENDING or INACTIVE; absent in any other status. ISSUING: being issued and activated. DRAFT: added but not issued. AWAITING_ACTIVATION: a physical card waiting for its holder to activate it. DEACTIVATED: turned off, for example as lost or stolen.

Allowed values:
nicknamestringOptional
Your label for the card. Absent when not set.
last4stringOptionalformat: "^[0-9]{4}$"
Last four digits of the card number. Absent until the card is issued.
networkenumOptional
Card network.
Allowed values:
expirationMonthintegerOptional1-12
The month the card expires, 1 to 12. Absent until the card is issued.
expirationYearintegerOptional
The year the card expires. Absent until the card is issued.
activatedAtdatetimeOptional

When the card first became ACTIVE. Absent until it has.

replacementobjectOptional
replacementForCardIdstringOptionalformat: "^[A-Za-z0-9_-]+$"1-128 characters

A resource ID. Treat it as an opaque, case-sensitive string.

fulfillmentobjectOptional
walletTokenslist of objectsOptional
Apple Pay and Google Pay tokens for this card.
pendingChangeobjectOptional

A change to the card that is still in progress, or whose outcome is still being confirmed with the card issuer. Present only while it is; until it resolves, every other change to the card is refused with SERVICE_UNAVAILABLE.

cardTokenobjectOptional

Only on GET /cards/{cardId} with extend=cardToken: what the issuer’s card display SDK needs to show the card details in the cardholder’s browser or app. The embedded card viewer takes it unchanged.

cardDetailsobjectOptional

Only on GET /cards/{cardId} with extend=cardDetails. Never store or log these values.

userobjectOptional

The card’s user, with extend=user.

accountHolderobjectOptional

The card’s account holder, with extend=accountHolder.

cardProgramobjectOptional

The card’s program, with extend=cardProgram. Its financial account has the same ID.

Errors

400
Bad Request Error
401
Unauthorized Error
403
Forbidden Error
409
Conflict Error
413
Content Too Large Error
415
Unsupported Media Type Error
422
Unprocessable Entity Error
429
Too Many Requests Error
500
Internal Server Error
502
Bad Gateway Error
503
Service Unavailable Error