Skip to main content
POST
Create a scoped card for a user

Authorizations

Api-Key
string
header
required

Headers

sessionid
string
required

Encrypted session ID for retrieving the encrypted card details

Minimum string length: 1

Path Parameters

userId
string<uuid>
required

ID of the user to create a scoped card for

Body

application/json

Scoped card configuration

amountInUSDCents
integer
required

The desired spending limit in USD cents. By default, a 1.2x ceiling is applied to buffer for authorization holds (configurable during onboarding).

Required range: x >= 1
bufferPercentage
integer

Spend headroom over amountInUSDCents, in whole percent. Omit for the default of 20. Set 0 to disable the buffer so the card's limit equals the amount exactly.

Required range: 0 <= x <= 20
binType
enum<string>

BIN the card is issued on. Defaults to consumer. commercial requires corporate card issuance to be enabled for your tenant.

Available options:
consumer,
commercial
expiresAt
string<date-time>

Optional absolute expiry (ISO-8601 with UTC offset, at most 365 days in the future). After this time Rain declines new authorizations on the card; refunds and other credits are exempt.

allowedMccs
string[]

Optional merchant-category allow-list of four-digit MCCs. Authorizations at merchants outside the list are declined with reason scoped_card_mcc_not_allowed; refunds and other credits are exempt.

Minimum array length: 1
Pattern: ^[0-9]{4}$
allowedMerchants
string[]

Optional merchant allow-list of up to 25 merchant names (each at most 64 characters after trimming; no duplicates or blank entries). Rain matches each authorization's merchant name against the list and declines non-matching merchants with reason merchant_scope_mismatch. Matching is a best-effort name match, and refunds, other credits, and $0 account verifications are exempt.

Required array length: 1 - 25 elements
Required string length: 1 - 64

Response

Successful operation

id
string<uuid>
required

The card ID. Can be used to retry the /issuing/cards/{cardId}/secrets endpoint if the initial encrypted details retrieval fails.

encryptedPan
object
required

The encrypted PAN

encryptedCvc
object
required

The encrypted CVC

last4
string
required

The last 4 digits of the card number

expirationMonth
string
required

The card's expiration month

expirationYear
string
required

The card's expiration year

status
enum<string>
required
Available options:
notActivated,
active,
locked,
canceled