Bulk transfers: pay up to 100 people at once
A bulk transfer creates up to 100 transfers in a single request, for example for end-of-day courier pay, agent commissions or seller earnings. Each item becomes an ordinary transfer, with its own fees, status and webhooks.
How it works
Section titled “How it works”/v1/payment/transfers/bulk/- The body contains a
transferslist. Each item accepts the same fields as a single transfer:amount,recipient_phone,recipient_wallet(optional for Orange BF and Moov BF) andext_id. - Items are processed one by one, in order. Each one is validated separately, and an invalid item does not stop the others.
- The balance is checked for each item, taking earlier items of the same batch into account. If your balance runs out halfway, the first items are paid and the rest are refused. Put priority payments at the top of the list.
- The response arrives once every item has been recorded. The actual payout happens afterwards, asynchronously.
The response: 202, even if everything failed
Section titled “The response: 202, even if everything failed”The response is always 202 with status: true as soon as the list holds between 1 and 100 items, even if no item was accepted. Rely on neither the HTTP code nor status, and read failed_transfers instead.
{ "status": true, "message": "2 transfers queued for processing", "failed_transfers": [ { "data": { "amount": 3000, "recipient_phone": "71234567", "recipient_wallet": "orange_bf", "ext_id": "payroll-2026-11-26-courier-17" }, "errors": { "non_field_errors": [ "Invalid phone number for Orange BF transfer." ] } } ]}| Field | Description |
|---|---|
message |
Contains the number of items queued, for example "2 transfers queued for processing". |
failed_transfers |
Refused items. data echoes the item as you sent it and errors explains the refusal. The list is empty if everything was accepted. |
The response contains neither the reference nor the status of the transfers created. To find them, use your ext_id (see Reconciling the batch).
An insufficient balance shows up in failed_transfers as "non_field_errors": ["Insufficient balance for Moov BF transfer including fees."], without the MERCHANT_INSUFFICIENT_FUNDS code of a single transfer.
Example: paying your couriers at the end of the day
Section titled “Example: paying your couriers at the end of the day”-
Build the list with a unique
ext_idper paymentBuild the
ext_idfrom stable data (payroll date and courier ID) and store it in your database before the call. Without anext_id, an item cannot be reconciled. -
Check your transfer balances
For each operator, the sum of
amount × (1 + rate / 100)must fit inavailable. See Balances. -
Send the batch
Fenêtre de terminal curl https://api.senfenico.com/v1/payment/transfers/bulk/ \-H "X-API-KEY: sk_test_..." \-H "Content-Type: application/json" \-d '{"transfers": [{"amount": 7500,"recipient_phone": "76000000","ext_id": "payroll-2026-11-26-courier-12"},{"amount": 4000,"recipient_phone": "70000000","ext_id": "payroll-2026-11-26-courier-15"},{"amount": 3000,"recipient_phone": "71234567","recipient_wallet": "orange_bf","ext_id": "payroll-2026-11-26-courier-17"}]}'$date = '2026-11-26';$couriers = [ // from your database['id' => 12, 'phone' => '76000000', 'due' => 7500],['id' => 15, 'phone' => '70000000', 'due' => 4000],];$batch = array_map(fn ($r) => ['amount' => $r['due'],'recipient_phone' => $r['phone'],'ext_id' => "payroll-{$date}-courier-{$r['id']}",], $couriers);$client = new \GuzzleHttp\Client(['base_uri' => 'https://api.senfenico.com/v1/payment/','headers' => ['X-API-KEY' => getenv('SENFENICO_KEY')],'http_errors' => false,'timeout' => 120,]);$res = $client->post('transfers/bulk/', ['json' => ['transfers' => $batch],]);$body = json_decode($res->getBody(), true);foreach ($body['failed_transfers'] ?? [] as $fail) {error_log($fail['data']['ext_id'] . ': '. json_encode($fail['errors']));}import osimport requestsDATE = "2026-11-26"couriers = [ # from your database{"id": 12, "phone": "76000000", "due": 7500},{"id": 15, "phone": "70000000", "due": 4000},]batch = [{"amount": r["due"],"recipient_phone": r["phone"],"ext_id": f"payroll-{DATE}-courier-{r['id']}",}for r in couriers]res = requests.post("https://api.senfenico.com/v1/payment/transfers/bulk/",headers={"X-API-KEY": os.environ["SENFENICO_KEY"]},json={"transfers": batch},timeout=120,)body = res.json()for fail in body.get("failed_transfers", []):print(fail["data"].get("ext_id"), fail["errors"])const DATE = '2026-11-26';const couriers = [ // from your database{ id: 12, phone: '76000000', due: 7500 },{ id: 15, phone: '70000000', due: 4000 },];const batch = couriers.map((r) => ({amount: r.due,recipient_phone: r.phone,ext_id: `payroll-${DATE}-courier-${r.id}`,}));const res = await fetch('https://api.senfenico.com/v1/payment/transfers/bulk/',{method: 'POST',headers: {'X-API-KEY': process.env.SENFENICO_KEY,'Content-Type': 'application/json',},body: JSON.stringify({ transfers: batch }),},);const body = await res.json();for (const fail of body.failed_transfers ?? []) {console.warn(fail.data.ext_id, fail.errors);} -
Track the outcomes
Each accepted transfer sends its own
transfer.pendingwebhook, thentransfer.successortransfer.failed, with yourext_idindata. Mark each courier as paid only ontransfer.success.
Reconciling the batch
Section titled “Reconciling the batch”Each item sent falls into one of these situations:
| Situation | Actual state | Action |
|---|---|---|
Not in failed_transfers |
Transfer created | Find it with GET /v1/payment/transfers/?ext_id=… to get its reference and status. |
In failed_transfers, errors is an object ({"amount": […]}, {"non_field_errors": […]}) |
Refused, nothing was created | Fix the number or top up the balance, then resend that item alone. |
In failed_transfers, errors is a string |
Uncertain | List by ext_id before any retry. |
For a large batch you can also list the day’s transfers (?date_from=2026-11-26, 10 per page) and match them by ext_id. Filters are described in List transfers.
Errors that reject the whole batch
Section titled “Errors that reject the whole batch”These errors reject the entire request, and no transfer is created.
| HTTP | error_code |
Cause |
|---|---|---|
400 |
BATCH_SIZE_LIMIT_EXCEEDED |
More than 100 items in transfers. Split into several batches. |
400 |
INVALID_DATA |
transfers missing or empty. |
{ "status": false, "message": "Maximum of 100 transfers allowed per request", "error_code": "BATCH_SIZE_LIMIT_EXCEEDED"}Limits and tips
Section titled “Limits and tips”- A request holds 100 items at most. For 250 couriers, send three batches, one after the other.
- Each item follows the limits of a single transfer: from 100 to 1,000,000 XOF.
- The response only arrives after every item is recorded. Set a generous timeout in your code, for example 120 seconds.
- In test mode, accepted items are simulated like test transfers and require a test transfer balance.