> ## Documentation Index
> Fetch the complete documentation index at: https://rain-sandbox-trial.mintlify.site/llms.txt
> Use this file to discover all available pages before exploring further.

# Authorization, Declines & Risk Rules

> This page outlines the authorization codes, common decline reasons, and risk prevention rules enforced by Rain before and during transaction processing.

Before and during transaction processing, Rain runs a series of checks to prevent fraud and enforce your controls. This page lists the common decline reasons Rain returns, the authorization codes it uses, the risk rules it enforces by default, and the merchant categories and merchants it blocks.

## Decline reasons

Declines can occur for several reasons, including system rules, card limits, and webhook responses. Here is a list of these reasons:

| Decline Reasons                        |
| -------------------------------------- |
| invalid\_pin\_attempt\_limit\_exceeded |
| account\_credit\_limit\_exceeded       |
| card\_spending\_limit\_exceeded        |
| scoped\_daily\_spend\_limit\_exceeded  |
| scoped\_card\_expired                  |
| scoped\_card\_mcc\_not\_allowed        |
| merchant\_scope\_mismatch              |
| webhook\_declined                      |
| webhook\_timeout                       |
| issuer\_unavailable                    |
| card\_canceled                         |
| card\_locked                           |
| card\_not\_activated                   |
| blocked\_merchant                      |
| blocked\_mcc                           |
| blocked\_entity                        |
| balance\_inquiry\_not\_permitted       |
| transaction\_declined\_by\_rules       |
| transaction\_declined\_by\_risk\_rules |
| expiry\_mismatch                       |
| cvv\_mismatch                          |
| invalid\_pin                           |
| restricted\_country                    |
| suspicious\_transaction                |

<Info>
  `declinedReason` isn't limited to this list: some declines carry the
  processor's own description or a risk rule's description verbatim, so treat
  unrecognized values as a decline with a free-form reason rather than an
  error.
</Info>

## Authorization codes

Rain uses specific authorization codes to classify the context and status of each transaction. Here are some commonly encountered codes:

| Code | Meaning                                              |
| ---- | ---------------------------------------------------- |
| 00   | Normal presentment                                   |
| 01   | Customer not present                                 |
| 02   | Unattended terminal - card can be retained           |
| 03   | Merchant suspicious                                  |
| 05   | Customer present, card not present                   |
| 06   | Pre-authorized request                               |
| 07   | Telephone device required                            |
| 08   | Mail/telephone order                                 |
| 09   | POS security alert                                   |
| 10   | Customer identity verified                           |
| 11   | Suspicious Activity                                  |
| 12   | Security reasons                                     |
| 13   | Representation of item                               |
| 14   | Public utility terminal                              |
| 15   | Customer’s terminal                                  |
| 16   | Administrative terminal                              |
| 17   | Returned item                                        |
| 18   | No check in envelope - return                        |
| 19   | Deposit out of balance - return                      |
| 20   | Payment out of balance - return                      |
| 21   | Manual reversal                                      |
| 22   | Terminal error - counted                             |
| 23   | Terminal error - not counted                         |
| 24   | Deposit out of balance - apply                       |
| 25   | Payment out of balance - apply                       |
| 26   | Withdrawal error - reversed                          |
| 27   | Unattended terminal - card cannot be retained        |
| 51   | Request for account number verification              |
| 59   | E-commerce request through public network            |
| 71   | Card present, magnetic stripe unreadable (U.S. only) |

## Risk rules

Rain enforces automatic risk detection rules to prevent high-risk or suspicious transactions. Each rule includes a time window and trigger threshold:

| Rule Name                       | Description                                                                                                                         | Time Window | Trigger Threshold |
| ------------------------------- | ----------------------------------------------------------------------------------------------------------------------------------- | ----------- | ----------------- |
| Blocked Country                 | Decline all transactions at blocked countries                                                                                       | Immediate   | N/A               |
| High Risk MCC                   | Decline transactions with high-risk MCCs                                                                                            | Immediate   | N/A               |
| High Risk E-commerce            | Decline transactions with flagged online merchants                                                                                  | Immediate   | N/A               |
| E-commerce Rapid Transaction    | E-commerce transaction burst prevented, more than 2 transactions were attempted within a 5-minute period                            | 5 Minutes   | 2 Transactions    |
| Card-present Rapid Transaction  | Card-present transaction burst prevented, more than 2 transactions were attempted within a 5-minute period                          | 5 Minutes   | 2 Transactions    |
| Card-not-present Daily Velocity | Card-not-present transaction daily limit reached, more than 11 card-not-present transactions attempted within a 24-hour period      | 24 Hours    | 11 Transactions   |
| Fuel Authorization Hold         | Authorize fuel (MCC 5542) transactions at a minimum \$175 hold; the difference is released at settlement                            | Immediate   | \$175 USD hold    |
| Gaming Limit                    | Decline single video game/digital goods (MCC 5816/7994) transaction above \$2,000                                                   | Immediate   | \$2,000 USD       |
| Gaming Velocity                 | Decline if more than 25 gaming transactions within 2 days                                                                           | 2 Days      | 25 Transactions   |
| Ad Services Limit               | Decline single advertising services (MCC 7311) transaction above \$10k                                                              | Immediate   | \$10,000 USD      |
| Ad Services Velocity            | Decline if more than 40 advertising services (MCC 7311) transactions within 24 hours                                                | 24 Hours    | 40 Transactions   |
| CVV Security                    | Block transaction after 4 incorrect CVV attempts within a 24-hour period                                                            | 24 Hours    | 4 Transactions    |
| ATM Withdrawal Limit            | Block ATM Withdrawal (MCC 6011) transaction exceeding \$250.                                                                        | Immediate   | \$250 USD         |
| ATM Withdrawal Velocity         | Block ATM Withdrawal (MCC 6011) transaction velocity limit reached, more than 3 transactions were attempted within a 24-hour period | 24 Hours    | 3 Transactions    |

## Blocked merchant categories and merchants

Rain blocks certain merchant category codes and specific merchants by default.
The canonical lists live on
[Blocked MCCs and merchants](/docs/blocked-mccs-and-merchants); this page
doesn't duplicate them so they can't drift apart.

## What's next

<Columns cols={3}>
  <Card title="3-D Secure" icon="shield-halved" href="/docs/3ds">
    Forward 3-D Secure challenges to cardholders for online transactions.
  </Card>

  <Card title="Blocked MCCs and merchants" icon="ban" href="/docs/blocked-mccs-and-merchants">
    Review the merchant categories and merchants Rain blocks by default.
  </Card>

  <Card title="Handle disputes and refunds" icon="scale-balanced" href="/docs/transaction-issues-disputes">
    File disputes, track their status, and process refunds.
  </Card>
</Columns>
