Payout Copy section link Copied!
Payout to vendors can be done only when the funds are received and the payment split has been validated.
You can use two different payout methods:
- One-off Payout on a bank account via the /payout/create API
- Recurring Payout via the /paymentAccount/payoutAuto API
Implementing the Payout API is optional. AgoraPay can trigger automatic and periodic payout operations. Please contact your implementation manager to set up this option.
One-off payout Copy section link Copied!
To make a one-off payout, invoke the /payout/create request specifying:
Example Copy section link Copied!
{
"accountNumber": "1300600000EUR01006110",
"reason": "test",
"endToEndId": "ETEID-20210203142803584",
"paymentMethodAlias": "PM2021011300GLR1100",
"metaData": {
"Metadata3": "donn\u00e9e3",
"Metadata4": "donnee4"
},
"payoutAmount": {
"value": "200",
"currency": "EUR"
},
"commission": {
"amount": "1.00",
"account": "1300600000EUR60002411"
}
}
Here is a JSON payload for an example request:
Retrieving the result Copy section link Copied!
If the request is successful, you will receive a registerReponse object, containing the following information:
Example Copy section link Copied!
Here is a successful request example payload:
{
"resultCode": "0",
"transactionId": "1289921"
}
Error handling Copy section link Copied!
If you encounter any error, you can check API error codes page for troubleshooting.
Recurring payout Copy section link Copied!
A recurring payout allows you to schedule payouts with a specific amount on weekly or monthly basis.
To create a recurring payout, invoke the /paymentAccount/payoutAuto request specifying:
Example Copy section link Copied!
Here is an example request JSON payload:
{
"accountNumber": "1300600000EUR01005110",
"amount": "200.00",
"frequency": "2",
"dayOfWeek": "1",
"paymentMethodAlias": "PM2021011300GLR1100"
}
Retrieving the result Copy section link Copied!
If the request is successful, you will receive a paymentAccountPayautoResponse object, containing the following information:
Example Copy section link Copied!
Here is a successful JSON payload response example:
1 2 3 4 |
|
Error handling Copy section link Copied!
If you encounter any error, you can check API error codes page for troubleshooting.