# Payment accounts

A payment account holds money for one of your customers. You own the account and the customer relationship, and you build the app. Glomo holds the funds, runs the compliance checks and moves the money.

With payment accounts you can:

- Open an account for each customer when you create the customer.
- Let the customer add funds with a card payment.
- Show the customer their balances and statement.
- Send money from the account to the customer's beneficiaries.


To build the integration, follow [Run payment accounts for your customers](/payment-accounts/set-up).

## How the API is scoped

Every call after onboarding goes to a path under `/v1/payment-accounts/{payment_account_id}`. The path names the account, so a call reads or changes that account only, and every list returns that account's records only. A request body never carries a payment account ID.

You see only the accounts you own. An account that you do not own returns `404`, the same as an account that does not exist.

## Account status

| Status | Meaning |
|  --- | --- |
| `draft` | The account is open but waits for the customer's consent. It cannot receive funds or send payouts. |
| `active` | The account can receive funds and send payouts. |
| `suspended` | Glomo has stopped the account. It cannot receive funds or send payouts. |
| `closed` | The account is closed. |


## Balances

[Get a payment account](/api-reference/openapi/payment_account/getpaymentaccount) returns three balances for each currency. USD is always listed. Another currency is listed only while one of its balances is not zero.

| Balance | Meaning |
|  --- | --- |
| `available` | Money the customer can pay out now. |
| `pending` | Card payments that succeeded but that Glomo has not cleared yet. The money moves to `available` when the compliance checks clear. |
| `on_hold` | Money held for payouts in progress. It leaves the account when the payout succeeds, and goes back to `available` when the payout fails. |


For example, a customer adds USD 1,000.00 and then sends a payout of USD 600.00. While the payout is in progress, `available` is `40000` and `on_hold` is `60000`. When the payout succeeds, `on_hold` goes to `0`.

## Statement

[List transactions](/api-reference/openapi/payment_account/listpaymentaccounttransactions) returns one line each time money moves on the account:

- A **credit** with `source.type` `payment` when a card payment succeeds.
- A **debit** with `source.type` `payout` when a payout succeeds.
- A line with `source.type` `refund` when a card payment is returned to the card.


A payout in progress is not on the statement. Its amount shows in `on_hold` until the payout succeeds or fails.

## Idempotency

| Call | `request_id` | When you send it again |
|  --- | --- | --- |
| Create an add-funds order | Optional, unique to you (for example with your own prefix) | On the same account, you get the original order back. |
| Create a payout | Required, up to 64 characters, unique on the account | You get the original payout back, in its current status. |


## Webhooks

Glomo sends [payout webhooks](/platform/webhooks/payout) for payouts from a payment account to you. To get the result of a card payment, call [Get an add-funds order](/api-reference/openapi/payment_account/getpaymentaccountorder).