Skip to main content

Documentation

Delete Beneficiary

Delete a payout beneficiary from the Rapyd platform.

  • beneficiary

  • ID of the beneficiary object. String starting with beneficiary_.

    • deleted

    • Indicates whether the beneficiary was deleted.

    • id

    • ID of the beneficiary. String starting with beneficiary_.

    • .NET

      • using System;
        
        namespace RapydApiRequestSample
        {
            class Program
            {
                static void Main(string[] args)
                {
                    try
                    {
                        string beneficiaryId = "beneficiary_008d839a9d5726ba014c3ccb21c59920";
        
                        string result = RapydApiRequestSample.Utilities.MakeRequest("DELETE", $"/v1/payouts/beneficiary/{beneficiaryId}");
        
                        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/beneficiary/beneficiary_008d839a9d5726ba014c3ccb21c59920'
            );
        
            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/beneficiary/beneficiary_008d839a9d5726ba014c3ccb21c59920');
            var_dump($object);
        } catch(Exception $e) {
            echo "Error: $e";
        }
        ?>
    • Python

      • from pprint import pprint
        
        from utilities import make_request
        
        beneficiary_id = 'beneficiary_008d839a9d5726ba014c3ccb21c59920'  
        delete_result = make_request(method='delete',
                                     path=f'/v1/payouts/beneficiary/{beneficiary_id}')
        pprint(delete_result)
  • /v1/payouts/beneficiary/:beneficiary

  • Delete Beneficiary

  • curl -X delete
    https://sandboxapi.rapyd.net/v1/payouts/beneficiary/beneficiary_008d839a9d5726ba014c3ccb21c59920
    -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": "4bbc2c18-dc4c-41b4-9283-c6526e9caf8b"
    	},
    	"data": {
    		"deleted": true,      
        "id": "beneficiary_008d839a9d5726ba014c3ccb21c59920"
    	}
    }