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

> Event triggered when a deposit or withdrawal enters a pending state.

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

## Payload Structure

```typescript theme={null}
interface WebhookEvent {
  event_id: string;
  data: {
    id: string;
    line_items: Array<{
      product_id: string;
      quantity: number;
      total_amount_cents: number;
      product_name: string;
      product_url: string | null;
      product_price_cents: number;
      sku: string | null; // null when the product was created without a sku
    }>;
    line_items_total_amount_cents: number | null;
    type: "deposit" | "withdrawal"; // the checkout type — not the event type below
    charge: {
      id: string;
      amount_cents: number;
      transaction_type: "credit" | "debit";
      status: string;
      from_status: string;
      failure_code: string | null;
      failure_message: string | null;
    };
    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.pending";
}
```

## Example Payload

```json theme={null}
{
  "event_id": "ev_tDaWu5aTVa2kbvDjGe55rxZpaMEmVFWB",
  "data": {
    "id": "chk_twijxXgVFofj9mdnvzF7vhbJSZEhfUpC",
    "line_items": [],
    "line_items_total_amount_cents": null,
    "type": "deposit",
    "charge": {
      "id": "ch_yRZcCGouimTgbz4thtrfbj2mh3ZT6vnz",
      "amount_cents": 2500,
      "transaction_type": "credit",
      "status": "pending",
      "from_status": "created",
      "failure_code": null,
      "failure_message": null
    },
    "customer": {
      "id": "cus_vi57KegYgcRqcGHqip8q6UZiqtrwMT870"
    },
    "subscription": null
  },
  "type": "checkout.pending"
}
```

## Handling Pending Events

When a charge enters a pending state, you should:

* Update your system to reflect that the transaction is in progress
* Display appropriate pending status to the customer
* Wait for the subsequent charge event (`checkout.succeeded`, `checkout.failed`, `checkout.returned` or, on some rails, `checkout.cancelled`). A pending charge is not resolved by checkout expiry: the checkout has already completed from the customer's point of view.
* Do not assume the transaction has completed until you receive a final status event

The `transaction_type` field in the charge object indicates the type of transaction:

* `credit`: Represents money being added to the customer's account
* `debit`: Represents money being removed from the customer's account


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