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 withdraw your customers in several ways, namely by ORANGE MONEY PURSE
and by the account PayDunya
. For this you will need three 03 keys
in the format JSON
.
The three 03 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"
.
For "PayDunya account"
, you simply must not use the key JSON"
withdraw_mode"
.
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 :
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.
orange-money-mali
: for Orange Money Mali wallet.
https://app.paydunya.com/api/v1/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" }' \
"https://app.paydunya.com/api/v1/disburse/get-invoice"
“account_alias”
and “amount”
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.
{
"response_code": "00",
"disburse_token": "hwTHAS0WvTmTaYT2zDoO"
}
https://app.paydunya.com/api/v1/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}' \
"https://app.paydunya.com/api/v1/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.
https://app.paydunya.com/api/v1/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/v1/disburse/submit-invoice"
{
"response_code": "00",
"response_text": "Transaction completed successfully",
"description": " Success! PayDunya withdrawal code corresponding to an amount of 4500 FCFA has been transfered to Christopher Jean. Phone number: 771111111",
"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",
"response_text": "Transaction pending",
"description": "Transaction pending, please check the final status later through our status API or contact our customer care",
"transaction_id": "TFA-TX-37XqPpVCjU7ReiycUg97",
"provider_ref": null
}
{
"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_text' => 'PENDING',
'description' => 'Transaction in pending'
}
https://app.paydunya.com/api/v1/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/v1/disburse/check-status"
{
"status": "success",
"token": "hwTHAS0WvTmTaYT2zDoO",
"withdraw_mode": "orange-money-senegal",
"amount": "4500",
"updated_at": "20/04/2020 15:57"
}
Withdrawal mode not supported
{
"response_code": "1001",
"response_text":
" Withdrawal mode not supported!"
}
Not enough funds in the PayDunya sender's account
{
"response_code": "4002",
"response_text": " You don't have enough funds. Consider crediting your account",
}
The minimum amount is greater than the amount to be withdrawn
{
"response_code": "4003",
"response_text": " Deposit failed! The amount must be greater than 200 FCFA."
}