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

# Wallet-only checkout

> showOnlyWalletMethods — Apple Pay and Google Pay without card form

When `showOnlyWalletMethods` is `true`, the widget can hide the card form, custom fields, and in-iframe pay button, plus the host "OR" divider — so customers only see Apple Pay and/or Google Pay when at least one is available.

If configuration is invalid, no wallet is available, readiness times out, or a **wallet payment fails**, the widget **falls back to the full UI** (card form, fields, submit, and "OR" divider).

User **cancellation** of the wallet sheet does not expand the form; only failures and fallbacks do.

## Where things render

| UI                             | Location                              |
| ------------------------------ | ------------------------------------- |
| Apple Pay / Google Pay buttons | Host page, above the iframe           |
| "OR" divider                   | Host page, between wallets and iframe |
| Card form, fields, submit      | Inside the iframe                     |

## Config

```javascript theme={null}
{
  showOnlyWalletMethods: true,
  applePayEnabled: true,
  applePayOptions: { applePayMerchantId: 'merchant.xxx' },
  googlePayEnabled: true,
  googlePayOptions: { googlePayMerchantId: 'merchant.xxx' },
  // productId, sessionId, amount, environment, ...
}
```

At least one wallet must be fully configured for wallet-only mode to be considered.

## Decision flow

```mermaid theme={null}
flowchart TD
  init[INIT with showOnlyWalletMethods]
  ready[PS_WALLET_READINESS from parent]
  ok{Any configured wallet ready?}
  wonly[Hide card form + OR divider]
  full[Show full card UI]
  payfail[Wallet payment error]
  init --> ready --> ok
  ok -->|yes| wonly
  ok -->|no or timeout| full
  wonly --> payfail --> full
```

1. **Wants** wallet-only: `showOnlyWalletMethods === true` and Apple or Google fully configured.
2. **Wait** for `PS_WALLET_READINESS` from the parent SDK (or **5s timeout** → full UI).
3. **At least one** configured wallet must report `true` in readiness; otherwise full UI.
4. **Wallet payment error** forces full UI until config changes or a new session resets state.

## Events

| Event                       | Payload                      | Notes                                       |
| --------------------------- | ---------------------------- | ------------------------------------------- |
| `WALLET_FORM_LAYOUT`        | `{ showOrDivider: boolean }` | Host toggles "OR" divider                   |
| `HEIGHT_CHANGE`             | `{ height: number }`         | Iframe auto-resize                          |
| `ERROR` with `NO_CARD_FORM` | —                            | `submitPayment()` blocked while card hidden |

`PS_WALLET_READINESS` is an internal parent↔iframe message (not in public `EVENT_TYPES`).

## External pay button

With wallet-only + `hidePaymentButton: true`, payment is triggered by wallet buttons only. `submitPayment()` returns `NO_CARD_FORM` until fallback expands the card UI.

## Live demo

Try wallet-only mode in the sandbox playground: [https://payment.paysight.io/demo?preset=both-wallets](https://payment.paysight.io/demo?preset=both-wallets) — toggle `showOnlyWalletMethods` in the host controls.

## Related

* [Apple Pay via widget](/widget-sdk/guides/apple-pay-via-widget)
* [Google Pay via widget](/widget-sdk/guides/google-pay-via-widget)
* [Configuration reference](/widget-sdk/reference/configuration)
