Create a card
Issues a new card on a card program: the one cardProgramId names, or your default program. Two flavors, set by that program:
- Business Card (
cardholderType: BUSINESS) — the company is the cardholder. Send a minimaluserblock:firstName,lastName,email. - Authorized User Card (
cardholderType: AUTHORIZED_USER) — the card is issued to a person. Send the fulluserblock:firstName,lastName,email,phone,address,birthdate,title.
Pass userId instead of user to attach the card to an existing user. New users are provisioned as Cardholders — to set a different role, create the user via the user API first.
The cardholder terms are accepted on the user’s behalf as part of this
request, so the card is issued immediately. For a new user, send
user.ipAddress and user.userAgent so the acceptance is recorded
against the end user. When they are omitted, or when attaching an
existing user by userId, the acceptance is recorded with the address
and user agent of the API caller.
Pass ?extend=cardToken to include an ephemeral cardToken in the
response for revealing the new card’s sensitive details client-side.
Pass ?extend=cardDetails to include the full card number, CVV and
expiration in the response. Full card details are available only on
supported card issuers; on other issuers the request fails with 422.
Either expansion needs the new card to be ACTIVE. A card that is not
active after creation, such as a PENDING card while your account is
still being activated or an ISSUED physical card awaiting activation,
is returned as is without cardToken or cardDetails. Retrieve it
with extend once it is active.
Requires Admin role.
Authentication
A short-lived access token from POST /api/v1/access-token (30
minutes by default). Send as Authorization: Bearer <jwt>.
Query parameters
Pass cardToken for an ephemeral key that reveals sensitive card details client-side, or cardDetails for the full card number, CVV and expiration in the response.
Request
The card program to issue against, from GET /api/v1/card-programs. Omit to use the company’s default program.
Shipping speed for a physical card. Only valid when type is PHYSICAL; sending it with a non-physical card is rejected. When omitted, the card ships at the default speed.
The spending controls applied to a card. At least one spending limit (transaction, daily, monthly, or total) must be specified when creating a card.
Provision a new cardholder for this card. Mutually exclusive with userId.
The ID of an existing user on your company. Mutually exclusive with user.
Response
The masked card number (last 4 digits only).
The spending controls applied to a card. At least one spending limit (transaction, daily, monthly, or total) must be specified when creating a card.
Credentials for revealing sensitive card details client-side. Returned only when extend=cardToken is requested.
The full card number, CVV and expiration. Returned only when extend=cardDetails is requested. This is cardholder data; never log or store it.