# Retrieve a withdrawal

`GET https://api.weavpayments.com/v1/withdrawals/{reference_id}`

The amount leaves your balance when the withdrawal is requested. If it fails, a `WITHDRAWAL_RETURNED` ledger entry puts it back.

## When it arrives

- **InstaPay:** right away.
- **PESONet:** credited in batches on banking days. Sent from 4:00 PM the day before to 10:00 AM: credited from 10:40 AM. Sent from 10:00 AM to 1:00 PM: from 1:40 PM. Sent from 1:00 PM to 4:00 PM: from 4:40 PM.
- Sent on a Friday after 4:00 PM, or on a Saturday or Sunday: credited the next Monday, from 10:40 AM. Check at the end of that day before contacting support.

## Path parameters

- `reference_id` (string, required): Pattern: ^WD[0-9A-Z]{12}$.

## Headers

- `Authorization` (string, required): `Bearer` plus your API key. See [Authentication](https://docs.weavpayments.com/authentication).

## Responses

### 200 OK

The withdrawal.

What `data` holds:

- `withdrawal` (object)
  - `reference_id` (string)
  - `currency` (string): ISO 4217. PHP today; more as they're enabled for your account. One of: `PHP`.
  - `amount` (number)
  - `fee` (number | null)
  - `total` (number | null): `amount` plus `fee`.
  - `status` (string): `PENDING`, `FOR_SETTLEMENT`, `COMPLETED` or `FAILED`. One of: `PENDING`, `FOR_SETTLEMENT`, `COMPLETED`, `FAILED`.
  - `rail` (string | null): INSTAPAY (real time) for 50,000.00 or less; PESONET (batch, not real time) above that, or when the bank isn't on InstaPay. Null for withdrawals made before rails were recorded. One of: `INSTAPAY`, `PESONET`.
  - `provider_reference_id` (string | null): The bank partner's transfer reference. Null until known.
  - `channel_reference_id` (string | null): The InstaPay or PESONet reference. Null until known.
  - `destination` (object): `bank_name`, `account_name`, `account_number_last4`. Never the full account number.
    - `bank_name` (string)
    - `account_name` (string)
    - `account_number_last4` (string)
  - `failure` (object | null): `code` and `message` when the withdrawal failed. `code` can be null.
    - `code` (string | null)
    - `message` (string)
  - `requested_at` (string (date-time))
  - `completed_at` (string (date-time) | null)
  - `failed_at` (string (date-time) | null)
  - `updated_at` (string (date-time))

```json
{
    "code": "2000000",
    "success": true,
    "message": "OK",
    "data": {
        "withdrawal": {
            "reference_id": "WD2H6J9K3L7M4N",
            "currency": "PHP",
            "amount": 119000.0,
            "fee": 10.0,
            "total": 119010.0,
            "status": "FOR_SETTLEMENT",
            "rail": "PESONET",
            "provider_reference_id": null,
            "channel_reference_id": null,
            "destination": {
                "bank_name": "Sample Bank",
                "account_name": "Sample Store Inc.",
                "account_number_last4": "4821"
            },
            "failure": null,
            "requested_at": "2026-10-25T14:05:00+08:00",
            "completed_at": null,
            "failed_at": null,
            "updated_at": "2026-10-25T14:30:00+08:00"
        }
    }
}
```

### 401 Unauthorized

Missing, malformed or unknown API key (code 4010000).

```json
{
    "code": "4010000",
    "success": false,
    "message": "Missing or invalid API key."
}
```

### 403 Forbidden

The key can't make this request (code 4030000): an address outside the key's IP allowlist, a live key before your live mode is on, or an account that isn't active. A live key sent from a browser is refused (code 4030001): keep live keys on your server.

```json
{
    "code": "4030000",
    "success": false,
    "message": "Requests with this key must come from an address on its allowlist."
}
```

### 404 Not Found

Not found in this mode for your account (code 4040000).

```json
{
    "code": "4040000",
    "success": false,
    "message": "Not found."
}
```

## Examples

cURL:

```shell
curl -X GET https://api.weavpayments.com/v1/withdrawals/WD8H2K4M6P9QRT \
    -H "Authorization: Bearer $WEAV_API_KEY"
```

Node.js:

```js
const url = 'https://api.weavpayments.com/v1/withdrawals/WD8H2K4M6P9QRT';
const response = await fetch(url, {
    method: 'GET',
    headers: {
        Authorization: `Bearer ${process.env.WEAV_API_KEY}`,
    },
});

const result = await response.json();
```

JavaScript:

```js
import axios from 'axios';

const response = await axios.request({
    method: 'get',
    url: 'https://api.weavpayments.com/v1/withdrawals/WD8H2K4M6P9QRT',
    headers: {
        Authorization: `Bearer ${process.env.WEAV_API_KEY}`,
    },
    // Read error answers too: their body has the error code.
    validateStatus: () => true,
});

const result = response.data;
```

PHP:

```php
use Illuminate\Support\Facades\Http;

$response = Http::withToken(config('services.weav.key'))
    ->get('https://api.weavpayments.com/v1/withdrawals/WD8H2K4M6P9QRT');

$result = $response->json();
```

Python:

```python
import os
import requests

response = requests.get(
    "https://api.weavpayments.com/v1/withdrawals/WD8H2K4M6P9QRT",
    headers={
        "Authorization": f"Bearer {os.environ['WEAV_API_KEY']}",
    },
    timeout=30,
)

result = response.json()
```

Go:

```go
package main

import (
    "fmt"
    "io"
    "net/http"
    "os"
)

func main() {
    req, err := http.NewRequest("GET", "https://api.weavpayments.com/v1/withdrawals/WD8H2K4M6P9QRT", nil)
    if err != nil {
        panic(err)
    }
    req.Header.Set("Authorization", "Bearer "+os.Getenv("WEAV_API_KEY"))

    res, err := http.DefaultClient.Do(req)
    if err != nil {
        panic(err)
    }
    defer res.Body.Close()

    result, err := io.ReadAll(res.Body)
    if err != nil {
        panic(err)
    }
    fmt.Println(res.Status, string(result))
}
```

Rust:

```rust
// Cargo.toml: reqwest = { version = "0.12", features = ["blocking", "json"] }, serde_json = "1"
fn main() -> Result<(), Box<dyn std::error::Error>> {
    let key = std::env::var("WEAV_API_KEY")?;

    let response = reqwest::blocking::Client::new()
        .get("https://api.weavpayments.com/v1/withdrawals/WD8H2K4M6P9QRT")
        .bearer_auth(key)
        .send()?;

    let status = response.status();
    let result: serde_json::Value = response.json()?;
    println!("{status} {result:#}");
    Ok(())
}
```

Java:

```java
import java.net.URI;
import java.net.http.HttpClient;
import java.net.http.HttpRequest;
import java.net.http.HttpResponse;

public class WeavExample {
    public static void main(String[] args) throws Exception {
        String url = "https://api.weavpayments.com/v1/withdrawals/WD8H2K4M6P9QRT";
        HttpRequest request =
                HttpRequest.newBuilder()
                        .uri(URI.create(url))
                        .header("Authorization", "Bearer " + System.getenv("WEAV_API_KEY"))
                        .GET()
                        .build();

        HttpResponse<String> response =
                HttpClient.newHttpClient().send(request, HttpResponse.BodyHandlers.ofString());
        System.out.println(response.statusCode() + " " + response.body());
    }
}
```
