intents.fi
Integration · Pay button

A crypto payment button for any website, from one link to a modal checkout

Add a crypto payment button to any website: a plain link, an HTML button that opens a modal checkout, or a React PayButton. Settles USDC, USDT or BTC to you.

  • Paste-in HTML, no server needed
  • Modal or inline checkout
  • Works on any site that runs scripts

We build Intents Checkout. Everything on this page is live: payment links, checkout.js and @intents-fi/react. The snippets are taken from our widget and payment link docs, which are the reference.

Three buttons, one checkout
Available
Plain link
Any <a> or button block, no script
checkout.js
pay.intents.fi/v1/checkout.js, modal or inline
React
<PayButton> from @intents-fi/react
You receive
USDC, USDT or native BTC in your own wallet
Fee
0.4%, no fixed fee
Short answerUpdated · Facts checked

A crypto payment button is a link or script that opens a checkout where the customer pays in crypto. With Intents Checkout you have three: a payment link styled as a button, an HTML button that opens the checkout as a modal using checkout.js, and a React PayButton. Each payment settles USDC, USDT or BTC to your own wallet.

Pick your button

Pick your button

Pick your button
Compared onPlain link buttoncheckout.js modalReact PayButton
Scripts on your pageNone BetterOne script from pay.intents.fiThe npm package
Server codeNoneNone with a payment link; optional for per-order pricesYour server creates the invoice
Customer stays on your pageNo: opens the hosted pageYes: modal or inline frameYes: modal sheet or inline
Price per orderFixed, or chosen by the customerFixed or customer-chosen per link, or any amount from your serverAny amount from your server
Works on site buildersAnywhere a link works BetterWhere custom scripts are allowedReact apps only

A plain link is the most robust. It is a URL, so it works in a site builder, an email signature, a PDF invoice or a link-in-bio page. The customer leaves your page for our hosted checkout and comes back through your “after paying” URL.

The checkout.js modal keeps the customer on your page. It loads one script from pay.intents.fi, which opens the hosted checkout in an iframe over your page, or inline inside an element of yours with the container option.

The React PayButton is for apps. It renders the same screens as a modal sheet, with typed props and events, from the @intents-fi/react package.

The snippets

The snippets

1 · Plain link button (no script) · html
<a class="pay-button" href="https://pay.intents.fi/l/plink_YOUR_LINK_ID">
  Pay $20 with crypto
</a>
2 · Modal button with checkout.js (no server) · html
<button id="pay" type="button" class="pay-button">Pay $20 with crypto</button>
<script src="https://pay.intents.fi/v1/checkout.js"></script>
<script>
  document.getElementById("pay").addEventListener("click", async () => {
    // Creates one invoice at the link's price. Public endpoint, no key.
    const res = await fetch("https://api.intents.fi/v0/links/plink_YOUR_LINK_ID/invoices", {
      method: "POST",
      headers: { "content-type": "application/json" },
      body: "{}",
    });
    const inv = await res.json();
    if (!inv.clientSecret) return (window.location.href = inv.url);
    IntentsCheckout.open({
      invoiceId: inv.invoiceId,
      clientSecret: inv.clientSecret,
      appearance: { variables: { colorAccent: "#3D5A80" } },
      onPaid: () => (window.location.href = "/thank-you"),
    });
  });
</script>
3 · React PayButton (invoice from your server) · tsx
import { PayButton } from "@intents-fi/react";

// `invoice` comes from your server's POST /v0/invoices call.
<PayButton
  invoiceId={invoice.id}
  clientSecret={invoice.clientSecret}
  onPaid={() => router.push("/thanks")}
>
  Pay with crypto
</PayButton>

Snippet 2 is the one most people want. Two details make it safe to put on a public page. The public endpoint POST /v0/links/{id}/invoices needs no key, because the link ID can only create the invoice you priced, and a switched-off link answers “not found”. And the client secret goes to the checkout frame only after the frame reports it is ready, addressed to the checkout’s origin and never put in a URL. The payment links docs and widget docs are the full reference.

If the price changes per order, create the invoice on your server instead, as the quickstart shows, and pass invoiceId and clientSecret to IntentsCheckout.open() or <PayButton>. Your secret key never reaches the browser.

IntentsCheckout.open() takes a handful of options. These are the ones a button usually needs:

Option What it does When to use it
invoiceId, clientSecret The invoice to pay, from the link endpoint or your server Always
container An element or selector to mount the checkout inline instead of in a modal A dedicated payment page or a sidebar
appearance Colours, font and corners, the same object the React widget takes Matching your brand
onPaid({ invoiceId }) Runs once when the invoice is paid Showing a thank-you message or redirecting
onClose() The customer closed the checkout, pressed Escape or finished Re-enabling the button

open() returns close and the iframe, so you can close the checkout from your own code. Closing it does not cancel the invoice: a payment already sent still completes, and the webhook still fires. Wallet extensions work inside the frame, and your page never runs wallet code.

If scripts are not allowed at all, the plain link button does the same job with a redirect. Set “Send customers here after paying” on the link, and the paid screen’s return button brings the customer back to your site.

Set it up in five steps

Set it up in five steps

Donation buttons

A payment link can let the donor choose the amount, so one button covers every gift. Fixed tiers still work if you prefer them.

Pattern How Good for
Donor chooses One link set to “The customer chooses”, with bounds and up to four suggested amounts Most donation pages: one button, no code
Fixed tiers One link per amount: $5, $20, $50 Named tiers or rewards per level
Per-order amount Your server creates an invoice, with your own form fields in metadata Collecting donor details for receipts

Each donation arrives as USDC, USDT or native BTC at your address, with no payout step. If your organisation issues receipts, collect what you need on your own page before the button; whether a crypto gift is tax-deductible depends on where you and the donor are, so ask an adviser.

What the customer sees

Interactive demo · what opens when someone presses the button: a $49 invoice paid in USDT on Tron and settled as USDC on Base, in test mode. No funds move.Build this →

Loading the payment

The checkout leads with the price, then the ways to pay, ranked by what the customer’s wallet holds. They can connect a browser wallet for EVM chains, Solana or Tron, or pay from any wallet or exchange with a deposit address, an exact amount and a QR code. Every screen shows the exact amount, the network warning, the address, the time left and a refund address field. Your appearance settings can restyle those, but nothing can hide them.

Before it goes on a live page

Before it goes on a live page

  • Delivering on the button callbackonPaid runs in the browser and can be faked. Fulfil from the signed invoice.paid webhook, which fires once the money has reached your wallet.
  • A secret key in the pageNever put an ik_ secret key in HTML. The modal button needs no key at all; per-order invoices are created on your server, which hands the browser only the invoice ID and its client secret.
  • Site builders that block scriptsSome builders and CMS roles strip <script> tags on save. If the modal button vanishes, use the plain link button, which is an ordinary URL.
  • Script optimisersPlugins and CDNs that combine or delay JavaScript can stop checkout.js loading before the click. Exclude it, then test in a private window.

Pricing is the same as the rest of Intents Checkout: 0.4% of each completed payment and no fixed fee, so a $5 button payment costs $0.02. Compare that on compare crypto payment fees. For a no-code version on WordPress, see accept crypto on WordPress; for every other platform, see integrations.

Questions

Short answers. The docs go deeper.

How do I add a pay with crypto button to my website?

Make a payment link in the Intents dashboard and use its URL as a button's link. For a checkout that opens over your page, paste the checkout.js snippet instead, with your link's ID. Neither needs server code, and each payment settles USDC, USDT or native BTC to your wallet.

Can I make a crypto donate button in HTML?

Yes. Make one payment link where the customer chooses the amount, set a smallest and largest amount and up to four suggestions such as $5, $20 and $50, and use its URL as the button's link. The donor types or taps an amount, then pays in the token they hold.

Do I need a server for a crypto payment button?

Not for a link's price. A payment link can create invoices from the browser without a key, because it can only ever create an invoice at the price you set, or within the bounds you set. If the price changes per order, your server creates the invoice with a secret key and passes the browser its ID and client secret.

Which cryptocurrencies can customers pay with?

Stablecoins such as USDT and USDC on EVM chains, Solana and Tron, plus native tokens such as SOL and ETH, and bitcoin. The checkout ranks the options by what the customer's wallet holds. You always receive USDC, USDT or native BTC.

Can I style the button and the checkout?

The button is your own HTML, so any CSS works. The checkout takes an appearance object with colours, font and corner radius. The exact amount, network warning, deposit address, countdown and refund address field always stay visible.

Does it work on Wix, Squarespace or Webflow?

The plain link button works anywhere you can add a link. The modal button works where the builder lets you add custom code with scripts; check your plan and the builder's rules, and fall back to the link if scripts are stripped.

What does a crypto payment button cost?

There is no charge for the button. Intents Checkout takes a flat percentage of each completed payment, with no fixed, setup, monthly or payout fee. The pricing page has the rate, and the fee comparison sets it beside other gateways.

Get paid in your own wallet.

Customers pay in what they hold. You receive USDC or USDT on the chain you choose, or native bitcoin. We never hold your funds.