๐ธCash Transfer
You can transfer money in four easy steps:
Verify the account number
Create a transfer recipient
Initiate a transfer
Listen for transfer status
Good to know: To send money on Dunia, you need API keys to authenticate your transfers. You can find your keys on the Dunia Dashboard under Settings โ API Keys & Webhooks.
Verify the account number
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. Kindly check out the Verify Account Number page to learn about how to verify account details in different regions.
List banks and telcos
When creating a transfer recipient, you need the bank or telco details of the customer. The List BankAPI can be used to get all supported banks and telcos in a country.
To fetch a list of banks in a country, make a GET
request passing the currency
in the query parameter:
To fetch a list of supported telcos for mobile money, you can add currency
and type
in the query parameters for the List BankAPI:
Create a transfer recipient
Before sending money to an account, you need to create a transfer recipient with the customerโs account details.
The recipient type can take the following values based on country:
To create the transfer recipient, make a POST
request to the Transfer RecipientAPI passing one of the following customerโs detail:
Bank account
Mobile money
Authorization code
Bank account
Here, you specify the type
based on your integration currency, then pass the customerโs details:
Mobile money
With mobile money, the bank_code
takes the telco code as its value and the mobile number is passed to the account_number
parameter:
Authorization code
An authorization code is returned after a successful card payment by a customer. Combining the authorization code with the email address used for payment, you can create a transfer recipient:
The recipient_code
from the data object is the unique identifier for this user and would be used to make transfers to the specified account. This code should be saved with the customer's records in your database.
Generate a transfer reference
A transfer reference is a unique identifier that lets you track, manage and reconcile each transfer request made on your integration. Transfer references allow you to prevent double crediting as you can retry a non-conclusive transfer rather than initiate a new request.
In order to take advantage of a transfer reference, you need to generate and provide it for every request. When you donโt provide a transfer reference, Dunia generates one for you but this defeats the purpose of the transfer reference.
We recommend generating a v4 UUID reference of no more than 100 characters. However, if you prefer implementing your own logic, you should ensure your reference contains at least 16 alphanumeric characters.
Initiate a transfer
To send money to a customer, you make a POST
request to the Initate TransferAPI, passing the reference
and recipient_code
previously created.
When you send this request, if there are no errors, the response comes back with a pending status, while the transfer is being processed.
Retrying a transfer If there is an error with the transfer request, kindly retry the transaction with the same reference in order to avoid double crediting. If a new reference is used, the transfer would be treated as a new request.
Test transfers always return success, because there is no processing involved. The live transfers processing usually take between a few seconds and a few minutes. When it's done processing, a notification is sent to your webhook URL.
Verify a transfer
When a transfer is initiated, it could take a few seconds or minutes to be processed. This is why we recommend relying on webhooks for verification as opposed to polling.
Receiving Notifications
In order to receive notifications, you need to implement a webhook URL and set the webhook URL on your Dunia Dashboard.
Once a transfer is processed, we send the final status of the transfer as a POST
request to your webhook URL.
The response for a transfer also contains a unique transfer code to identify this transfer. You can use this code to call the Fetch TransferAPI endpoint to fetch status and details of the transfer anytime you want.
Last updated