| Package | Role | Depends on |
|---|---|---|
@walletconnect/pay-core | Engine API client — contract types, CAIP utilities, the browser Transport seam (createHttpTransport), and the server-side createEngineClient that holds your API key. The foundation. | — |
@walletconnect/pay-state | The headless runtime — the payment state machine, orchestration, the injectable seam contracts, the session factory, and the public PaymentSnapshot view-model. No React, no HTTP client, no wallet SDK. | pay-core |
@walletconnect/pay-react | Thin React binding — usePaymentSession returns the snapshot plus domain actions. Zero state-machine leak. | pay-state |
@walletconnect/pay-appkit | Reown AppKit adapter — implements the WalletProvider seam over a Reown AppKit instance (plus the Solana web3 loader). A /react subpath ships the wallet-connection hook. | pay-state |
@walletconnect/pay-core
The foundation: Engine contract types, CAIP utilities, and the Transport seam. Zero runtime dependencies. Two entry points — a browser-safe main entry and a server-only /server entry that holds the key.
Browser entry — @walletconnect/pay-core
Transport contract (the seam the runtime depends on) — five methods, each resolving to an EngineResponse<T> envelope (never throwing):
GetPaymentResponse, PaymentOptionExtended, Amount, CollectData, PaymentStatus, …), CAIP utilities (parseCaip2, parseCaip10, …), and transport error helpers (TRANSPORT_ERROR_CODES, isAbortError, DEFAULT_TIMEOUT_MS).
Server entry — @walletconnect/pay-core/server
EngineClient exposes the same five methods as Transport, but attaches the secret Api-Key and Wcp-Version headers and calls the Engine directly. Use it only on the server.
@walletconnect/pay-state
The headless runtime: the payment state machine, the injectable seam contracts, the framework-agnostic PaymentController, the signing strategies, and the public PaymentSnapshot view-model.
createPaymentController
The framework-agnostic binding (the React hook wraps this). Use it directly in a non-React host.
Seams
The runtime reaches the outside world only through these contracts:transport, wallet, and signer:
Signing strategies
AppKit hosts don’t need these directly —@walletconnect/pay-appkit exports a zero-config createAppKitSigner(wallet) that wraps them with the bundled Solana codec. These are the low-level primitives, for a custom wallet integration.
PaymentSnapshot
The public, serializable view-model. state is one of:
@walletconnect/pay-react
A single hook — usePaymentSession — a useSyncExternalStore-based binding over the controller. SSR-safe, tear-free, zero XState leak.
UsePaymentSessionOptions matches PaymentControllerOptions (paymentId, seams, wallet, initialPayment?, signingTimeoutMs?, onMachineEvent?). The return is { snapshot } plus the named actions:
Plus a host-orchestration channel for signals the runtime can’t observe itself —
refreshOptions, notifyQuoteExpired, acknowledgeQuoteExpiry, markUserSanctioned, setProfileLookup, notifyPaymentExpired, failWalletConnection. Most gateways won’t need these to start.
@walletconnect/pay-appkit
The Reown AppKit adapter — it owns the entire AppKit setup so a host stays @reown/*-free. It constructs the instance, implements the WalletProvider seam over it, provides a zero-config Signer, and ships a headless wallet-picker controller. The main entry is framework-neutral; the React provider + hooks live on /react.
Main entry — @walletconnect/pay-appkit
createPayAppKit builds the instance with the WC-owned networks + adapters in headless mode. It’s client-only and async — await payAppKit.whenReady(), then read getInstance() / getWagmiConfig() / getHooks() / getError() / isInitialized().
createAppKitWalletList returns a controller — wallet (the seam), getState(), subscribe(), fetchWallets(), search(), loadMore(), getWcUri() — for non-React hosts.
React entry — @walletconnect/pay-appkit/react
The zero-config provider that owns AppKit’s construction + the Wagmi/Query tree + an SSR-safe context, plus the state hook and the imperative instance accessor:
useAppKitWalletProvider’s handle extends WalletListState and adds wallet (the seam to hand usePaymentSession), searchQuery/setSearchQuery (debounced), fetchWallets, loadMore, and getWcUri for the pairing QR.
Next steps
Implementation
The step-by-step React / Next.js walkthrough.
API Reference
The Gateway and Payments endpoints behind the SDK.