Skip to main content

Documentation

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.

This method triggers the Wallet Status Changed Webhook and the Wallet Deleted Webhook.

Note

This endpoint replaces the deprecated endpoint - DELETE /v1/user/:wallet

Rapyd will continue to support the deprecated endpoint until December 31, 2024.

    • ewallet

    • ID of the wallet. String starting with ewallet_.

Code Samples
    • .NET

      • 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

      • 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
        $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

      • 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 -X delete
    https://sandboxapi.rapyd.net/v1/ewallets/ewallet_dc5fe877ee8af918b5e2cc3a24abd812
    -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": "5abf6a5b-d853-4d41-9c58-6631e0d96166"
        }
    }