> ## 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.

# Earning Points

> Understand how cardholders earn points and how those points move through the system.

How cardholders earn points depends on your points mode.

## Rain-Managed

Cardholders earn points automatically on posted card transactions. You do not need to call any endpoints—Rain handles earning, settlement, and minting.

### What Earns Points

* **Posted transactions** earn points based on the transaction amount and your configured rates
* **Authorizations** and unposted transactions do not earn points
* Each transaction earns points at most once (idempotency is enforced)

### Calculation

Points earned = Transaction amount (in USD cents) × Earn rate (in bips) ÷ 10,000

The earn rate is the merchant rate if one is configured, otherwise the category rate. See [Configuring Rates](/docs/rewards/configuring-rates) for details on merchant-specific overrides.

Each point equals \$0.01 face value, which is different from redemption value and is mostly used for accounting purposes. For example, a \$100 dining transaction at 200 bips (2%) earns 200 points (\$2.00 value).

### Pre-Mint Lifecycle

Points move through two states before minting:

| State       | Description               | Trigger             |
| ----------- | ------------------------- | ------------------- |
| **Pending** | Points entries created    | Transaction settles |
| **Ready**   | Points queued for minting | Statement closes    |

At liquidation, ready points are minted onchain. Both transitions are automatic. You take no action.

## Partner-Managed (Onchain)

For Partner-Managed Onchain programs, you calculate points in your own system.

### How to Calculate Points

Subscribe to `transaction.spend.completed` webhooks. When a transaction settles, calculate points based on your own rates and rules, then credit them in your ledger.

Rain does not mint or maintain cardholder point balances for Partner-Managed Onchain programs. You are the source of truth for balances, and Rain queries you only when a travel flow needs a balance check.

## Partner-Managed (Offchain)

For Partner-Managed Offchain programs, Rain calculates card-spend points from your configured earn rates, stores them in the Rain DB ledger, and finalizes them without submitting an onchain mint.

Use `POST /issuing/raindrops/mint` only for non-card adjustments such as welcome bonuses, referrals, airdrops, or manual credits. See [Manual Adjustments](#manual-adjustments) below.

## Refunds

For Rain-Managed and Partner-Managed Offchain programs, when a transaction is refunded, Rain creates negative points that net against the user's next mint batch or DB finalization cycle.

<Info>
  For Rain-Managed programs, points already minted onchain are never clawed back. A net-negative cycle carries the deficit forward to the next mint. Partner-Managed Onchain programs handle reversals in the partner ledger.
</Info>

## Manual Adjustments

Use `POST /issuing/raindrops/mint` to award adjustment points outside of card transactions. For example, you might award points for:

* Referral bonuses
* Welcome bonuses
* Airdrops
* Ad-hoc credits

Each call is idempotent on a `(type, reason)` key per user. Manual adjustments are capped at 25,000 points (\$250 face value) per call and go straight to the ready state.

The endpoint accepts `userId`, `amount`, `type`, and an optional `reason` depending on the adjustment type.

| Points Mode                    | Behavior                                                            |
| ------------------------------ | ------------------------------------------------------------------- |
| **Rain-Managed**               | Points are minted onchain at the next liquidation cycle             |
| **Partner-Managed (Onchain)**  | Returns 405 — you can mint tokens directly to user wallets          |
| **Partner-Managed (Offchain)** | Points are credited to Rain's database ledger (no onchain activity) |

<Warning>
  Do not use this endpoint to refund travel redemptions. Use the dedicated travel refund endpoint instead.
</Warning>

## Sandbox Minting Simulation

In sandbox, you can simulate points minting on demand instead of waiting for the scheduled daily liquidation job. The [Simulate raindrops minting](/reference/raindrops/simulate-raindrops-minting) endpoint advances your Pending points through minting immediately and returns `404 Not Found` in production.
