TransferTransfer

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


ℹ️

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:

  1. Initiate / Request transfer
  2. Validation (OTP or Server approval)
  3. Wait for approval status
  4. Queue transfer
  5. 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)

ℹ️
Refer to our Error Codes page for all responses for this request.
ℹ️
Note: You need to have enough balance in your Available Balance to make a transfer. If your balance is less than the requested transfer amount, we will reject the transfer, if this persists we will block access to the transfer API.

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. Hello

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:

  1. Create an approval URL
  2. Add URL to dashboard

Create an approval URL

The Approval URL is a POST endpoint designed to verify the authenticity of transfer details. When a payment is initiated, Chapa sends the payment information along with a hash generated using the approval_secret to the Approval URL. If the transfer details are authentic, the endpoint should respond with a 200 OK status code. Otherwise, it should respond with a 400 Bad Request status code.

Response codeMeaningStatus
200Transfer approvedpending
400Transfer rejectedreverted

Method POST

  • Chapa-Signature : This is a HMAC SHA256 signature of your approval secret signed using your approval secret.
Example Request:

Header:

{
    "Chapa-Signature": "9f6a8c3b24d7e1f5a4c2b7a6e8f1c3d4"
}   

Body:

{
    "amount": "2000.00",
    "reference": "MYMER3434989",
    "bank": "telebirr",
    "account_name": "Customer Name",
    "account_number": "25190000000"
}   

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:

Hello

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.

Hello