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

# Delete Wallet

Delete a Rapyd Wallet.

Use this method when the wallet has never been used.

Close all virtual accounts issued to the wallet before using this method. See [Delete Virtual Account](https://docs.rapyd.net/en/delete-virtual-account.md "Delete Virtual Account").

This method triggers the [Wallet Status Changed Webhook](https://docs.rapyd.net/en/wallet-status-changed-webhook.md "Wallet Status Changed Webhook") and the [Wallet Deleted Webhook](https://docs.rapyd.net/en/wallet-deleted-webhook.md "Wallet Deleted Webhook").

> **Note:**
>
> - Alternatively, use the [Change Wallet Status](https://docs.rapyd.net/en/change-wallet-status.md "Change Wallet Status") request to delete an unused wallet.
> - This endpoint replaces the deprecated endpoint - `delete /v1/user/:wallet`
>
>   Rapyd no longer supports the deprecated endpoint.
> - 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")
>     - [Wallet Errors](https://docs.rapyd.net/en/wallet-errors.md "Wallet Errors")
>     - [Wallet Contact Errors](https://docs.rapyd.net/en/wallet-contact-errors.md "Wallet Contact 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 Path Parameters

- - ewallet
  - ID of the wallet. String starting with **ewallet_**.

### 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).

### Response Parameters

None.

### Code Samples

- - .NET

    - ```csharp
      using System;

      namespace RapydApiRequestSample
      {
          class Program
          {
              static void Main(string[] args)
              {
                  try
                  {
                      string wallet = "ewallet_dc5fe877ee8af918b5e2cc3a24abd812";

                      string result = RapydApiRequestSample.Utilities.MakeRequest("DELETE", $"/v1/user/{wallet}");

                      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/user/ewallet_dc5fe877ee8af918b5e2cc3a24abd812');

          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/user/ewallet_dc5fe877ee8af918b5e2cc3a24abd812');
          var_dump($object);
      } catch(Exception $e) {
          echo "Error: $e";
      }
      ?>
      ```
- - Python

    - ```python
      from pprint import pprint

      from utilities import make_request

      wallet_id = 'ewallet_dc5fe877ee8af918b5e2cc3a24abd812'
      delete_results = make_request(method='delete', path=f'/v1/user/{wallet_id}')

      pprint(delete_results)
      ```

- /v1/ewallets/:ewallet

- Delete Wallet
- ```curl
  curl -X delete 'https://sandboxapi.rapyd.net/v1/ewallets/ewallet_2c9ce67d262955f925b671030639a55a' \
  -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": "43372387-f200-4071-bdd4-47126adc26e0"
      }
  }
  ```

- Bad Request - Deleted Wallet
- ```curl
  curl -X delete 'https://sandboxapi.rapyd.net/v1/ewallets/ewallet_2c9ce67d262955f925b671030639a55a' \
  -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_GET_USER",
          "status": "ERROR",
          "message": "The request attempted an operation that requires a wallet, but the wallet was not found. The request was rejected. Corrective action: Use the ID of a valid wallet that has not been deleted. The ID is a string starting with 'ewallet_'.",
          "response_code": "ERROR_GET_USER",
          "operation_id": "5400d046-68e6-4ded-b05f-e30b39a4b6f0"
      }
  }
  ```
