Cancel Payouts
The cancel bulk payouts API is used to cancel an existing payout.
Note
You can only cancel payout only when the status is still pending. Otherwise, it throws the appropriate error message.
{
"status": 400,
"data": null,
"message": "error has occurred",
"error": {
"id": "2d1ff657-e437-438e-ba9d-8618b6865682",
"details": "rpc error: code = Unknown desc = unable to cancel payout. funds might have been disbursed",
"message": "Unable to cancel payout. funds might have been disbursed."
}
}
HTTP Method : POST
API Endpoint : {{base_url}}/api/v1/payouts/cancel
Sample cURL Request
curl --location 'https://sandbox-api.ovalfi-app.com/api/v1/payouts/cancel' \
--header 'Authorization: Bearer eyJidXNpbmVzc0lEIjoiYmEwY2E1NGMtZjRkYi00NDU5LWE4MDYtOTZkYzA3NWIzZjlkIiwidXNlcklEIjoiM2E5NjhiOWYtMzU5MC00ODZhLWE1MTMtYzg2MzkzZjZmYWI4Iiwia2V5IjoiaGFsZWVtYWgifQ==' \
--header 'Signature: 8042e424f924a236e9c8b4c6a76991ffeee24328d39cbb8a31d16cbca9948bf2' \
--header 'Content-Type: application/json' \
--data '{
"PayoutID":"27b792ba-cae6-4f9b-8aba-7711087cc4f0",
"reason": "na by force?"
}'
Sample JSON Request
{
"PayoutID":"27b792ba-cae6-4f9b-8aba-7711087cc4f0",
"reason": "na by force?"
}
Response
{
"status": 200,
"data": true,
"message": "Payout cancelled successfully!",
"error": null
}
Updated 9 months ago