---
updatedAt: 2026-09-07T10:30:07.000Z
agentTools:
  projectIndex: https://docs.itispay.com/llms.txt
---

# Withdraw cryptocurrency to an external wallet

Initiate a cryptocurrency withdrawal to an external wallet address.

The API validates the request, sends the withdrawal, and returns transaction details including the fee and transaction ID.

# OpenAPI definition

```json
{
  "openapi": "3.1.0",
  "info": {
    "title": "Cryptocurrency Invoice API",
    "version": "1.1.0",
    "description": "REST API for generating and managing cryptocurrency invoices with support for multiple transactions per invoice",
    "license": {
      "name": "MIT",
      "url": "https://opensource.org/licenses/MIT"
    },
    "contact": {
      "name": "API Support",
      "email": "api@itispay.com",
      "url": "https://itispay.com/support"
    }
  },
  "servers": [
    {
      "url": "https://api.itispay.com",
      "description": "Production server"
    }
  ],
  "components": {
    "securitySchemes": {
      "ApiKeyAuth": {
        "type": "apiKey",
        "in": "header",
        "name": "Api-key",
        "description": "To obtain an API key, you must register on https://itispay.com. After successful registration, you can access your API key through your account dashboard. Provide your API key in the Api-key header as: Api-key: YOUR_API_KEY"
      }
    },
    "schemas": {
      "ErrorDetail": {
        "type": "object",
        "properties": {
          "field": {
            "type": "string",
            "description": "Name of the field that has the error"
          },
          "message": {
            "type": "string",
            "description": "Specific error message for the field"
          }
        }
      },
      "ErrorContent": {
        "type": "object",
        "properties": {
          "code": {
            "type": "integer",
            "description": "HTTP status code"
          },
          "message": {
            "type": "string",
            "description": "Main error message"
          },
          "details": {
            "type": "array",
            "description": "Array of field-specific error details (optional, empty for non-validation errors)",
            "items": {
              "$ref": "#/components/schemas/ErrorDetail"
            }
          }
        }
      },
      "Error": {
        "type": "object",
        "properties": {
          "error": {
            "$ref": "#/components/schemas/ErrorContent"
          }
        }
      },
      "WithdrawRequest": {
        "type": "object",
        "required": [
          "currency",
          "to",
          "amount"
        ],
        "properties": {
          "currency": {
            "type": "string",
            "description": "Cryptocurrency code (e.g., BTC, ETH, USDT)",
            "example": "BTC"
          },
          "to": {
            "type": "string",
            "description": "Destination wallet address for the withdrawal",
            "example": "bc1qxy2kgdygjrsqtzq2n0yrf2493p83kkfjhx0wlh"
          },
          "amount": {
            "type": "string",
            "description": "Amount to withdraw in native cryptocurrency units (e.g., \"0.002\" for BTC, \"100\" for USDT)",
            "example": "0.002"
          }
        }
      },
      "WithdrawResponse": {
        "type": "object",
        "properties": {
          "status": {
            "type": "string",
            "description": "Withdrawal transaction status",
            "example": "pending"
          },
          "fee": {
            "type": "string",
            "description": "Transaction fee in native cryptocurrency units",
            "example": "0.0001"
          },
          "wallet_hash": {
            "type": "string",
            "description": "Destination wallet address",
            "example": "bc1qxy2kgdygjrsqtzq2n0yrf2493p83kkfjhx0wlh"
          },
          "amount": {
            "type": "string",
            "description": "Withdrawal amount",
            "example": "0.002"
          },
          "txn_id": {
            "type": "string",
            "description": "Transaction ID for tracking the withdrawal",
            "example": "txn_abc123def456"
          }
        }
      }
    }
  },
  "security": [
    {
      "ApiKeyAuth": []
    }
  ],
  "tags": [
    {
      "name": "Crypto deposit/withdraw",
      "description": "Reusable cryptocurrency deposit addresses, custody wallet hashes, and crypto withdrawals."
    }
  ],
  "paths": {
    "/api/v1/withdraw-pgw": {
      "post": {
        "summary": "Withdraw cryptocurrency to an external wallet",
        "description": "Initiate a cryptocurrency withdrawal to an external wallet address.\n\nThe API validates the request, sends the withdrawal, and returns transaction details including the fee and transaction ID.",
        "operationId": "withdraw",
        "tags": [
          "Crypto deposit/withdraw"
        ],
        "requestBody": {
          "required": true,
          "content": {
            "application/json": {
              "schema": {
                "$ref": "#/components/schemas/WithdrawRequest"
              },
              "examples": {
                "btc_withdrawal": {
                  "summary": "Bitcoin withdrawal",
                  "value": {
                    "currency": "BTC",
                    "to": "bc1qxy2kgdygjrsqtzq2n0yrf2493p83kkfjhx0wlh",
                    "amount": "0.002"
                  }
                },
                "usdt_withdrawal": {
                  "summary": "USDT withdrawal",
                  "value": {
                    "currency": "USDT",
                    "to": "0x742d35Cc6634C0532925a3b844Bc9e7595f8fE8a",
                    "amount": "100"
                  }
                }
              }
            }
          }
        },
        "responses": {
          "200": {
            "description": "Withdrawal initiated successfully",
            "content": {
              "application/json": {
                "schema": {
                  "$ref": "#/components/schemas/WithdrawResponse"
                },
                "example": {
                  "status": "pending",
                  "fee": "0.0001",
                  "wallet_hash": "bc1qxy2kgdygjrsqtzq2n0yrf2493p83kkfjhx0wlh",
                  "amount": "0.002",
                  "txn_id": "txn_abc123def456"
                }
              }
            }
          },
          "400": {
            "description": "Bad request - invalid request body",
            "content": {
              "application/json": {
                "schema": {
                  "$ref": "#/components/schemas/Error"
                }
              }
            }
          },
          "401": {
            "description": "Unauthorized - missing API key",
            "content": {
              "application/json": {
                "schema": {
                  "$ref": "#/components/schemas/Error"
                }
              }
            }
          },
          "422": {
            "description": "Validation failed",
            "content": {
              "application/json": {
                "schema": {
                  "$ref": "#/components/schemas/Error"
                }
              }
            }
          },
          "500": {
            "description": "Internal server error - withdrawal processing failed",
            "content": {
              "application/json": {
                "schema": {
                  "$ref": "#/components/schemas/Error"
                }
              }
            }
          },
          "501": {
            "description": "Not Implemented - withdrawal is not supported for this project",
            "content": {
              "application/json": {
                "schema": {
                  "$ref": "#/components/schemas/Error"
                },
                "example": {
                  "error": {
                    "code": 501,
                    "message": "Withdraw is not supported for this project",
                    "details": []
                  }
                }
              }
            }
          }
        }
      }
    }
  }
}
```