After having followed the steps found in the section introduction, you can then integrate this API Client
.
To make a withdrawal you needed your API keys in your PayDunya account. So log into your PayDunya account already
created and access your API keys
by the link details
just to the right of the app you created.
So you can make disbursements to your customers in several ways, namely through ORANGE MONEY PURSE
, the PayDunya
account and many others. For this you will need four 04 keys
in the format JSON
.
The four 04 JSON keys
to have are as follows :
"account_alias"
:
Is the recipient's phone number without a country code.
"amount"
Is the amount to be spent inXOF
"withdraw_mode"
Defines the withdrawal endpoint: "orange-money-senegal"
for "Orange Money wallet"
.
"callback_url"
This is the URL where the transaction details will be returned once the transaction is successful.
"The URL must be a Valid URL otherwise the transaction will not be authorized"
Make sure that the PER API or disbursement is activated
in your dashboard at API WebPay and MobPay level. your dashboard
account_alias
: is the receiver phone number without country code.
amount
: is the amount to disburse in XOF.
withdraw_mode
: with have different types of withdraw mode mentioned below :
paydunya
: for account to account
orange-money-senegal
: for orange money Sénégal wallet
free-money-senegal
: for free money Sénégal wallet.
expresso-senegal
: for e-money Sénégal wallet.
wave-senegal
: for wave Sénégal wallet.
mtn-benin
: for mtn Bénin wallet.
moov-benin
: for Moov Bénin wallet.
mtn-ci
: for mtn Ivory Coast wallet.
orange-money-ci
: for Orange Money Ivory Coast wallet.
moov-ci
: for moov Ivory Coast wallet.
wave-ci
: for wave Ivory Coast wallet.
t-money-togo
: for T-Money Togo wallet.
moov-togo
: for Moov Togo wallet.
orange-money-mali
: for Orange Money Mali wallet.
orange-money-burkina
: for Orange Money Burkina wallet.
callback_url
: This is the URL where the transaction details will be returned once the transaction is successful. The URL must be a Valid URL otherwise the transaction will not be authorized
{
"status":"success",
"token":"xZsV7x488d2yGCrJd2R ",
"withdraw_mode":"orange-money-senegal",
"amount":"203.00",
"updated_at":"11/01/2024 14:30:32",
"disburse_id": "78112205445565",
"transaction_id":"TFA-TX-N458MPjhA1npWbI6M",
"disburse_tx_id":"CI000111.1430.A11197"
}
The disburse_id
will only appear if the merchant provides it when submitting invoice.
https://app.paydunya.com/api/v2/disburse/get-invoice
curl -H "Content-Type: application/json" \
-H "PAYDUNYA-MASTER-KEY: wQzk9ZwR-Qq9m-0hD0-zpud-je5coGC3FHKW" \
-H "PAYDUNYA-PRIVATE-KEY: test_private_rMIdJM3PLLhLjyArx9tF3VURAF5" \
-H "PAYDUNYA-TOKEN: IivOiOxGJuWhc5znlIiK" \
-X POST -d ' { "account_alias" : "771111111", "amount" : 4500, "withdraw_mode" :
"orange-money-senegal", "callback_url": "your_callback_url" }' \
"https://app.paydunya.com/api/v2/disburse/get-invoice"
“account_alias”
, “amount”
and “callback_url”
are mandatory. For Free money and E money Wallet just change with the corresponding “withdraw_mode”
value.
“amount”
must not be a decimal value and the supported currency is XOF, “account_alias”
must be a phone number without a country code.
A fourth status
has been added. This is the status « created »
. When a token is generated the status of the transaction is « created »
. The status only changes if you push via the Submit Invoice API after which the 3 possible status are therefore : pending, success, failed
.
{
"response_code": "00",
"disburse_token": "hwTHAS0WvTmTaYT2zDoO"
}
https://app.paydunya.com/api/v2/disburse/get-invoice
curl -H "Content-Type: application/json" \
-H "PAYDUNYA-MASTER-KEY: wQzk9ZwR-Qq9m-0hD0-zpud-je5coGC3FHKW" \
-H "PAYDUNYA-PRIVATE-KEY: test_private_KEY: test_private_rMIdJM3PLLhLjyArx9tF3VURAF5" \
-H "PAYDUNYA-TOKEN: IivOiOxGJuWhc5znlIiK" \
-X POST -d '{"account_alias" : "771111111", "amount" : 4500, "withdraw_mode" :
"paydunya", "callback_url": "your_callback_url"}' \
"https://app.paydunya.com/api/v2/disburse/get-invoice"
{
"response_code": "00",
"disburse_token": "hwTHAS0WvTmTaYT2zDoO"
}
disburse_id
is your own transaction reference number, it is optional. If you don’t have this just post the request with only disburse_invoice (required)
as input parameter.
The different status :
success
pending
failed
https://app.paydunya.com/api/v2/disburse/submit-invoice
curl -H "Content-Type: application/json" \
-H "PAYDUNYA-MASTER-KEY: wQzk9ZwR-Qq9m-0hD0-zpud-je5coGC3FHKW" \
-H "PAYDUNYA-PRIVATE-KEY: test_private_rMIdJM3PLLhLjyArx9tF3VURAF5" \
-H "PAYDUNYA-TOKEN: IivOiOxGJuWhc5znlIiK" \
-X POST -d ' {"disburse_invoice": "hwTHAS0WvTmTaYT2zDoO ", " disburse_id ": "456678900309" }' \
"https://app.paydunya.com/api/v2/disburse/submit-invoice"
{
"response_code": "00",
"response_text": "Transaction completed successfully",
"description": " Success! Amount of 200.00 FCFA has been transfered to to Christopher Jean Account 707006948",
"transaction_id": "TFA-TX-37XqPpVCjU7ReiycUg97"
}
{
"response_code": "00",
"response_text": "Transaction completed successfully",
"description": "Success! Amount of 4500 FCFA has been transfered to Orange Money Account 771111111",
"transaction_id": "TFA-TX-37XqPpVCjU7ReiycUg97",
"provider_ref": "565486545315"
}
{
"response_code": "00",
"response_text": "Transaction completed successfully",
"description": "Success! Amount of 4500 FCFA has been transfered to Free-Money Account 761111111",
"transaction_id": "TFA-TX-37XqPpVCjU7ReiycUg97",
"provider_ref": "565486545315"
}
OR
{
"response_code": "00",
"status": "pending",
"response_text": "Transaction pending",
"description": "Transaction pending, please check the final status later through our status API",
"transaction_id": "TFA-TX-37XqPpVCjU7ReiycUg97"
}
{
"response_code": "00",
"response_text": "Transaction completed successfully"",
"description": "Success! Amount of 4500 FCFA has been transfered to E Money Account 0588118811",
"transaction_id": "TFA-TX-37XqPpVCjU7ReiycUg97",
"provider_ref": "565486545315"
}
{
"response_code": "00",
"response_text": "Transaction completed successfully",
"description": "Success! Amount of 4500 FCFA has been transfered to Wave Account 777777777",
"transaction_id": "TFA-TX-0sks0bagCMQkZ0SG91nc",
"provider_ref": "pt-67Ggh7zgm013syghghjkhgjh"
}
{
"response_code": "00",
"response_text": "Transaction completed successfully"",
"description": "Success! Amount of 4500 FCFA has been transfered to Mtn Money Account 0588118811",
"transaction_id": "TFA-TX-37XqPpVCjU7ReiycUg97",
"provider_ref": "565486545315"
}
{
"response_code": "00",
"response_text": "Transaction completed successfully",
"description": "Success! Amount of 200.00 FCFA has been transfered to MOOV BJ Account 95920904",
"transaction_id": "TFA-TX-E36T8kfja2cpR00CKuVq",
"provider_ref": "920230224297772"
}
{
"response_code": "00",
"response_text": "Transaction completed successfully"",
"description": "Success! Amount of 4500 FCFA has been transfered to Mtn Money Account 0588118811",
"transaction_id": "TFA-TX-37XqPpVCjU7ReiycUg97",
"provider_ref": "565486545315"
}
{
"response_code": "00",
"response_text": "Transaction completed successfully",
"description": "Success! Amount of 4500 FCFA has been transfered to Orange Money CI Account 771111111",
"transaction_id": "TFA-TX-37XqPpVCjU7ReiycUg97",
"provider_ref": "565486545315"
}
{
"response_code": "00",
"response_text": "Transaction completed successfully",
"description": "Success! Amount of 4500 FCFA has been transfered to Moov CI Account 771111111",
"transaction_id": "TFA-TX-37XqPpVCjU7ReiycUg97",
"provider_ref": "565486545315"
}
{
"response_code": "00",
"response_text": "Transaction completed successfully",
"description": "Success! Amount of 4500 FCFA has been transfered to Wave Account 777777777",
"transaction_id": "TFA-TX-0sks0bagCMQkZ0SG91nc",
"provider_ref": "pt-67Ggh7zgm013syghghjkhgjh"
}
{
"response_code": "00",
"response_text": "Transaction completed successfully",
"description": "Success! Amount of 4500 FCFA has been transfered to T-money Account 771111111",
"transaction_id": "TFA-TX-37XqPpVCjU7ReiycUg97",
"provider_ref": "565486545315"
}
{
"response_code": "00",
"response_text": "Transaction completed successfully",
"description": "Success! Amount of 4500 FCFA has been transfered to MOOV-TOGO Account 98010101",
"transaction_id": "TFA-TX-37XqPpVCjU7ReiycUg97",
"provider_ref": "24020605401685281675"
}
{
"response_code": "00",
"status": "pending",
"response_text": "Transaction pending",
"description": "Transaction pending, please check the final status later through our status API",
"transaction_id": "TFA-TX-37XqPpVCjU7ReiycUg97"
}
{
"response_code": "00",
"response_text": "Transaction completed successfully",
"description": "Success! Amount of 200 FCFA has been transfered to Orange Money Burkina 66123421",
"transaction_id": "TFA-TX-37XqPpjCjU7ReiycUg97",
"provider_ref": "565486545315"
}
{
"response_code": "00",
"status": "pending",
"response_text": "Transaction pending",
"description": "Transaction pending, please check the final status later through our status API",
"transaction_id": "TFA-TX-37XqPpVCjU7ReiycUg97"
}
https://app.paydunya.com/api/v2/disburse/check-status
curl -H "Content-Type: application/json" \
-H "PAYDUNYA-MASTER-KEY: wQzk9ZwR-Qq9m-0hD0-zpud-je5coGC3FHKW" \
-H "PAYDUNYA-PRIVATE-KEY: test_private_rMIdJM3PLLhLjyArx9tF3VURAF5" \
-H "PAYDUNYA-TOKEN: IivOiOxGJuWhc5znlIiK" \
-X POST -d ' {"disburse_invoice": "hwTHAS0WvTmTaYT2zDoO"}' \
"https://app.paydunya.com/api/v2/disburse/check-status"
{
"response_code": "00",
"status": "success",
"token": " xZsV7x488d2yGCrJd2R ",
"withdraw_mode": "orange-money-senegal",
"amount": "203.00",
"updated_at": "11/01/2024 14:30:35",
"disburse_id": "78112205445565",
"transaction_id": "TFA-TX-NiP89775sdXKA1npWbI6M",
"disburse_tx_id": " CI000111.1430.A11197"
}
The disburse_id
will only appear if the merchant provides it when submitting invoice.
The different status :
created
success
pending
failed
response in case of data validation errors sent via an API
{
"response_code": ['1001', '5000'],
"response_text": text
}
withdraw_mode non pris en charge.
Service en maintenance, veuillez réessayer plus tard.
{
"response_code": ['401', '4002', '5000'],
"response_text": text
}
-Initiation not authorize
-You don't have enough funds. Consider crediting your account
-the callback is not accessible
-An error occured from our side. Please retry later.
-disburse_id already used.
{
"response_code": "5000",
"response_text": text
}
-An error occured from our side. Please retry later.
-disburse_id already used.