Skip to main content

Payload Structure

interface WebhookEvent {
  event_id: string;
  type: "checkout.expired"
  data: {
    id: string; // id of the checkout you originally created
    type: "deposit" | "withdrawal";
    customer: {
      id: string;
    };
    expired_at: string;
  }
}

Example Payload

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

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.