One balance. Earn rewards, spend instantly on a card. No transfers, no second wallet.
Rain offers two program models. EarnOS uses partner-managed so users see a single spendable balance — no manual funding step.
User earns rewards. The ledger credits them. The app shows one number.
Completes missions, referrals, or other verified actions. Rewards are credited to their Turnkey-held payout account.
The payout account emits a credit event. The EarnOS ledger records it, increasing the user's available balance.
The EarnOS app queries the ledger and displays a single number. No "wallet balance" vs "card balance" split.
User taps their card. Rain asks EarnOS to approve or decline in real time.
User presents their Rain-issued card at a merchant terminal. A standard card authorization is initiated.
The card network routes the auth request to Rain. In partner-managed mode, Rain does not decide — it forwards to EarnOS.
transaction.requested webhookRain sends a webhook to the EarnOS card handler. The handler now has a short window to respond.
The handler queries the unified ledger. If available ≥ amount, it places an auth hold (reducing available balance) and responds approve. Otherwise, decline.
Rain relays the approve/decline to the card network. The merchant terminal shows the result. The app balance now reflects the hold.
Merchant changes the amount — tips, partial reversals, incremental auths.
transaction.updated webhookRain notifies EarnOS of an amount change. Could be a tip added at a restaurant, a partial reversal, or an incremental authorization.
The handler increases or decreases the existing auth hold to match the new amount. Available balance is recalculated.
The transaction settles (typically 1–3 days). The hold becomes a real debit.
transaction.completed webhookRain notifies EarnOS that the transaction has settled on the card network. The final amount may differ slightly from the auth amount.
The auth hold is released. A final settled debit for the exact settlement amount is posted to the ledger. Transaction history is updated.
The app shows the new available balance and the completed transaction in the user's spending history.
Rain still requires a program-level reserve to back settlement on the card network. This runs independently of user actions.
The treasury watches the Rain program reserve balance. When it falls below threshold, treasury tops it up.
The Rain program reserve is shared, program-level collateral — not per-user. It ensures Rain can settle card transactions on the network.
This is a shared balance at the product/ledger layer, not a single custody pool inside Rain. Fund collection from Turnkey payout accounts happens after settlement, not at auth time. The ledger tracks the obligation; treasury operations reconcile actual fund movement.
The ledger maintains three values per user. The app displays "available" as the single balance.
User rewards sit in Turnkey-held payout wallets. Here's how EarnOS interacts with those wallets for card settlement without breaking the non-custodial model.
No.
Turnkey's Delegated Access model lets EarnOS create a backend-controlled "Delegated Account" inside each user's sub-organization. This account is not a root user — it's constrained by policies that limit it to specific actions (e.g., signing transfers only to a whitelisted EarnOS settlement address).
It's a delegated/hybrid model: non-custodial at the key layer (user owns keys), with policy-scoped signing authority for EarnOS to collect settled funds.
Using Delegated Access + Turnkey policies, EarnOS can programmatically sign transfer transactions from user wallets after Rain confirms settlement — without the user needing to approve each one.
When onboarding a user, EarnOS creates their Turnkey sub-organization with two users: the end-user (root, passkey-authenticated) and a Delegated Account (API-key, non-root). A policy is attached restricting the delegated account to signing transfers only to EarnOS's settlement address.
transaction.completedA card transaction settles on the network. Rain notifies EarnOS with the final settled amount. The ledger releases the hold and posts the settled debit.
EarnOS backend uses the delegated API key to sign a transaction moving the settled amount from the user's Turnkey wallet to the EarnOS omnibus wallet. Turnkey's policy engine verifies the destination matches the whitelisted settlement address before signing.
The signed transaction is broadcast on-chain. Funds move from the user's wallet to EarnOS's omnibus wallet. The user can verify every collection on the blockchain.
{
"effect": "EFFECT_ALLOW",
"consensus": "approvers.any(user,
user.id == '<DELEGATED_ACCOUNT_ID>')",
"condition": "activity.action == 'SIGN'
&& wallet.id == '<USER_WALLET_ID>'
&& eth.tx.to == '<EARNOS_SETTLEMENT_ADDR>'"
}
The delegated account can only sign transactions sending to EarnOS's settlement address. Any other destination is rejected by the enclave.
Rain requires a program-level reserve to settle card transactions. The question is where the capital comes from. There are two viable models.
EarnOS fronts its own capital into the Rain reserve. User funds stay in individual Turnkey wallets until after settlement, then are collected to replenish treasury.
transaction.completed
When a user earns rewards, funds are immediately swept from their Turnkey wallet to the EarnOS omnibus wallet via Delegated Access. The omnibus wallet funds the Rain reserve. Zero separate treasury capital needed.
The Turnkey wallet is still non-custodial at the key layer — the user owns their keys and can export/revoke at any time. But practically, funds flow through it into the omnibus pool as soon as they're earned. The EarnOS ledger is the source of truth for each user's balance, and the omnibus wallet is the source of truth for actual funds. This is the same model every major fintech card program uses.
How much capital does EarnOS need to float in the Rain reserve? Drag the sliders to model different scenarios.
$25 avg balance, 15% active, $8/day spend, 2-day settlement, 1.5x buffer
| Users | Total Balances | Daily Volume | A: Treasury Float | B: Sweep (Treasury) | B: Coverage |
|---|
The user earns into Turnkey, spends via Rain, and sees one number in the app. EarnOS's ledger and webhook handler are the glue — approving transactions against earned balance in real time, then collecting funds post-settlement through Turnkey's Delegated Access, all without the user ever moving money between accounts or giving up custody of their keys.