API Docs

Deleting Wallets

You can delete wallets only if there are no funds in the account and no pending withdrawals and refunds. The response will provide detailed information about the deletion status and other relevant details.

Headers

  • Authorization: Bearer YOUR_SECRET_KEY
  • Content-Type: application/json

Query Parameters

  • wallet_id: string (required) - Wallet ID to be deleted.

Sample Request to Delete a Wallet

1. Delete Wallet using Wallet ID

cURL

curl -X DELETE "https://api.zuripay.app/v1/wallets/delete" \
-H "Authorization: Bearer zp_test_26PHem9AhJZvU623DfE1x4sd" \
-H "Content-Type: application/json" \
-d '{
  "wallet_id": "zp_1234567890"
}'

Python

import requests

url = "https://api.zuripay.app/v1/wallets/delete"

data = {
    "wallet_id": "zp_1234567890"
}

headers = {
    "Authorization": "Bearer zp_test_26PHem9AhJZvU623DfE1x4sd",
    "Content-Type": "application/json"
}

response = requests.delete(url, headers=headers, json=data)

if response.status_code == 200:
    print("Wallet deletion details:", response.json())
else:
    print("Error:", response.status_code, response.text)

Sample Responses

Successful Wallet Deletion (200)

{
    "result": "success",
    "wallet_id": "zp_1234567890",
    "message": "Wallet deleted successfully."
}

Bad Request (400)

{
    "result": "error",
    "message": "Invalid request parameters."
}

Unauthorized (401)

{
    "result": "error",
    "message": "Unauthorized. Please provide a valid API key."
}

Internal Server Error (500)

{
    "result": "error",
    "message": "Internal server error. Please try again later."
}

Wallet Has Funds (409)

{
    "result": "error",
    "message": "Wallet still has funds. Please withdraw the funds before deleting the wallet."
}