---
title: "Delete Beneficiary"
source_url: https://docs.rapyd.net/en/delete-beneficiary.html
lang: en
---

# Delete Beneficiary

Delete a payout beneficiary from the Rapyd platform.

> **Note:**
>
> - The code samples include successful requests (200) and bad requests (400).
>
>   - For error messages that appear due to bad requests (400), see:
>
>     - [General Errors](https://docs.rapyd.net/en/general-errors.md "General Errors")
>     - [Payout Errors](https://docs.rapyd.net/en/payout-errors.md "Payout Errors")
>   - For information about unauthorized request (401) and other authentication errors, see [Troubleshooting Authentication and Authorization Errors](https://docs.rapyd.net/en/troubleshooting-authentication-and-authorization-errors.md "Troubleshooting Authentication and Authorization Errors").

### Parameters

### Request Header Parameters

- - access_key
  - Unique access key provided by Rapyd for each authorized user.

    See [Developers](https://docs.rapyd.net/en/developers.md "Developers").
- - Content-Type
  - Indicates that the data appears in JSON format. Set to **application/json**.
- - salt
  - Random string. Recommended length: 8-16 characters.
- - signature
  - Signature calculated for each request individually.

    See [Request Signatures](https://docs.rapyd.net/en/request-signatures.md "Request Signatures").
- - timestamp
  - Timestamp for the request, in [Unix time](https://docs.rapyd.net/en/glossary.md#UUID-945d98cf-adae-e1cf-2606-c7fae8b4a7e1_unix_time "Unix time") (seconds).

### Request Path Parameters

- beneficiary
- ID of the `beneficiary` object. String starting with **beneficiary_**.

### Response Parameters

- - deleted
  - Indicates that the request to delete a beneficiary from the Rapyd platform succeeded.
- - id
  - ID of the 'beneficiary' object. String starting with **beneficiary_**.

- - .NET

    - ```csharp
      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

    - ```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
      <?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

    - ```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
  curl -X delete 'https://sandboxapi.rapyd.net/v1/payouts/beneficiary/beneficiary_cb009f46c8dcd85004c8054541287723' \
  -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'
  ```
- ```json
  {
      "status": {
          "error_code": "",
          "status": "SUCCESS",
          "message": "",
          "response_code": "",
          "operation_id": "a805b606-0300-43c8-af78-0e5748a45501"
      },
      "data": {
          "deleted": true,
          "id": "beneficiary_cb009f46c8dcd85004c8054541287723"
      }
  }
  ```

- Bad Request - Beneficiary Not Found
- ```curl
  curl -X delete 'https://sandboxapi.rapyd.net/v1/payouts/beneficiary/beneficiarycb009f46c8dcd85004c8054541287723' \
  -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'
  ```
- ```json
  {
      "status": {
          "error_code": "ERROR_DELETE_PAYOUT_BENEFICIARY",
          "status": "ERROR",
          "message": "The request tried to delete a beneficiary, but the beneficiary was not found. The request was rejected. Corrective action: Use the ID of a valid beneficiary.",
          "response_code": "ERROR_DELETE_PAYOUT_BENEFICIARY",
          "operation_id": "cffb2530-3704-4911-979a-0bfae10bd317"
      }
  }
  ```
