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

# checkout.expired

> Webhook event triggered when a checkout session expires before completion.

> [!WARNING]
>
> `checkout.expired` is off by default. It will not be delivered until you enable it in Dashboard → Developers. See [Receiving Webhooks](https://docs.paywithsoap.com/api-reference/api-v1/webhooks/setup.md) for instructions.

A deposit or purchase that waits for the player to allow location (the Try again step) also ends this way when the player leaves it. It doesn't send [`checkout.terminally_failed`](https://docs.paywithsoap.com/api-reference/api-v1/webhooks/checkout-terminally-failed).

## Payload Structure

```typescript theme={null}
interface WebhookEvent {
  event_id: string;
  data: {
    id: string; // id of the checkout you originally created
    expired_at: string;
    type: "deposit" | "withdrawal";
    customer: {
      id: string;
    };
    subscription: {
      id: string;
      interval: "day" | "week" | "month" | "year";
      interval_count: number;
      line_items: Array<{
        product_id: string;
        sku: string | null; // null when the product was created without a sku
        product_name: string;
        product_url: string | null;
        quantity: number;
        price_cents: number;
        total_amount_cents: number;
      }>;
      line_items_total_amount_cents: number | null;
    } | null; // null for non-subscription checkouts
  };
  type: "checkout.expired";
}
```

## Example Payload

```json theme={null}
{
  "event_id": "ev_tDaWu5aTVa2kbvDjGe55rxZpaMEmVFWB",
  "data": {
    "id": "chk_9K1sgX9tUa5Lx5AgpK32xJgXDenrBbsk",
    "expired_at": "2025-05-30 06:05:22 UTC",
    "type": "deposit",
    "customer": {
      "id": "cus_LSAPLYCWD9uohSMm2pxRPB7xW3V4esMA"
    },
    "subscription": null
  },
  "type": "checkout.expired"
}
```

> [!NOTE]
>
> `expired_at` is a Ruby-formatted timestamp string (`"2025-05-30 06:05:22 UTC"`), not ISO 8601. Other webhook events, such as `checkout.review.created`, use ISO 8601 (`"2026-04-08T14:30:00Z"`) for their timestamps. Handle both formats if you write a shared date parser across webhook events.

## Handling Expired Events

The `expired_at` timestamp indicates when the checkout session expired, and the `type` field specifies whether it was a deposit or withdrawal attempt. If you place any balance on hold (ie for withdrawal) you should release it.


This documentation is built and hosted on [Mintlify](https://mintlify.com), a developer documentation platform.