Transfers
This section describes how merchants and developers can send funds to Bank accounts.
With Chapa Transfer API, you can send money to bank accounts from your balance. To send money on Chapa, you need API keys to authenticate your transfers. You can find your keys on the Chapa Dashboard under Settings->API (opens in a new tab)
Note You need to collect the customer's account details and confirm that it’s valid before sending money. This is to ensure you don’t send money to the wrong or invalid account. We don't take any responsibility if this happens.
How transfers work
When a transfer request is initiated, it goes through a sequence of processes:
- Initiate / Request transfer
- Validation (OTP or Server approval)
- Wait for approval status
- Queue transfer
- Transfer response
Initiate a Transfer
This section describes how to Initate a transfer with Chapa.
Endpoint https://api.chapa.co/v1/transfers
Method POST
Authorization
: Pass your secret key as a bearer token in the request header to authorize this call.
Body Parameters
account_name
: This is the recipient Account Name matches on their bank account.account_number
: This is the recipient Account Number.amount
: This the amount to be transferred to the recipient.- `currency: This is the currency for the Transfer. Expected value is ETB.
reference
: This a merchant's uniques reference for the transfer, it can be used to query for the status of the transfer.bank_code
: This is the recipient bank code. You can see a list of all the available banks and their codes from the get banks endpoint.
import requests import json url = "https://api.chapa.co/v1/transfers" payload = { "account_name": "Israel Goytom", "account_number": "32423423", "amount": "1", "currency": "ETB", "reference": "3241342142sfdd", "bank_code": 656 } headers = { 'Authorization': 'Bearer CHASECK-xxxxxxxxxxxxxxxx', 'Content-Type': 'application/json' } response = requests.post(url, json=payload, headers=headers) data = response.text print(data)
OTP approval
As an additional layer of security, a merchant might want to confirm a transfer by using the One Time Password (OTP) sent to their device.
Server approval
It allows you to create a URL that checks that a transfer request was initiated by you. It’s a two step process:
- Create an approval URL
- Add URL to dashboard
Create an approval URL
The approval URL is a POST
endpoint that checks the authenticity of transfer details. If the transfer details are authentic, it should respond with a 200
, else a 400
:
Response code | Meaning | Status |
---|---|---|
200 | Transfer approved | pending |
400 | Transfer rejected | reverted |
Add URL to dashboard
When you are done with the implementation of your approval URL, you need to add the URL to Chapa Dashboard. To do this, head over to your Dashboard, then navigate to Settings, then Account Settings to locate the Transfer Approval section:
Balance managment
You can customize the threshold amount you can transfer by going to your dashboard, clicking on your profile on the top right. Click on the account settings tab and once you scroll to the bottom, you can input your balance threshold.