Account management

Sub-accounts

Split your business's money into accounts you open yourself, collect into one, pay from one, and move money between them.

Your business has a main account, and can open sub-accounts beside it: "Collections", "Salary", "Cashbook", whatever you need. Each one has its own balances and its own statement. You open one yourself, in one call, and it is ready at once.

Sub-accounts are for splitting your own money. They are not for holding money on behalf of your customers.

  • Collect into one: name it as account on a charge.
  • Pay from one: name it as account on a payout.
  • Move money between your own accounts: POST /transfers.

Leave account out and nothing changes: charges land in, and payouts are paid from, your main account.

Sub-accounts are not virtual accounts. Virtual accounts are a separate product. A sub-account is a balance of yours, inside your business, that you direct money into and out of.

Key requirements

  • A key with accounts:read to list and read accounts, statements and transfers, and accounts:write to open and rename accounts and to make transfers. A sk_test_ key while you build.
  • A main account. It opens when your business is verified. A test key always has one (see Test mode).
  • An account's reference, acct_…, from GET /accounts. It never changes. Every request names an account by it.

Keys and scopes

Does each account get its own key? No. API keys belong to your business, not to an account. There is no per-account key, and no key is limited to one account. One key with the right scopes works across every account you hold, and you choose the account in each request.

ScopeWhat it lets a key do
accounts:readList and read accounts and their balances, read statements, list and read transfers.
accounts:writeOpen accounts, rename them, and move money between them.
payments:writeCreate a charge, including one that names an account.
payouts:writeCreate a payout, including one that names an account.

Freezing, unfreezing and closing an account are dashboard-only. No API key can do them, however it is scoped: the request is refused with 403 INSUFFICIENT_AUTHORITY. A key that could freeze accounts could stop you paying your staff, and one that could lift a freeze would undo the control.

A transfer never leaves your business, so a live key with accounts:write, unlike one with payouts:write, does not need an IP allowlist before it can be used. Once your business has one, every live key must call from an address on it, this one included.

Open an account

Open a Salary account
curl -X POST https://api.inversepay.app/api/b/v1/accounts \
  -H "Authorization: Bearer $INVERSEPAY_TEST_KEY" \
  -H "Idempotency-Key: $(uuidgen)" \
  -H "Content-Type: application/json" \
  -d '{
    "label": "Salary",
    "kind": "payroll"
  }'
201 Created (live)
{
  "reference": "acct_4f1c9a2b7d3e8f6a0b1c2d3e",
  "label": "Salary",
  "kind": "payroll",
  "is_main": false,
  "status": "active",
  "frozen_by": null,
  "is_test": false,
  "currencies": ["RWF", "UGX"],
  "balances": [
    { "currency": "RWF", "balance_minor": 0 },
    { "currency": "UGX", "balance_minor": 0 }
  ],
  "created_at": "2026-11-25T09:12:44Z",
  "closed_at": null
}
Field
labelrequiredWhat you call it, 1 to 60 characters. Shown on the dashboard and statements.
kindoptionalWhat it is for: collections, payouts, payroll, operations or custom (the default).

kind is a label for you. It changes nothing about what the account can do: a payroll account can collect, and a collections account can pay out.

A new account starts empty and holds the currencies your main account holds. When a currency is switched on for your business, every live account gets it. Fund the account by collecting into it or with a transfer.

List and read accounts

curl https://api.inversepay.app/api/b/v1/accounts \
  -H "Authorization: Bearer $INVERSEPAY_KEY"
200 OK (live)
{
  "accounts": [
    {
      "reference": "acct_9b8a7c6d5e4f3a2b1c0d9e8f",
      "label": "Main account",
      "kind": "main",
      "is_main": true,
      "status": "active",
      "frozen_by": null,
      "is_test": false,
      "currencies": ["RWF", "UGX"],
      "balances": [
        { "currency": "RWF", "balance_minor": 1250000000 },
        { "currency": "UGX", "balance_minor": 0 }
      ],
      "created_at": "2026-08-14T08:00:00Z",
      "closed_at": null
    },
    {
      "reference": "acct_4f1c9a2b7d3e8f6a0b1c2d3e",
      "label": "Salary",
      "kind": "payroll",
      "is_main": false,
      "status": "active",
      "frozen_by": null,
      "is_test": false,
      "currencies": ["RWF", "UGX"],
      "balances": [
        { "currency": "RWF", "balance_minor": 250000000 },
        { "currency": "UGX", "balance_minor": 0 }
      ],
      "created_at": "2026-11-25T09:12:44Z",
      "closed_at": null
    }
  ],
  "limit": 10
}

The main account comes first, then the others in the order you opened them. Closed accounts are included; send ?include_closed=false to leave them out. limit is how many open accounts you may hold (see Limits).

Read one account by its reference:

curl https://api.inversepay.app/api/b/v1/accounts/acct_4f1c9a2b7d3e8f6a0b1c2d3e \
  -H "Authorization: Bearer $INVERSEPAY_KEY"
FieldWhat it means
referenceThe account's id, acct_…. Never changes.
is_mainThe main account: where money lands, and is paid from, when a request names no account. One per business.
statusactive, frozen (money arrives, nothing leaves) or closed.
frozen_byWhen frozen: business (you, and you can lift it) or platform (InversePay; contact support).
currenciesWhat the account may hold.
balances[].balance_minorWhat it holds, in minor units. Money held for payouts that have not been sent has already left it, so this is what a transfer or a new payout can use.

A reference that is not one of yours gets 404 ACCOUNT_NOT_FOUND, the same answer as one that does not exist.

Collect into an account

Add account to a charge. Everything else about the charge is unchanged.

5,000 RWF into the Collections account
curl -X POST https://api.inversepay.app/api/b/v1/charges \
  -H "Authorization: Bearer $INVERSEPAY_TEST_KEY" \
  -H "Idempotency-Key: $(uuidgen)" \
  -H "Content-Type: application/json" \
  -d '{
    "idempotency_key": "order-rw-1043",
    "amount_minor": 500000,
    "currency": "RWF",
    "channel": "mobile_money",
    "reference": "ORDER-1043",
    "account": "acct_4f1c9a2b7d3e8f6a0b1c2d3e",
    "payer": {
      "phone_number": "250788123456",
      "network": "MTN",
      "country_code": "RW"
    }
  }'
  • Omit account and the charge settles into your main account.
  • The account must hold the charge's currency, or the charge is refused with 422 CURRENCY_NOT_ACTIVATED.
  • A frozen account still receives. A closed one does not: 409 ACCOUNT_NOT_ACTIVE.

The charge carries account on every read, so you can tell which account it settled into.

A payment link takes account too, on POST /payment-links. Every charge the link raises settles into that account and names it. The same rules apply: the account must hold the link's currency, and a frozen account still receives. If the account is closed later, the link stops taking payments and the payer is told it is no longer active.

Pay from an account

Add account to a payout. The payout is held from that account's balance, and if it fails the money goes back to that account.

150,000 RWF salary from the Salary account
curl -X POST https://api.inversepay.app/api/b/v1/payouts \
  -H "Authorization: Bearer $INVERSEPAY_TEST_KEY" \
  -H "Idempotency-Key: $(uuidgen)" \
  -H "Content-Type: application/json" \
  -d '{
    "idempotency_key": "payroll-2026-11-0042",
    "amount_minor": 15000000,
    "currency": "RWF",
    "method": "mobile_money",
    "transaction_type": "b2p",
    "recipient_name": "Aline Uwase",
    "country_code": "RW",
    "reference": "NOV-SALARY-0042",
    "account": "acct_4f1c9a2b7d3e8f6a0b1c2d3e",
    "destination": {
      "phone_number": "+250788123456",
      "network": "MTN"
    }
  }'
  • Omit account and the payout is paid from your main account.
  • The account must be active: a frozen or closed account is refused with 409 ACCOUNT_NOT_ACTIVE. Nothing is held.
  • It must hold currency, the balance the payout is paid from, or the payout is refused with 422 CURRENCY_NOT_ACTIVATED.
  • It must hold enough, or the payout is refused with 402 INSUFFICIENT_BALANCE, as for the main account.

Every other payout rule applies as it does to the main account: approvals, limits, screening and the IP allowlist. The payout carries account on every read.

Move money between accounts

Fund November salaries
curl -X POST https://api.inversepay.app/api/b/v1/transfers \
  -H "Authorization: Bearer $INVERSEPAY_TEST_KEY" \
  -H "Idempotency-Key: $(uuidgen)" \
  -H "Content-Type: application/json" \
  -d '{
    "idempotency_key": "transfer-2026-11-0042",
    "from_account": "acct_9b8a7c6d5e4f3a2b1c0d9e8f",
    "to_account": "acct_4f1c9a2b7d3e8f6a0b1c2d3e",
    "amount_minor": 250000000,
    "currency": "RWF",
    "reference": "NOV-SALARIES",
    "narration": "Fund November salaries"
  }'
201 Created (live)
{
  "id": "5c2e8f1a-7b3d-4e9a-a1c6-0f2b9d8e7a64",
  "from_account": "acct_9b8a7c6d5e4f3a2b1c0d9e8f",
  "to_account": "acct_4f1c9a2b7d3e8f6a0b1c2d3e",
  "amount_minor": 250000000,
  "currency": "RWF",
  "reference": "NOV-SALARIES",
  "narration": "Fund November salaries",
  "status": "completed",
  "is_test": false,
  "initiated_by_api_key_id": "2b7f4c1e-9d3a-4f8b-b6e2-7a1c0d5f9e38",
  "created_at": "2026-11-25T09:15:02Z"
}
Field
idempotency_keyrequired8–128 characters. Yours. See retrying.
from_accountrequiredThe account the money leaves, acct_…. Must be active.
to_accountrequiredThe account it arrives in, acct_…. A frozen account still receives; a closed one does not.
amount_minorrequiredMinor units, greater than zero. 2,500,000 RWF is 250000000.
currencyrequiredThree letters. Both accounts must hold it.
referenceoptionalYour own reference, up to 128 characters, returned on every read.
narrationoptionalA note for whoever reads the statement, up to 255 characters.

A transfer is instant. The money is in to_account when the response comes back, and status is always completed: a transfer either moves or is refused. There is no pending state to poll or reconcile. It shows on both accounts' statements, as a debit on one and a credit on the other.

One currency per transfer. The two accounts must be different, and both must be yours, in the key's mode.

Retrying a transfer

idempotency_key in the body is required. Send the same key again for the same transfer (the same two accounts, amount and currency) and you get the original transfer back with 201, and nothing moves twice. The same key with a different transfer is refused with 422 IDEMPOTENCY_KEY_REUSED, and nothing moves. Keys are scoped to your business and to the key's mode.

The Idempotency-Key header is honoured as well, as on every write. Reusing it with a different request body gets the same 422 IDEMPOTENCY_KEY_REUSED, so one branch handles both. While the first request with a header key is still running, a repeat gets 409 IDEMPOTENCY_KEY_IN_FLIGHT: retry once it has finished. See Idempotency, twice.

List and read transfers

curl "https://api.inversepay.app/api/b/v1/transfers?account=acct_4f1c9a2b7d3e8f6a0b1c2d3e&limit=50" \
  -H "Authorization: Bearer $INVERSEPAY_KEY"

Most recent first, as { "transfers": [ … ], "next_cursor": "…" }.

Parameter
accountoptionalOnly transfers into or out of this account, acct_….
since, untiloptionalOnly transfers made in this window, RFC 3339.
limitoptionalTransfers per page, 1 to 200. 50 by default.
beforeoptionalThe previous page's next_cursor. Omit it for the newest page.

Page with before until next_cursor is null; that is the only end-of-list signal to rely on, since a page can be shorter than limit. A cursor that this listing did not give you (malformed, another business's, or from a key in the other mode) is refused with 400 INVALID_CURSOR.

curl https://api.inversepay.app/api/b/v1/transfers/$TRANSFER_ID \
  -H "Authorization: Bearer $INVERSEPAY_KEY"

Statements

Every account has its own statement, per currency, from the ledger.

curl "https://api.inversepay.app/api/b/v1/accounts/acct_4f1c9a2b7d3e8f6a0b1c2d3e/statement?currency=RWF&start=2026-11-01T00:00:00Z&end=2026-12-01T00:00:00Z" \
  -H "Authorization: Bearer $INVERSEPAY_KEY"
200 OK (live)
{
  "account": "acct_4f1c9a2b7d3e8f6a0b1c2d3e",
  "currency": "RWF",
  "period_start": "2026-11-01T00:00:00Z",
  "period_end": "2026-12-01T00:00:00Z",
  "opening_minor": 0,
  "closing_minor": 235000000,
  "total_credits_minor": 250000000,
  "total_debits_minor": 15000000,
  "reconciles": true,
  "entries": [
    {
      "sequence": 48211,
      "entry_type": "credit",
      "amount_minor": 250000000,
      "balance_after_minor": 250000000,
      "currency": "RWF",
      "reference_type": "internal_transfer",
      "transaction_id": "5c2e8f1a-7b3d-4e9a-a1c6-0f2b9d8e7a64",
      "created_at": "2026-11-25T09:15:02Z"
    },
    {
      "sequence": 48230,
      "entry_type": "debit",
      "amount_minor": 15000000,
      "balance_after_minor": 235000000,
      "currency": "RWF",
      "reference_type": "disbursement",
      "transaction_id": "9d1b6c2a-4e8f-4a3b-9c7d-1e5f0a2b8c46",
      "created_at": "2026-11-25T09:20:41Z"
    }
  ],
  "next_cursor": null
}
Parameter
currencyrequiredThe currency to read.
startoptionalInclusive, RFC 3339.
endoptionalExclusive, RFC 3339.
limitoptionalEntries per page, 1 to 500. 100 by default.
afteroptionalThe previous page's next_cursor.

opening_minor + total_credits_minor - total_debits_minor is always closing_minor, and the totals cover the whole period, not just the page. reference_type says what moved the money: deposit for a collection, disbursement for a payout, internal_transfer for a transfer, reversal for money returned. transaction_id is the charge, payout or transfer behind it. Page with after until next_cursor is null.

Rename an account

curl -X PATCH https://api.inversepay.app/api/b/v1/accounts/acct_4f1c9a2b7d3e8f6a0b1c2d3e \
  -H "Authorization: Bearer $INVERSEPAY_TEST_KEY" \
  -H "Content-Type: application/json" \
  -d '{ "label": "Cashbook", "kind": "operations" }'

Send label, kind or both; a field you leave out is unchanged. It moves no money and the reference stays the same. You can rename the main account, but its kind is always main (409 MAIN_ACCOUNT). A closed account cannot be changed (409 ACCOUNT_NOT_ACTIVE).

Freeze and close

Both are dashboard-only. No API key can freeze, unfreeze or close an account.

What it meansWho, in the dashboard
FreezeMoney stops leaving the account: transfers out and payouts from it are refused. Money sent to it still arrives. Freezing a frozen account changes nothing.Owner or Finance
UnfreezeLifts a freeze you placed. A freeze InversePay placed (frozen_by: "platform") can only be lifted by InversePay (403 FROZEN_BY_INVERSEPAY); contact support.Owner or Finance
ClosePermanent. The account can no longer receive or send. It stays readable, with its statement, and no longer counts towards your limit.Owner

To close an account:

  • It must be empty in every currency (409 ACCOUNT_NOT_EMPTY). Transfer the money to another account first.
  • Nothing on it can be in progress: no unfinished payout, charge or refund (409 ACCOUNT_IN_USE). Close it once they have finished.
  • The main account cannot be closed (409 MAIN_ACCOUNT), because every request that names no account uses it. It can be frozen.
  • An account InversePay froze cannot be closed until InversePay lifts the freeze.

Limits

How many open accounts you may hold, the main account included, depends on your business's verification tier: 3, 10 or 25. Closed accounts do not count; frozen ones do. Read limit from GET /accounts rather than hard-coding it.

At the limit, opening another is refused with 409 ACCOUNT_LIMIT_REACHED, and the body carries limit and tier. Close one, or ask us to raise it.

Test mode

A sk_test_ key works on test accounts only, which are separate from your live ones:

  • A test key sees only test accounts. The first time it lists them, a test main account is opened for it, so there is always one to transfer from. A live account's reference with a test key is 404 ACCOUNT_NOT_FOUND, and the other way round.
  • Test accounts hold no money. Their balances are always zero and their statements always empty, because test flows post nothing to the ledger.
  • A test transfer moves nothing and needs no balance. It is recorded, returned and idempotent exactly as a live one, so you can rehearse the flow and your retries.
  • Test accounts hold the currencies your live main account holds, or, before your business is verified, the currencies verification would open for it.
  • The limit is counted separately for test accounts.

Charges and payouts made with a test key can name a test account as account, and are simulated as usual.

Errors

Every refusal has the usual shape. Codes marked with a field carry it at the top level beside code.

StatuscodeWhat happened
400INVALID_ACCOUNTA blank label or a kind that is not one of ours, when opening or renaming. On a transfer: the two accounts are the same, or currency is not a currency code. field names the part at fault.
400INVALID_PERIODA statement whose start is after its end.
400INVALID_CURSORbefore on GET /transfers is not a next_cursor that listing gave you.
402INSUFFICIENT_BALANCEfrom_account does not hold enough. Money held for payouts not yet sent is not available. Carries available_minor, required_minor and currency.
403INSUFFICIENT_AUTHORITYThe key lacks the scope (the message names it), or the action is dashboard-only: freeze, unfreeze, close.
403FROZEN_BY_INVERSEPAYDashboard: unfreezing or closing an account InversePay froze. Contact support.
404ACCOUNT_NOT_FOUNDNo account of yours, in this key's mode, has that reference. Another business's account gets the same answer.
404NO_WALLETOpening an account before your main account exists. It opens when your business is verified.
404TRANSFER_NOT_FOUNDNo transfer of yours, in this key's mode, has that id.
409ACCOUNT_LIMIT_REACHEDYou hold as many open accounts as your tier allows. Carries limit and tier.
409ACCOUNT_NOT_ACTIVEMoney cannot leave the account because it is frozen or closed, money cannot reach it because it is closed, or a closed account was renamed. account names it.
409MAIN_ACCOUNTChanging the main account's kind, or closing it.
409ACCOUNT_NOT_EMPTYDashboard: closing an account that still holds money. Carries balances.
409ACCOUNT_IN_USEDashboard: closing an account with a payout, charge or refund in progress. Carries in_progress.
409IDEMPOTENCY_KEY_IN_FLIGHTThe first request with this Idempotency-Key header is still running. Retry once it has finished.
422IDEMPOTENCY_KEY_REUSEDThis idempotency_key was used for a different transfer, or this Idempotency-Key header for a different request body. Nothing moved.
422CURRENCY_NOT_ACTIVATEDAn account does not hold the currency: on a transfer, either account; on a charge or payout, the account named.
422VALIDATION_FAILEDA field is missing or malformed: a label over 60 characters, an idempotency_key under 8, an amount that is not above zero. The body names the field.

On a charge, a payout or a payment link, ACCOUNT_NOT_FOUND, ACCOUNT_NOT_ACTIVE and CURRENCY_NOT_ACTIVATED come with field: "account", and nothing is created or held.

What's next

On this page