curl --request POST \
--url https://gateway-sandbox.matambaintelligence.com/v1/allocations \
--header 'Authorization: Bearer <token>' \
--header 'Content-Type: application/json' \
--header 'Idempotency-Key: <idempotency-key>' \
--data '
{
"account": "1000000001",
"amount_kobo": 5000000
}
'const options = {
method: 'POST',
headers: {
'Idempotency-Key': '<idempotency-key>',
Authorization: 'Bearer <token>',
'Content-Type': 'application/json'
},
body: JSON.stringify({account: '1000000001', amount_kobo: 5000000})
};
fetch('https://gateway-sandbox.matambaintelligence.com/v1/allocations', options)
.then(res => res.json())
.then(res => console.log(res))
.catch(err => console.error(err));import requests
url = "https://gateway-sandbox.matambaintelligence.com/v1/allocations"
payload = {
"account": "1000000001",
"amount_kobo": 5000000
}
headers = {
"Idempotency-Key": "<idempotency-key>",
"Authorization": "Bearer <token>",
"Content-Type": "application/json"
}
response = requests.post(url, json=payload, headers=headers)
print(response.text)package main
import (
"fmt"
"strings"
"net/http"
"io"
)
func main() {
url := "https://gateway-sandbox.matambaintelligence.com/v1/allocations"
payload := strings.NewReader("{\n \"account\": \"1000000001\",\n \"amount_kobo\": 5000000\n}")
req, _ := http.NewRequest("POST", url, payload)
req.Header.Add("Idempotency-Key", "<idempotency-key>")
req.Header.Add("Authorization", "Bearer <token>")
req.Header.Add("Content-Type", "application/json")
res, _ := http.DefaultClient.Do(req)
defer res.Body.Close()
body, _ := io.ReadAll(res.Body)
fmt.Println(string(body))
}{
"object": "allocation",
"id": "alc_4hn7vz2qe6wk3pma5rtd",
"account": "1000000001",
"amount_kobo": 5000000,
"state": "booked",
"reason": null,
"reject_reason": null,
"created_at": "2026-09-25T06:07:15Z",
"updated_at": "2026-09-25T06:07:15Z",
"client_reference": null
}Allocate from your wallet
Moves money from your wallet to the balance of one of your accounts at the broker, and it’s booked only once. We reserve the amount in the same step that checks your wallet. If an allocation ends in uncertain, the amount stays reserved and we don’t send it again. Requires the fund scope.
curl --request POST \
--url https://gateway-sandbox.matambaintelligence.com/v1/allocations \
--header 'Authorization: Bearer <token>' \
--header 'Content-Type: application/json' \
--header 'Idempotency-Key: <idempotency-key>' \
--data '
{
"account": "1000000001",
"amount_kobo": 5000000
}
'const options = {
method: 'POST',
headers: {
'Idempotency-Key': '<idempotency-key>',
Authorization: 'Bearer <token>',
'Content-Type': 'application/json'
},
body: JSON.stringify({account: '1000000001', amount_kobo: 5000000})
};
fetch('https://gateway-sandbox.matambaintelligence.com/v1/allocations', options)
.then(res => res.json())
.then(res => console.log(res))
.catch(err => console.error(err));import requests
url = "https://gateway-sandbox.matambaintelligence.com/v1/allocations"
payload = {
"account": "1000000001",
"amount_kobo": 5000000
}
headers = {
"Idempotency-Key": "<idempotency-key>",
"Authorization": "Bearer <token>",
"Content-Type": "application/json"
}
response = requests.post(url, json=payload, headers=headers)
print(response.text)package main
import (
"fmt"
"strings"
"net/http"
"io"
)
func main() {
url := "https://gateway-sandbox.matambaintelligence.com/v1/allocations"
payload := strings.NewReader("{\n \"account\": \"1000000001\",\n \"amount_kobo\": 5000000\n}")
req, _ := http.NewRequest("POST", url, payload)
req.Header.Add("Idempotency-Key", "<idempotency-key>")
req.Header.Add("Authorization", "Bearer <token>")
req.Header.Add("Content-Type", "application/json")
res, _ := http.DefaultClient.Do(req)
defer res.Body.Close()
body, _ := io.ReadAll(res.Body)
fmt.Println(string(body))
}{
"object": "allocation",
"id": "alc_4hn7vz2qe6wk3pma5rtd",
"account": "1000000001",
"amount_kobo": 5000000,
"state": "booked",
"reason": null,
"reject_reason": null,
"created_at": "2026-09-25T06:07:15Z",
"updated_at": "2026-09-25T06:07:15Z",
"client_reference": null
}Authorizations
Headers
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.
1 - 255^[!-~]+$Body
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.
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.
1 <= x <= 10000000000Your 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.
1 - 64^[!-~]{1,64}$"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.
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.
sending, booked, uncertain, rejected, refused Why the allocation was rejected. Set only when state is rejected. New values can be added: handle an unrecognised value with a safe default.
invalid_amount, closed_financial_year, account_not_at_broker, rejected_by_broker, settlement_lockout, not_booked, null