Skip to main content
POST
Simulate a card authorization

Authorizations

Api-Key
string
header
required

Body

application/json

Card authorization simulation request

cardId
string<uuid>
required

The Rain card ID to authorize against. Must belong to the calling tenant.

amount
integer
required

The transaction amount in cents (merchant currency). Must be a positive integer.

Required range: x >= 1
currency
string
required

The merchant currency code (for example, USD, EUR, GBP).

merchantName
string
required

The merchant name.

merchantCategoryCode
string
required

The merchant category code (MCC). For example, 5814 for fast food restaurants.

declineReason
enum<string>

Simulate a declined authorization.

Available options:
account_credit_limit_exceeded,
card_locked,
card_canceled,
card_not_activated,
blocked_mcc,
blocked_merchant,
balance_inquiry_not_permitted,
expiry_mismatch,
cvv_mismatch,
invalid_pin,
restricted_country

Response

Successful operation

transactionId
string<uuid>
required

The transaction ID.

status
enum<string>
required

The transaction status.

Available options:
authorized,
declined,
settled
declinedReason
string

Present when status is declined. The reason for the decline.

completionReason
enum<string>

Present when status is settled. Either SETTLEMENT or REFUND.

Available options:
SETTLEMENT,
REFUND