Skip to main content

Documentation

Cancel Payout

Cancel a payout.

The payout can be canceled unless its status is confirmation or completed.

This method triggers the Payout Canceled Webhook. This webhook contains the same information as the response.

Note

    • payout

    • ID of the payout. String starting with payout_.

    • .NET

      • using System;
        
        namespace RapydApiRequestSample
        {
            class Program
            {
                static void Main(string[] args)
                {
                    try
                    {
                        string payout = "payout_83a845966bdde5e999b2ac94b1faf949";
        
                        string result = RapydApiRequestSample.Utilities.MakeRequest("DELETE", $"/v1/payouts/{payout}");
        
                        Console.WriteLine(result);
                    }
                    catch (Exception e)
                    {
                        Console.WriteLine("Error completing request: " + e.Message);
                    }
                }
            }
        }
    • JavaScript

      • const makeRequest = require('<path-to-your-utility-file>/utilities').makeRequest;
        
        async function main() {
          try {
            const result = await makeRequest(
              'DELETE',
              '/v1/payouts/payout_83a845966bdde5e999b2ac94b1faf949'
            );
        
            console.log(result);
          } catch (error) {
            console.error('Error completing request', error);
          }
        }
    • PHP

      • <?php
        $path = $_SERVER['DOCUMENT_ROOT'];
        $path .= "/<path-to-your-utility-file>/utilities.php";
        include($path);
        
        try {
            $object = make_request('delete', '/v1/payouts/payout_83a845966bdde5e999b2ac94b1faf949');
            var_dump($object);
        } catch(Exception $e) {
            echo "Error: $e";
        }
        ?>
    • Python

      • from pprint import pprint
        
        from utilities import make_request
        
        payout = 'payout_83a845966bdde5e999b2ac94b1faf949'  
        results = make_request(method='delete',
                               path=f'/v1/payouts/{payout}')
        pprint(results)
        
  • /v1/payouts/:payout

  • Cancel Payout

  • curl -X delete 'https://sandboxapi.rapyd.net/v1/payouts/payout_322a76b6db7caba4e2c724e543c82491' \
    -H 'access_key: your-access-key-here' \
    -H 'Content-Type: application/json' \
    -H 'salt: your-random-string-here' \
    -H 'signature: your-calculated-signature-here' \
    -H 'timestamp: your-unix-timestamp-here'
  • {
        "status": {
            "error_code": "",
            "status": "SUCCESS",
            "message": "",
            "response_code": "",
            "operation_id": "0f98c1e9-a0ef-47f0-9b0a-3760b34de298"
        },
        "data": {
            "id": "payout_322a76b6db7caba4e2c724e543c82491",
            "payout_type": "bank",
            "payout_method_type": "at_sepa_bank",
            "amount": 110,
            "payout_currency": "EUR",
            "sender_amount": 110,
            "sender_currency": "EUR",
            "status": "Canceled",
            "sender_country": "DK",
            "sender": {
                "id": "sender_24ce5a9fde75125e36d5b4ba457ff616",
                "first_name": "John Doe",
                "country": "DK",
                "entity_type": "individual",
                "address": "123 First Street",
                "date_of_birth": "22/02/1980",
                "date_of_incorporation": "31/12/2000",
                "postcode": "12345",
                "city": "Anytown",
                "phone_number": "436641234568",
                "currency": "EUR",
                "identification_type": "work_permit",
                "identification_value": "123456789",
                "source_of_income": "salary"
            },
            "beneficiary_country": "AT",
            "beneficiary": {
                "id": "beneficiary_31b1d2244d7278d7c696d53e92588e62",
                "first_name": "Jane",
                "country": "AT",
                "entity_type": "individual",
                "address": "456SecondStreet",
                "name": "Jane",
                "date_of_birth": "15/12/1985",
                "postcode": "10101",
                "city": "Anytown",
                "phone_number": "436641234567",
                "currency": "EUR",
                "identification_type": "identification_id",
                "identification_value": "*********",
                "iban": "AT611904300234573201"
            },
            "fx_rate": 1,
            "instructions": [
                {
                    "name": "instructions",
                    "steps": [
                        {
                            "step1": "The funds will be transferred to the provided account details of the beneficiary"
                        }
                    ]
                }
            ],
            "instructions_value": {},
            "ewallets": [
                {
                    "ewallet_id": "ewallet_4f1757749b8858160274e6db49f78ff3",
                    "amount": 110,
                    "percent": 100
                }
            ],
            "metadata": {},
            "description": "Payout - Bank Transfer: Beneficiary/Sender objects",
            "created_at": 1762771170,
            "payout_fees": null,
            "expiration": null,
            "merchant_reference_id": "2025-11-10B",
            "paid_at": null,
            "identifier_type": null,
            "identifier_value": null,
            "error": null,
            "paid_amount": 0,
            "statement_descriptor": "SPARE PARTS",
            "gc_error_code": null,
            "batch_file": null,
            "crypto_payout_hash": null
        }
    }
  • Bad Request - Payout Not Found

  • curl -X delete 'https://sandboxapi.rapyd.net/v1/payouts/payout_af69206aec6c2a22327f774f08d4ae32' \
    -H 'access_key: your-access-key-here' \
    -H 'Content-Type: application/json' \
    -H 'salt: your-random-string-here' \
    -H 'signature: your-calculated-signature-here' \
    -H 'timestamp: your-unix-timestamp-here'
  • {
        "status": {
            "error_code": "ERROR_CANCEL_PAYOUT",
            "status": "ERROR",
            "message": "The request tried to cancel a payout, but the payout type was not cancelable, the payout was not found, or the payout was in 'confirmed' or 'completed' status. The request was rejected. Corrective action: None. Determine why an attempt was made to cancel a payout that was not cancelable.",
            "response_code": "ERROR_CANCEL_PAYOUT",
            "operation_id": "71b5f972-e198-481e-90d1-1fbc052c154e"
        }
    }
  • Unauthorized

  • curl -X delete 'https://sandboxapi.rapyd.net/v1/payoutss/payout_af69206aec6c2a22327f774f08d4ae32' \
    -H 'access_key: your-access-key-here' \
    -H 'Content-Type: application/json' \
    -H 'salt: your-random-string-here' \
    -H 'signature: your-calculated-signature-here' \
    -H 'timestamp: your-unix-timestamp-here'
  • {
        "status": {
            "error_code": "UNAUTHORIZED_API_CALL",
            "status": "ERROR",
            "message": "",
            "response_code": "UNAUTHORIZED_API_CALL",
            "operation_id": "5463f070-48b8-48ee-96c6-3e9c2d6bfa95"
        }
    }