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

# Vanilla

> Open KryptoPay checkout in non-React web apps.

Use `openKryptoPayModal` to launch checkout directly.

```ts theme={null}
import { openKryptoPayModal } from "@kryptopay/sdk";

const modal = openKryptoPayModal({
  clientSecret,
  merchantName: "Acme Store",
  defaultMethod: "wallet",
  allowWallet: true,
  allowManual: true,
  onSuccess: (event) => {
    console.log(event.payment_intent_id, event.tx_hash);
  },
  onError: (err) => {
    console.error(err.code, err.message, err.recoverable);
  },
  onClose: () => {
    console.log("closed");
  },
});

// Optional:
// modal.close();
// console.log(modal.getState());
```
