Skip to main content
POST
Create a card

Authorizations

X-API-Key
string
header
required

User API key authentication. Create a key under Settings → API keys in the Slash dashboard (https://app.slash.com/global-settings/api-keys) and send the x-legal-entity header naming the legal entity to act on with every request. Keys scoped to a legal entity are rejected with 403 user_api_key_required.

Headers

X-Idempotency-Key
string
required

Unique caller-generated key for one create request. Once an authenticated, schema-valid request reaches the operation, the key is permanently consumed for that operation and legal entity whether the operation succeeds or fails. Reusing it in that scope returns 409 and never replays a response, unlike API v1, which replays the original response for a matching key.

Required string length: 1 - 255

The legal entity to act on. Required on every request; a user API key can act on any legal entity its user has access to.

Pattern: ^le_[a-zA-Z0-9]+$

Body

application/json
type
enum<string>
required
Available options:
virtual
name
string
required
Required string length: 1 - 255
Example:

"Ads – Meta"

cardholderUserId
string
required

The user who holds the card, from GET /v2/users.

Example:

"u_2rj4l7hmrrrcv"

accountId
string

The account to issue from. Required when the legal entity has more than one card account.

Example:

"sa_group_2rj4l7hmrrrcv"

virtualAccountId
string

Defaults to the account's primary virtual account.

Example:

"subaccount_2rj4l7hmrrrcv"

cardGroupId
string
Example:

"card_group_2rj4l7hmrrrcv"

cardProductId
string

From GET /v2/card-products. Defaults to the account's.

Example:

"card_product_2rj4l7hmrrrcv"

controls
CardControls · object

What the card may spend. The controls of its card group apply too. Replaced whole on update; null clears it.

Example:
billingAddress
Address · object

The address address verification (AVS) checks.

singleUse
boolean

Close the card after its first transaction.

Response

The card.

A virtual or physical card. Its number and security code are only available from GET /v2/cards/{cardId}/details.

id
string
required

Card id with the c_ prefix.

Example:

"c_2rj4l7hmrrrcv"

type
enum<string>
required
Available options:
virtual,
physical
status
enum<string>
required

pending: being issued, or waiting for a physical card's fee. awaiting_activation: a physical card its holder has not activated. active: approves authorizations. paused: declines them. inactive: deactivated by Slash or the issuer; can only be closed. closed: permanent.

Available options:
pending,
awaiting_activation,
active,
paused,
inactive,
closed
name
string
required
Example:

"Ads – Meta"

accountId
string
required

Account id with the sa_group_ prefix.

Example:

"sa_group_2rj4l7hmrrrcv"

singleUse
boolean
required

Whether the card closes after its first transaction. Virtual cards only.

createdAt
string<date-time>
required
last4
string

Absent on physical cards until they are activated.

Example:

"4242"

expiryMonth
integer
Example:

9

expiryYear
integer
Example:

2030

virtualAccountId
string

Virtual account the card spends from, with the subaccount_ prefix.

Example:

"subaccount_2rj4l7hmrrrcv"

cardGroupId
string

Card group id with the card_group_ prefix.

Example:

"card_group_2rj4l7hmrrrcv"

cardProductId
string

Card product id with the card_product_ prefix.

Example:

"card_product_2rj4l7hmrrrcv"

cardholderUserId
string

The user who holds the card, with the u_ prefix.

Example:

"u_2rj4l7hmrrrcv"

controls
CardControls · object

What the card may spend. The controls of its card group apply too. Replaced whole on update; null clears it.

Example:
billingAddress
Address · object

The address checked by address verification (AVS). Absent when the legal entity's address is used.

physical
object

Present on physical cards.

closedReason
enum<string>
Available options:
no_longer_needed,
lost_or_stolen,
never_arrived,
damaged,
closed_by_slash
closedAt
string<date-time>