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

# Flow of Funds

> Two setup choices decide who holds collateral, who authorizes and settles, and what each customer needs before they can transact.

Two choices shape your integration: your program type, and your management
model. The first decides who you verify. The second decides where funds sit and
who makes the call on authorization and settlement. Both affect other products,
not just cards.

## Program type: consumer or corporate

Your program type determines who you issue to and how they're verified:

| Program type  | Who you issue to                                                      | How customers are verified                                        |
| :------------ | :-------------------------------------------------------------------- | :---------------------------------------------------------------- |
| **Consumer**  | Individuals, for example customers signing up for a branded card      | KYC on each individual                                            |
| **Corporate** | Businesses or employees, for expense management or corporate spending | KYB on the company, plus its users and ultimate beneficial owners |

## Management model: Rain-Managed or Partner-Managed

Either way, Rain provides the infrastructure underneath. What changes is how
much you run yourself:

| Management model    | What it means                                                                                                                                              |
| :------------------ | :--------------------------------------------------------------------------------------------------------------------------------------------------------- |
| **Rain-Managed**    | Rain handles the smart contract infrastructure. You deposit collateral into each customer's smart contract, and Rain manages collateralized credit limits. |
| **Partner-Managed** | You manage your own funds and collateral, without Rain's smart contracts. This was previously called Self-Managed.                                         |

### Compare the models

Here's how the two differ on the things that affect your build:

| Decision                           | Rain-Managed                                                                                                                                                                                                      | Partner-Managed                                                                                                                                        |
| :--------------------------------- | :---------------------------------------------------------------------------------------------------------------------------------------------------------------------------------------------------------------- | :----------------------------------------------------------------------------------------------------------------------------------------------------- |
| Compliance                         | Rain collects and verifies customer identity directly, including the identity document and selfie.                                                                                                                | Your company verifies customers in its own compliance program first. Rain still screens every party. See [who verifies what](/docs/who-verifies-what). |
| Collateral and funds               | Each customer's funds sit in their own collateral smart contract. The wallet address the customer provides during onboarding is an admin on that contract, so they can withdraw available collateral at any time. | All funds sit in one collateral contract per enabled chain.                                                                                            |
| Smart contract infrastructure      | Rain deploys and runs the contracts for you.                                                                                                                                                                      | Rain deploys one collateral contract per chain, and your company manages it as its reserve balance.                                                    |
| Authorization and settlement       | Rain handles both, including risk decisions.                                                                                                                                                                      | Your company sets the authorization and settlement logic, on Rain's infrastructure.                                                                    |
| Per-user wallet address            | Required. Every user needs one.                                                                                                                                                                                   | Your company handles this on its side.                                                                                                                 |
| Updating a user's wallet           | Allowed, as long as the new wallet is already an on-chain admin on all of that user's EVM collateral contracts.                                                                                                   | Not allowed once collateral contracts are live for your program.                                                                                       |
| Adding collateral                  | Your customers deposit it into their assigned smart contracts.                                                                                                                                                    | Your company adds tokens from the dashboard with a wallet or Safe.                                                                                     |
| Paying off the balance             | Nothing to pay. The collateral backs each customer's credit limit.                                                                                                                                                | Your company pays with fiat over ACH or with crypto, based on its contract.                                                                            |
| Verifying a payments account owner | Rain runs the account owner check.                                                                                                                                                                                | You verify the account owner in your own program. Rain still screens the party.                                                                        |

## What each choice changes downstream

Your program type and management model affect four areas of your build.

### Application flow

Your program type determines which application you submit to onboard a customer:

* **Consumer:** submit a consumer application to run KYC on the individual.
* **Corporate:** submit a corporate application to run KYB on the company.
  This also creates the company's first user, and every user and UBO you add
  goes through its own KYC application on top of the company's KYB.

See [Onboard a cardholder](/docs/onboard-a-cardholder) for the full flow.

### Funding

Your management model determines how you fund spending:

* **Rain-Managed:** deposit supported tokens into each user's smart contract.
  Their credit limit updates automatically once the deposit is confirmed.
* **Partner-Managed:** hold collateral in your Rain account. Rain deploys a
  collateral contract per chain that serves as your reserve balance, and you pay
  off charges by ACH or crypto.

See [Fund the card](/docs/managing-collateral) for details.

### Wallet requirements

Your management model also determines whether each user needs a wallet:

* **Rain-Managed:** each user must have a wallet address, which becomes an admin
  on their smart contract. If your users don't have wallets, you can use a
  provider such as Turnkey, Zerodev, Dynamic, or Privy to provision them.
* **Partner-Managed:** your company handles wallets on its own side.

<Warning>
  For a **Partner-Managed** program, you can't update a user's wallet address
  once collateral contracts are live. The API returns a `423 Locked` error if
  you try.
</Warning>

For a **Rain-Managed** program, update the wallet with
[update a user](/reference/users/update-a-user).

### Payments verification

Who verifies the owner of a payments account follows the same split as the table
above. See [Payments compliance](/docs/payments-compliance) for the full
picture, including transaction monitoring and on-chain screening.

## What's next

<Columns cols={2}>
  <Card title="Set up access" icon="key" href="/docs/set-up-access">
    Accept your Dashboard invite, get your API keys, and authenticate your
    requests.
  </Card>

  <Card title="Onboard a cardholder" icon="user-check" href="/docs/onboard-a-cardholder">
    Submit a KYC or KYB application and confirm approval before issuing a card.
  </Card>

  <Card title="Run a Rain-Managed program" icon="building-columns" href="/docs/rain-managed-programs">
    Find customer contracts, check credit limits, and process collateral
    withdrawals.
  </Card>

  <Card title="Run a Partner-Managed program" icon="sliders" href="/docs/partner-managed-programs">
    Add collateral and pay off your balance when your company manages funds.
  </Card>
</Columns>
