UX.SOL

Component

Solana Pay Checkout

Renders a Solana Pay transfer-request checkout with a wallet deep link, scannable QR code, reconciliation reference support, and externally verified payment states.

Preview

Connect a devnet wallet to test checkout

The preview creates a real 0.001 SOL self-transfer, so only the devnet network fee is spent.

Installation

terminal
$npx shadcn@latest add https://uxdotsol.xyz/r/solana-pay-checkout.json

Usage

solana-pay-checkout.tsx
import { SolanaProvider } from "@/components/uxdotsol/components/solana-provider";
import { SolanaPayCheckout } from "@/components/uxdotsol/components/solana-pay-checkout";
 
export default function Checkout({ order }) {
return (
<SolanaProvider>
<SolanaPayCheckout
recipient={order.merchantAddress}
amount={order.total}
reference={order.paymentReference}
merchantName="Acme Store"
message={"Order " + order.id}
memo={"ORDER:" + order.id}
orderId={order.id}
status={order.paymentStatus}
/>
</SolanaProvider>
);
}

Props / Arguments

NameTypeDefaultDescription
recipientstringrequiredMerchant wallet address. For SPL payments, pass the wallet owner address rather than an associated token account.
amountnumberrequiredPositive payment amount in SOL or the selected token's display units.
splTokenstringundefinedOptional SPL token mint address. Omit it for native SOL payments.
referencestring | string[]undefinedUnique reference address used to discover and reconcile this payment. A unique value per order is strongly recommended.
merchantNamestring'Solana Pay'Merchant label encoded into the payment request and displayed in the card.
descriptionstring'Secure wallet checkout'Short supporting text displayed below the merchant name.
messagestringundefinedHuman-readable payment context encoded for the wallet to display.
memostringundefinedPublic onchain memo. Never include private or sensitive information.
orderIdstringundefinedOptional order identifier shown in the checkout summary.
tokenSymbolstring'SOL' or 'Token'Display symbol for the requested asset.
network'mainnet' | 'devnet' | 'testnet''mainnet'Network label displayed for payment context. Solana Pay transfer URLs do not encode the cluster.
status'ready' | 'processing' | 'confirmed' | 'expired''ready'Externally controlled payment state. Set confirmed only after merchant-side onchain validation.
walletLaunchUrlstringgenerated Solana Pay URLOptional wallet-specific universal or deep link used by the launch button. By default the button explicitly navigates to the generated solana: payment URI.
classNamestring''Optional classes applied to the outer checkout card.
onOpenWallet(paymentUrl: string) => voidundefinedCalled when the customer opens the Solana Pay wallet deep link.
onCopy(paymentUrl: string) => voidundefinedCalled after the payment URL is copied successfully.
onTransactionSubmitted(signature: string) => voidundefinedCalled after a connected browser wallet signs and submits the transfer. The payment must still be verified by the merchant.
onPaymentError(error: Error) => voidundefinedCalled when browser-wallet transaction construction or submission fails.