Skip to main content
POST
Allocate from your wallet

Authorizations

Authorization
string
header
required

Authorization: Bearer <key>. Sandbox keys start with mgw_test_ and live keys start with mgw_live_. Each key works only in its own environment, and a live key works only from the IP addresses or ranges registered for it.

Scopes

fund

Headers

Idempotency-Key
string
required

A key you choose to identify this request. Send the same key every time you retry the request. Once used, a key stays tied to that request permanently. It must be printable ASCII with no spaces, and we compare it byte for byte. Send the header only once.

Required string length: 1 - 255
Pattern: ^[!-~]+$

Body

application/json

The account to fund, and the amount to move to it from your wallet.

We reject unknown fields and any field that appears twice, even with different letter case.

account
string
required

An account code. Case-insensitive on input, and returned in uppercase.

Pattern: ^[A-Za-z0-9]{1,64}$
amount_kobo
integer<int64>
required

The amount in kobo, as a whole number: at least 1 kobo, and at most ₦100,000,000. The broker doesn't publish a minimum of its own. If the broker refuses an amount, the allocation comes back allocation_rejected with reject_reason invalid_amount.

Required range: 1 <= x <= 10000000000
client_reference
string

Your own reference for this, such as your internal ID, so you can find it again. 1 to 64 printable ASCII characters, with no spaces, matched exactly. We store it and return it. It's part of the request an Idempotency-Key stands for, so a retry with a different client_reference returns 409. Never put personal data in it: no names, phone numbers, email addresses, BVN, NIN or account numbers of your customers.

Required string length: 1 - 64
Pattern: ^[!-~]{1,64}$
Example:

"ord-88213"

Response

This idempotency key was already used for this same allocation, so we didn't send anything new. state is the allocation's state now. It reads sending while the first request is in progress, or after it if its outcome was not recorded.

Money from your wallet to one of your customers' accounts.

object
string
required
Allowed value: "allocation"
id
string
required

Unique identifier for the allocation, also used as the broker's reference for the deposit. Starts with alc_.

Pattern: ^alc_[a-z2-7]{20}$
account
string
required

The account the allocation funds.

amount_kobo
integer<int64>
required

The amount, in kobo.

state
enum<string>
required

sending: reserved, and the send is in progress. If it still reads sending after its request has ended, its outcome was not recorded. Our operations team reconciles it with the broker as it does an uncertain one, and it becomes booked, or rejected with reject_reason not_booked and the amount returned to your wallet. Until then, another allocation to the same account for the same amount is refused with 409 similar_allocation_unresolved. booked: the broker booked it into the account's balance. uncertain: the broker did not confirm whether it booked it. The amount stays reserved, the gateway does not resubmit it, and our operations team reconciles it with the broker. Until it resolves, another allocation to the same account for the same amount is refused with 409 similar_allocation_unresolved. rejected: the broker rejected it, or our operations team confirmed it didn't book it (reject_reason says which), and the amount is returned to your wallet. refused: it never reached the broker, and the amount is returned to your wallet. New values can be added: handle an unrecognised value with a safe default.

Available options:
sending,
booked,
uncertain,
rejected,
refused
reason
string | null
required

A sentence explaining the allocation's current state. It's for people to read, so don't use it in your logic.

reject_reason
enum<string> | null
required

Why the allocation was rejected. Set only when state is rejected. New values can be added: handle an unrecognised value with a safe default.

Available options:
invalid_amount,
closed_financial_year,
account_not_at_broker,
rejected_by_broker,
settlement_lockout,
not_booked,
null
created_at
string<date-time>
required

When we recorded the allocation.

updated_at
string<date-time>
required

When the allocation last changed state.

client_reference
string | null
required

Your own reference, as you sent it. Null if you didn't send one.