Skip to main content

Embedded Checkout

ZendFiEmbeddedCheckout renders a complete payment flow directly inside your page. It supports wallet connect (Phantom, Solflare, Backpack), QR code payments, and fiat bank transfers. No iframe, no redirect — it is a native DOM component.

Quick Start

Configuration

EmbeddedCheckoutConfig

Payment link code. Either linkCode or paymentId is required.
string
Payment ID. Either linkCode or paymentId is required.
string
required
ID of the HTML element where the checkout will be mounted.
string
default:"test"
test (Devnet) or live (Mainnet).
string
default:"https://api.zendfi.tech"
Custom API URL. Defaults to localhost:8080 in development.
function
Called when the payment is confirmed on-chain.
function
Called when any error occurs during checkout.
function
Called when the checkout UI is fully loaded.
CheckoutTheme
Custom theme overrides.
boolean
default:"false"
Enable “Pay What You Want” mode.
object
Show or hide specific payment methods.

Theming

Customize the look and feel:

CheckoutTheme


Callback Data

PaymentSuccessData

CheckoutError


Methods

mount()

Renders the checkout UI into the container element. Fetches payment data, renders the form, and starts polling for payment confirmation.

unmount()

Removes the checkout UI and stops all polling.

Payment Flow

Payment Methods

The checkout automatically detects available payment methods:

Wallet Connect

Auto-detects Phantom, Solflare, Backpack, Coinbase, and Trust wallet extensions.

QR Code

Displays a Solana Pay-compatible QR code for mobile wallets.

Manual Transfer

Shows the payment address for direct wallet transfers.

Bank Transfer

Fiat on-ramp via NGN bank transfer (when onramp is enabled on the payment link).

Browser Usage (CDN)

For non-bundled environments, import from a CDN: