# How to collect (/fr/docs/collect)

To collect, you create a **funding account**. Caibo opens it with the local bank and returns the instructions you show your customer: a PIX code, an account to transfer to. When the bank confirms the payment, we credit it to your balance and notify you.

<Mermaid chart={`sequenceDiagram
  participant T as Your system
  participant C as Caibo Pay
  participant P as Your customer
  T->>C: POST /v1/funding-accounts
  C-->>T: 201 pending
  C-->>T: webhook funding_account.active with instructions
  T->>P: Shows the instructions
  P->>C: Pays
  C-->>T: webhook payin.completed
  T->>C: GET /v1/balances`} />

## Two ways to collect [#two-ways-to-collect]

For each method and currency, [Capabilities](/docs/capabilities) tells you which one applies (`collection`):

| `collection` | How you request it | What it's for |
| --- | --- | --- |
| `payment` | **With** `amount` | A one-time payment for an exact amount: an order, an invoice. It closes once it's paid. |
| `account` | **Without** `amount` | An account that accepts any deposit, of any amount, while it stays open. |

If you request the wrong one, the API tells you: `422 amount_required` (that pay-in needs an amount) or `422 one_payment_unavailable` (that pay-in doesn't accept an amount).

<Callout title="The payer pays the order, and nothing else">
In a one-time payment, what your customer sees is **exactly your order amount**: a 1,000.00 PEN order is paid with 1,000.00 PEN. If the bank charges a fee to receive, Caibo covers it; your customer never sees it or pays it.

Some methods carry a Caibo fee per payment (PayPal and Zelle). Your customer still pays exactly the order amount; the fee comes off what you're credited, and capabilities shows it in `fee_bps` and `fee_fixed`. See [Collect with PayPal and Zelle](/docs/collect-paypal-zelle).
</Callout>

## Funding account statuses [#funding-account-statuses]

| `status` | What it means |
| --- | --- |
| `pending` | We're opening it with the bank. |
| `active` | Ready: `instructions` contains what the payer needs. |
| `failed` | It couldn't be opened; `failure_code` tells you why. No instructions are shown. |
| `closed` | It no longer accepts deposits. A one-time payment closes when its pay-in completes. |

| Event | When |
| --- | --- |
| `funding_account.active` | The account is ready, with its instructions. |
| `funding_account.failed` | It couldn't be opened. |
| `payin.completed` | A payment came in and was credited to your balance. |
| `payin.failed` | A payment didn't go through (for example, it expired unpaid). |

## Where the money ends up [#where-the-money-ends-up]

Each pay-in is credited to your balance in its `settlement_currency`: the settlement currency that capabilities indicates (`settlement_asset`) or the one you choose from `settlement_currencies`. There's no intermediate stage: the money is recorded only once the bank confirms, and at that point it's already **available**.

<Cards>
  <Card title="Collect an exact amount" href="/docs/collect-one-payment">PIX in Brazil, bank transfer in Peru.</Card>
  <Card title="Collect with PayPal and Zelle" href="/docs/collect-paypal-zelle">USD, with Caibo's fee and your range.</Card>
  <Card title="Credited pay-ins" href="/docs/payins">The payin resource and its statuses.</Card>
</Cards>
