> ## 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.terminally_failed

> Webhook event triggered when a checkout session fails due to kyc, geo or fraud.

> [!WARNING]
>
> `checkout.terminally_failed` 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.

## When Location Is Denied or Unavailable

A deposit or purchase doesn't end when the player denies location or their location can't be read. The checkout shows the player how to turn location on, with a Try again button, and stays open. If the player leaves it there, the checkout expires and sends [`checkout.expired`](https://docs.paywithsoap.com/api-reference/api-v1/webhooks/checkout-expired) instead, which is also off by default.

A location check that fails, such as a position outside the states you allow, still ends the checkout and sends `checkout.terminally_failed`. A withdrawal goes on to the payout form when location is denied or can't be read.

## Payload Structure

```typescript theme={null}
interface WebhookEvent {
  event_id: string;
  data: {
    id: string; // id of the checkout you originally created
    terminally_failed_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.terminally_failed";
}
```

## Example Payload

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

> [!NOTE]
>
> `terminally_failed_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.

The `terminally_failed_at` timestamp indicates when the checkout session failed terminally, and the `type` field specifies whether it was a deposit or withdrawal attempt. Unlike temporary`checkout.failed` events, terminal failures indicate that the session can no longer be continued.


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