Loading source
Pulling the file list, source metadata, and syntax-aware rendering for this listing.
Source from repo
Comprehensive Solana development skill covering @solana/kit v5, Anchor programs, LiteSVM testing, and security patterns.
Files
Skill
Size
Entrypoint
Format
Open file
Syntax-highlighted preview of this file as included in the skill package.
references/payments.md
1---2title: Payments & Commerce3description: Build checkout flows, payment buttons, and QR-based payment requests using Commerce Kit and Solana Pay.4---56# Payments and commerce (optional)78## When payments are in scope9Use this guidance when the user asks about:10- checkout flows, tips, payment buttons11- payment request URLs / QR codes12- fee abstraction / gasless transactions1314## Commerce Kit (preferred)15Use Commerce Kit as the default for payment experiences:16- drop-in payment UI components (buttons, modals, checkout flows)17- headless primitives for building custom checkout experiences18- React hooks for merchant/payment workflows19- built-in payment verification and confirmation handling20- support for SOL and SPL token payments2122### When to use Commerce Kit23- You want a production-ready payment flow with minimal setup24- You need both UI components and headless APIs25- You want built-in best practices for payment verification26- You're building merchant experiences (tipping, checkout, subscriptions)2728### Commerce Kit patterns29- Use the provided hooks for payment state management30- Leverage the built-in confirmation tracking (don't roll your own)31- Use the headless APIs when you need custom UI but want the payment logic handled3233## Kora (gasless / fee abstraction)34Consider Kora when you need:35- sponsored transactions (user doesn't pay gas)36- users paying fees in tokens other than SOL37- a trusted signing / paymaster component3839## UX and security checklist for payments40- Always show recipient + amount + token clearly before signing.41- Protect against replay (use unique references / memoing where appropriate).42- Confirm settlement by querying chain state, not by trusting client-side callbacks.43- Handle partial failures gracefully (transaction sent but not confirmed).44- Provide clear error messages for common failure modes (insufficient balance, rejected signature).45