> ## Documentation Index
> Fetch the complete documentation index at: https://docs-openpay.nipuntheekshana.com/llms.txt
> Use this file to discover all available pages before exploring further.

# Create Withdrawal

> Request a withdrawal of available funds to your bank account

## Authentication

This endpoint requires a **Bearer token** in the `Authorization` header.

```
Authorization: Bearer <your_jwt_token>
```

## Body Parameters

<ParamField body="amount" type="number" required>
  The amount to withdraw. Must not exceed the current available balance.
</ParamField>

<ParamField body="bankAccountNumber" type="string" required>
  The destination bank account number for the withdrawal.
</ParamField>

<ParamField body="bankName" type="string" required>
  The name of the bank (e.g., `Commercial Bank`, `Bank of Ceylon`, `Sampath Bank`).
</ParamField>

<ParamField body="bankBranch" type="string" required>
  The branch name or code of the bank.
</ParamField>

## Response

<ResponseField name="id" type="string">
  Unique identifier for the withdrawal request.
</ResponseField>

<ResponseField name="amount" type="number">
  The withdrawal amount.
</ResponseField>

<ResponseField name="status" type="string">
  The withdrawal status. Newly created withdrawals have the status `pending`.
</ResponseField>

<ResponseField name="bankAccountNumber" type="string">
  The destination bank account number.
</ResponseField>

<ResponseField name="bankName" type="string">
  The bank name.
</ResponseField>

<ResponseField name="bankBranch" type="string">
  The bank branch.
</ResponseField>

<ResponseField name="createdAt" type="string">
  ISO 8601 timestamp of when the withdrawal was requested.
</ResponseField>

<Info>
  Withdrawals are reviewed and processed by the admin team. You will receive a webhook notification when the withdrawal status changes to `approved` or `rejected`.
</Info>

<RequestExample>
  ```json Request theme={null}
  {
    "amount": 500.00,
    "bankAccountNumber": "1234567890",
    "bankName": "Commercial Bank",
    "bankBranch": "Colombo Main"
  }
  ```
</RequestExample>

<ResponseExample>
  ```json 200 theme={null}
  {
    "id": "wd_abc123def456",
    "amount": 500.00,
    "status": "pending",
    "bankAccountNumber": "1234567890",
    "bankName": "Commercial Bank",
    "bankBranch": "Colombo Main",
    "createdAt": "2026-03-26T14:30:00Z"
  }
  ```
</ResponseExample>
