Creating a Payout
Payouts are directed to the bank account specified either at the shop or company level.
Authenticating the Request
To initiate a payout and withdraw funds from the account, you need to authenticate the request using an OAuth token with the client_credentials
type. This token should be generated using the configuration keys of the point of sale (POS) associated with the shop from which you are withdrawing the funds.
Creating a Payout
With the API for withdrawing funds, you have the flexibility to choose between making a full or a partial payout.
To initiate either a full or a partial payout, you need to send an HTTP POST request to the /api/v2_1/payouts
endpoint. The process for both types of payouts is similar, with the only difference being that for a partial payout, you must include the payout
object in the request body, which contains the amount
parameter specifying the specific amount to be withdrawn. For a full payout request, the amount
parameter is not required since you are withdrawing the entire available balance.
- Full Payout
- Partial Payout
curl -X POST https://secure.payu.com/api/v2_1/payouts \
-H "Content-Type: application/json" \
-H "Authorization: Bearer 3e5cac39-7e38-4139-8fd6-30adc06a61bd" \
-d '{
"shopId": "n7Cd7y1U"
}'
curl -X POST https://secure.payu.com/api/v2_1/payouts \
-H "Content-Type: application/json" \
-H "Authorization: Bearer 3e5cac39-7e38-4139-8fd6-30adc06a61bd" \
-d '{
"shopId": "n7Cd7y1U",
"payout":
{
"amount": 1100
}
}'
Other necessary data for the payout request, will be automatically supplemented from the information stored in the PayU system.
{
"payout": {
"payoutId": "133bfe5f400e4b2c8da44abfdf753d79",
"extPayoutId": "123123",
"status": "PENDING"
},
"status": {
"statusCode": "SUCCESS"
}
}
For details on parameters, please refer to the Create a Payout section in our API Reference.