React crypto checkout components, from one button to fully headless
Add a React crypto checkout with @intents-fi/react: a PayButton modal, inline embed or headless hook. Customers pay in any token; you get USDC, USDT or BTC.
This page helps you choose between them and compares them with the other React checkout libraries. Props, events and the appearance reference live in the widget docs; this page links there rather than repeating them.
// app/checkout/page.tsx (Next.js, App Router)
import { PayButton } from "@intents-fi/react";
import { createInvoice } from "@/lib/intents"; // calls POST /v0/invoices with your secret key
export default async function Checkout() {
const invoice = await createInvoice({ amount: "49.00", reference: "order_1042" });
return (
<PayButton
invoiceId={invoice.id}
clientSecret={invoice.clientSecret}
appearance={{ variables: { colorAccent: "#3D5A80", borderRadius: 12 } }}
>
Pay $49
</PayButton>
);
}
A React crypto checkout is a component that shows the payment screens inside your app instead of redirecting. With @intents-fi/react you create an invoice on your server, pass its id and clientSecret to <PayButton> or <CheckoutEmbed>, and the customer pays in the token they hold. USDC, USDT or BTC settles to your wallet.
Our takeStart with <PayButton>; move to useCheckout() only when you need your own layout, because the safety elements come with you either way.
Code
// app/checkout/page.tsx (Next.js, App Router)
import { PayButton } from "@intents-fi/react";
import { createInvoice } from "@/lib/intents"; // calls POST /v0/invoices with your secret key
export default async function Checkout() {
const invoice = await createInvoice({ amount: "49.00", reference: "order_1042" });
return (
<PayButton
invoiceId={invoice.id}
clientSecret={invoice.clientSecret}
appearance={{ variables: { colorAccent: "#3D5A80", borderRadius: 12 } }}
>
Pay $49
</PayButton>
);
}
Code and preview
The server creates the invoice; the browser gets two strings, as in the code above.
Install with npm install @intents-fi/react. The clientSecret is good for that one invoice and travels in a request header, never a URL. The secret key never leaves your server. Creating the invoice is covered on the crypto checkout API page and in the quickstart.
This is what the button opens, running on test fixtures:
Which component to use
A React crypto checkout shows the payment screens inside your app rather than sending the customer to another site. @intents-fi/react gives you three levels of it: a <PayButton> that opens a modal, a <CheckoutEmbed> that renders inline, and a useCheckout() hook for a fully headless UI. In each case the customer pays in the token they hold and you receive USDC, USDT or native BTC at your own address.
All three run the same state machine against the same public endpoints, so they walk exactly the same states. The difference is how much of the screen you own.
<PayButton> |
<CheckoutEmbed> |
useCheckout() |
|
|---|---|---|---|
| What renders | A button, then a modal sheet | The checkout inline in your page | Nothing: you render every element |
| Effort | One component | One component in a container | Your own UI for each screen |
| Styling | appearance variables and .ifc-* rules |
Same | Your CSS |
| Safety elements | Built in | Built in | You render them from required.* |
| Use it when | A pay step in a cart or pricing page | A dedicated checkout page | The payment is part of a custom flow |
The appearance object is modelled on Stripe’s Appearance API: variables for the theme and rules for per-element overrides, so a team that has themed Stripe Elements already knows the shape.
The headless docs show a complete useCheckout() example that a test pays end to end: headless checkout. For a non-React site, the same screens load in an iframe through checkout.js.
The parts you cannot remove
Some elements stop a customer losing money: the exact amount, the network warning (“Send USDT on TRON only.”), the deposit address with its QR code, the expiry countdown and the refund address field. They are present at every level.
- In
<PayButton>and<CheckoutEmbed>,appearance.rulescan restyle them but never hide, move or shrink them. A rule that tries is dropped with a console warning naming it. - In
useCheckout(), the hook returns them inrequired, already formatted. Spread each one’spropson the element that shows it. - Pass
devCheckwith a ref to your checkout’s root, and every render in development checks that each required element is on screen, visible and showing its value.
Wallets, and customers without one
The component connects browser wallets for EVM chains, Solana and Tron, plus native Bitcoin and NEAR. A wallet’s code loads only when the customer picks a network it serves, so the bundle stays small for customers who never use it.
A customer with no browser wallet is not stuck. They choose a token and network and send from any wallet or exchange to a deposit address, shown with the exact amount and a QR code. That matters for the many people who hold USDT on an exchange rather than in a wallet. When a wallet is connected, the list is ranked by what it holds: a customer with USDT on Tron sees USDT on Tron first. Pass payer if you already know their address.
React crypto checkout libraries compared
Several libraries put a crypto payment in a React component. They differ in what the customer can pay with, whether a customer without a wallet can pay, and where the money goes.
@intents-fi/react | thirdweb CheckoutWidget | MoonPay Commerce HelioCheckout | OnchainKit Checkout | |
|---|---|---|---|---|
| Status | Live | Live | Live | Retired: repository archived |
| Customer pays with | Many tokens on many chains, routed to one settlement asset | Crypto across 85+ chains, or card | USDC, other currencies and card | n/a |
| Pay without a browser wallet | Yes, deposit address and QR | Not stated in its docs | Not stated in its docs | n/a |
| Merchant receives | USDC, USDT or native BTC at your own address | To the seller wallet | Set per pay link | n/a |
| Needs | A server-created invoice | A thirdweb client ID | A pay link or a server-created charge | n/a |
| Headless option | useCheckout() with enforced safety elements | Not stated in its docs | Not stated in its docs | n/a |
| Webhook for fulfilment | invoice.paid, HMAC-signed | Not covered in its widget docs | Recommended for verification | n/a |
thirdweb is a reasonable choice if you want card payments in the same widget and are happy for the buyer to pay its protocol fee on top by default. MoonPay Commerce suits a team already using its pay links. OnchainKit’s checkout is listed by Base as retired with no replacement library, so it should not be used for new work.
| Gateway | Pricing | Fee on $10 | Fee on $50 | Fee on $250 | Custody |
|---|---|---|---|---|---|
| Intents Checkout | 0.4% | $0.04 | $0.20 | $1.00 | Non-custodial |
| Stripe stablecoin payments | 1.5% | $0.15 | $0.75 | $3.75 | Custodial |
| MoonPay Commerce (Helio) | 2% | $0.20 | $1.00 | $5.00 | Non-custodial |
| thirdweb CheckoutWidget | 0.3% | $0.03 | $0.15 | $0.75 | Non-custodial |
Published list prices from each provider's own pricing page, checked 2026-11-15 to 2026-11-26.
Next.js, proxies and origins
The components are client components. Create the invoice in a server component, a route handler or a server action, and pass the two strings down.
- Default: the widget calls
https://api.intents.fi, which accepts browser calls to the checkout endpoints from any origin, with no cookies. - Same-origin option: if your security policy wants the browser to talk only to you, forward
/v0/checkout/*unchanged through a small route and setapiBaseto it. The package’s Next.js example does this. - Fulfilment:
onPaidis for the thank-you screen. Ship the order from theinvoice.paidwebhook, because a browser callback can be faked and a signed webhook cannot.
Testing a React checkout before go-live
0 of 6 done
Test mode renders the same components with one difference: a test invoice has no deposit address and nothing to sign. The widget says so plainly and shows a Complete the test payment button, which walks the invoice to paid, fires onPaid and sends the real invoice.paid webhook.
Use the checklist above on the pull request that adds the checkout.
When the checklist passes on a test key, swap in a live key on the server, register a live webhook endpoint and pay a real $5 invoice from a phone.
Ask an agent to wire it
The agent setup guide has one prompt for Claude Code, Cursor or Codex that adds a test-mode <PayButton> and its webhook route to an existing React or Next.js app. Run it against a test key, pay the test invoice with Complete the test payment, and check the webhook fired before you review the diff.
Cost and limits
The components are free. Every settled payment costs 0.4% with no fixed fee and no monthly fee. Invoices start at $1 and are priced in USD. A customer cannot yet pay in the exact token and chain you settle in. Store plugins are not out yet: WooCommerce is Available. See pricing, the hosted checkout, and the crypto checkout API for the rest of the API.
Questions
Short answers. The docs go deeper.
How do I accept crypto payments in React?
Create an invoice on your server with POST /v0/invoices, send only its id and clientSecret to the browser, and render <PayButton> or <CheckoutEmbed> from @intents-fi/react with them. Fulfil the order from the invoice.paid webhook, not from the onPaid callback.
Is there a crypto payment button component for React?
Yes. <PayButton> renders a button that opens the checkout in a modal sheet. It takes the invoice id and clientSecret, an optional label, an appearance object for colours and corners, and callbacks such as onPaid and onClose.
What is a headless crypto checkout?
A checkout where you render all of the UI and a library holds the state and actions. useCheckout() from @intents-fi/react returns the current screen, the ranked payment options and a required object with the safety elements you must show, such as the exact amount and the deposit address.
Does the customer need a browser wallet?
No. The widget connects EVM, Solana and Tron wallets, and native Bitcoin and NEAR wallets, but a customer without one can pay from any wallet or exchange by sending to a deposit address shown with the exact amount and a QR code.
Can I style the React checkout to match my app?
Yes, through the appearance prop: variables for colours, font, corners and spacing, and rules keyed by stable .ifc-* class names. Values that would drop text contrast below 4.5:1 or hide a safety element are ignored with a console warning.
Does it work with Next.js?
Yes. The components are client components; create the invoice in a route handler or server action. The package ships a Next.js example, including an optional proxy route if you want the browser to talk only to your own origin.
Does the React package need an API key in the browser?
No. The browser only ever gets the per-invoice clientSecret, sent in a header and good for that one invoice. Your secret key stays on the server.