Overview
Quick Start
Configuration
TheZendFiEmbeddedCheckout constructor accepts a configuration object with these properties:
Required
| Property | Type | Description |
|---|---|---|
paymentId | string | The payment ID from createPayment() |
containerId | string | DOM element ID to render the checkout into |
Callbacks
| Property | Type | Description |
|---|---|---|
onSuccess | (data: PaymentSuccessData) => void | Called when payment completes successfully |
onError | (error: CheckoutError) => void | Called on any error during checkout |
onLoad | () => void | Called when the checkout UI finishes loading |
PaymentSuccessData
CheckoutError
Theming
Customize the checkout appearance to match your brand:Theme Properties
| Property | Type | Default | Description |
|---|---|---|---|
primaryColor | string | #667eea | Buttons, links, and accent elements |
backgroundColor | string | #ffffff | Checkout background |
textColor | string | #1a1a2e | Primary text color |
borderRadius | string | 8px | Corner radius for cards and buttons |
fontFamily | string | system-ui | Font stack |
Dark Mode
Payment Methods
The Embedded Checkout supports multiple payment methods. Customers can switch between them during checkout.Wallet Connect
Wallet Connect
Connects the customer’s browser wallet (Phantom, Solflare, Backpack, etc.) to sign and submit the transaction directly. This is the fastest payment method — one click after wallet connection.
QR Code
QR Code
Displays a Solana Pay QR code. The customer scans it with any Solana-compatible mobile wallet. The checkout polls for confirmation and updates automatically.
Manual Transfer
Manual Transfer
Shows the merchant’s wallet address and the exact token amount. The customer sends the payment from any wallet. The checkout monitors for the incoming transaction.
Bank / Fiat On-ramp
Bank / Fiat On-ramp
For payment links with on-ramp enabled, customers can pay with a credit card or bank transfer. The fiat is converted to crypto and settled to the merchant. Available when the payment link is configured with
onramp: true.React Integration
CDN Usage
If you are not using a bundler, load the checkout from the CDN:Lifecycle
Methods
| Method | Description |
|---|---|
mount() | Renders the checkout UI into the container element |
unmount() | Removes the checkout UI and cleans up event listeners |
unmount() when the component is removed from the page (e.g., in a React useEffect cleanup function) to prevent memory leaks.