post
https://api.myvendy.com/payout/cancel-payout
Recent Requests
Log in to see full request history
| Time | Status | User Agent | |
|---|---|---|---|
Retrieving recent requests… | |||
Loading…
Cancels a payout that is still pending. The amount is refunded to the wallet and a payout_cancelled webhook is sent.
Request:
| Field | Type | Required | Description |
|---|---|---|---|
| id | String | Yes | The payout's refid, as returned by Initiate Payout. Not its numeric id |
Example request
curl --location 'https://api.myvendy.com/payout/cancel-payout' \
--header 'Content-Type: application/json' \
--header "AccessKey: $VENDY_ACCESS_KEY" \
--header "SecretKey: $VENDY_SECRET_KEY" \
--data '{
"id": "ebb8c13f-8e59-4d63-b214-09f3225b8cf1"
}'Response:
| Field | Type | Description |
|---|---|---|
| status | Boolean | States if request was successfully executed or not |
| code | Integer | Internal code, success if 200 |
| msg | String | A description of the status of the request |
| data | JSON | Empty |
Example response
{
"status": true,
"code": 200,
"msg": "Payout has been cancelled",
"error": "Payout has been cancelled",
"data": {}
}Possible errors
| Error code | Description |
|---|---|
204 | Input is invalid. id is missing (the message names it payoutId) |
329 | Payout not found. Check you sent the refid |
330 | Payout already processed. Only pending payouts can be cancelled |
