You can send money to multiple recipients in one go using the Chapa’s bulk transfers API.
How to make a bulk payment
To do this, you’ll provide an array of objects called e bulk_data
. Each item in this array contains details for one transfer—the same details you specify when making a single transfer.
You can also specify a title for the transfer. This is helpful so you can easily identify what a set of payments was for.
Keep in Mind!!!!
Each object in the bulk_data array is the same parameters for a single transfer request. A batch should not contain more than 100 items and each batch should be sent every 5 seconds. The duration is to avoid getting rate limited. Sending multiple requests at short intervals would lead to a 429 (Too many requests) error.
With your batch properly planned and implemented, you can now initiate the bulk transfer.
Here is a sample code for bulk transactions:
Endpoint https://api.chapa.co/v1/bulk-transfers
Headers
Authorization
* : Pass your secret key as a bearer token in the request header to authorize this call.
Method POST
The transfers will be queued for processing, which usually take between a few seconds.
Refer to our Error Codes page for all responses for this request.
Checking the status
You can also check the status of a bulk transfer manually using the get all transfers endpoint with a batch_id query parameter. The batch_id is the data.id returned from the create bulk transfer response:
Here is a sample code for checking the status:
Endpoint https://api.chapa.co/v1/transfers?batch_id=<id>
Headers
Authorization
* : Pass your secret key as a bearer token in the request header to authorize this call.
Method GET