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

# Checkout events and errors

> Handle Checkout lifecycle, payment outcomes, and errors.

# Checkout events and errors

Register handlers before mounting Checkout.

```ts theme={null}
checkout
  .onReady(() => setLoading(false))
  .onValidation(({ canSubmit }) => updatePageUi(canSubmit))
  .onPaymentResult((result) => {
    if (result.status === "succeeded") showSubmitted(result.paymentIntentId);
    if (result.status === "processing") showPending(result.paymentIntentId);
    if (result.status === "requires_payment_method") showError(result.error.message);
  })
  .onCheckoutError((error) => showCheckoutError(error.message));
```

| Result                    | Your action                                                         |
| ------------------------- | ------------------------------------------------------------------- |
| `succeeded`               | Show confirmation; wait for the verified webhook before fulfilment. |
| `processing`              | Show pending status and wait for the webhook.                       |
| `requires_payment_method` | Show `result.error.message` and let the customer retry.             |

Authentication challenges and wallet redirects are handled internally and are not public result states.

`onCheckoutError` receives a `LynqError` with a display-safe `message`, stable `code`, and `retryable` flag. Payment declines arrive through `onPaymentResult`, not `onCheckoutError`.


## Related topics

- [Checkout SDK reference](/reference/checkout-sdk.md)
- [Errors and troubleshooting](/reference/errors.md)
- [Support](/resources/support.md)
- [Checkout SDK](/build/checkout-sdk.md)
- [Webhook events](/reference/webhook-events.md)
