# List checkouts

`GET https://api.weavpayments.com/v1/checkouts`

Your checkouts in this mode, newest first, with [cursor pagination](https://docs.weavpayments.com/pagination).

## Query parameters

- `per_page` (integer): Items per page, 25 by default; values above 100 become 100. At least 1. Default: 25.
- `cursor` (string): The `next_cursor` or `prev_cursor` from the previous page. Up to 1024 characters.
- `date_from` (string (date)): Start date (Asia/Manila), inclusive. Send with `date_to`.
- `date_to` (string (date)): End date (Asia/Manila), inclusive.
- `status` (string): Only checkouts with this status. `OPEN`, `COMPLETED`, `EXPIRED` or `CANCELLED`. One of: `OPEN`, `COMPLETED`, `EXPIRED`, `CANCELLED`.
- `external_reference_id` (string): Up to 64 characters.

## Headers

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

## Responses

### 200 OK

Your checkouts in this mode, newest first.

What `data` holds:

- `checkouts` (array of objects)
  - `reference_id` (string)
  - `external_reference_id` (string | null)
  - `type` (string): One of: `ORDER`, `AMOUNT`.
  - `status` (string): One of: `OPEN`, `COMPLETED`, `EXPIRED`, `CANCELLED`.
  - `currency` (string): ISO 4217. PHP today; more as they're enabled for your account. One of: `PHP`.
  - `amount` (number): The total, in pesos.
  - `description` (string | null)
  - `items` (array of objects)
    - `name` (string, required): Up to 255 characters.
    - `quantity` (integer, required): At least 1. At most 9999.
    - `unit_amount` (number, required): Pesos, as a JSON number.
    - `amount` (number): `quantity` × `unit_amount`.
  - `channels` (array of strings | null): One of: `QR_PH`, `GCASH`, `MAYA`, `CARD`, `PAY_AND_GO`, `PALAWANPAY`, `BAYAD`.
  - `qr_ph_apps` (array of strings | null)
  - `customer` (object)
    - `id` (string | null): Your ID for the customer, with `save_payment_method`.
    - `name` (string | null)
    - `email` (string | null)
    - `mobile_no` (string | null)
  - `save_payment_method` (boolean): A card payment also saves the card (the payment's `payment_method_id`).
  - `checkout_url` (string (uri))
  - `success_url` (string | null)
  - `cancel_url` (string | null)
  - `webhook_url` (string | null)
  - `payment` (any): The payment that paid it.
  - `expires_at` (string (date-time))
  - `completed_at` (string (date-time) | null)
  - `expired_at` (string (date-time) | null)
  - `cancelled_at` (string (date-time) | null)
  - `created_at` (string (date-time))
  - `updated_at` (string (date-time))
- `pagination` (object)
  - `per_page` (integer, required)
  - `next_cursor` (string | null, required)
  - `prev_cursor` (string | null, required)
  - `is_last_page` (boolean, required)

```json
{
    "code": "2000000",
    "success": true,
    "message": "OK",
    "data": {
        "checkouts": [
            {
                "reference_id": "CK4T8M2Q7X9KBA",
                "external_reference_id": "ORD-10541",
                "type": "ORDER",
                "status": "COMPLETED",
                "currency": "PHP",
                "amount": 1250.0,
                "description": null,
                "items": [
                    {
                        "name": "Canvas tote bag",
                        "quantity": 1,
                        "unit_amount": 1000.0,
                        "amount": 1000.0
                    },
                    {
                        "name": "Canvas Strap",
                        "quantity": 2,
                        "unit_amount": 125.0,
                        "amount": 250.0
                    }
                ],
                "channels": null,
                "qr_ph_apps": null,
                "customer": {
                    "id": null,
                    "name": null,
                    "email": null,
                    "mobile_no": null
                },
                "save_payment_method": false,
                "checkout_url": "https://pay.weavpayments.com/checkout/CK4T8M2Q7X9KBA",
                "success_url": "https://shop.example.com/orders/ORD-10541/thanks",
                "cancel_url": "https://shop.example.com/cart",
                "webhook_url": null,
                "payment": {
                    "reference_id": "PY7K3Q9M2X4TBA",
                    "checkout_reference_id": "CK4T8M2Q7X9KBA",
                    "status": "COMPLETED",
                    "…": "…"
                },
                "expires_at": "2026-10-27T10:12:00+08:00",
                "completed_at": "2026-10-26T10:15:40+08:00",
                "expired_at": null,
                "cancelled_at": null,
                "created_at": "2026-10-26T10:12:00+08:00",
                "updated_at": "2026-10-26T10:15:41+08:00"
            }
        ],
        "pagination": {
            "per_page": 25,
            "next_cursor": "eyJpZCI6MTM0LCJfcG9pbnRzVG9OZXh0SXRlbXMiOnRydWV9",
            "prev_cursor": null,
            "is_last_page": false
        }
    }
}
```

### 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."
}
```

## Examples

cURL:

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

Node.js:

```js
const url = 'https://api.weavpayments.com/v1/checkouts';
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/checkouts',
    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/checkouts');

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

Python:

```python
import os
import requests

response = requests.get(
    "https://api.weavpayments.com/v1/checkouts",
    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/checkouts", 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/checkouts")
        .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/checkouts";
        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());
    }
}
```
