Skip to main content
@useroutr/checkout-react is the same checkout as the hosted page, as a React component. It opens as a modal or renders inline, shows your user what to send and follows the payment to completion. Your API key never touches the browser: the component needs only the intent’s funding token.
An Acme upgrade page, dimmed, with the Useroutr checkout open over it asking how to pay 25 USDC

The checkout opened as a modal over an app's own page

1

Create the intent on your server

The amount is yours to decide, so decide it where your user cannot change it. Return only the funding token, the last segment of hosted_funding_url.
app/actions.ts
2

Render the checkout

app/pay-button.tsx
Use https://api.useroutr.com/v1/public in production.
3

Fulfil on the webhook

onSuccess is for your interface: close the modal, show a thank-you. Fulfil the order on your server when the funding.credited webhook arrives. It is signed, and it reaches you even if your user closes the page before the payment completes.

Props

string
required
The funding token from the intent’s hosted_funding_url. It grants exactly one intent.
string
default:"/api/public"
Where the checkout’s public endpoints live: https://sandbox-api.useroutr.com/v1/public or https://api.useroutr.com/v1/public. They answer any origin, so you do not need to proxy them.
"modal" | "inline"
default:"modal"
Open over your page, or render in place.
"light" | "dark"
default:"light"
The colour scheme.
CheckoutAppearance
Override your saved branding for this checkout: brandColor, logoUrl, radius and fontFamily. See Branding.
WalletConnector
Lets your user pay from a connected Stellar or EVM wallet instead of copying an address. Pass a connector from @useroutr/checkout-wallets, or wrap a wallet your app already connects. See Pay from a wallet.
(intent) => void
Called once, when the funding intent is credited, with the payer’s view of the intent.
(failure) => void
Called once, when the checkout cannot complete: the intent failed, expired or cannot be loaded.
() => void
Called when your user closes the modal.

Pay from a wallet

Your user can connect a wallet and approve the payment in it. It is the same transfer to the same deposit address as paying by hand, so detection, settlement and your webhook do not change.
  • Stellar wallets (MetaMask, Freighter, xBull, LOBSTR and others): Useroutr builds the payment for their account and sends it once their wallet has signed it.
  • EVM wallets (MetaMask, Rabby, Coinbase Wallet and any other browser wallet): your user picks one of the EVM networks the payment options include, the one their wallet is already on first. The checkout asks the wallet to switch to that network, checks that it did, and the wallet sends the token transfer itself.
Once a wallet connects, an option it holds too little of is marked with what it holds, before your user commits to it. After the wallet sends, the checkout says which network the payment went on and links to that network’s explorer, such as Stellar Expert for Stellar or Basescan for Base.
Leave out the connectors for wallets you do not want to offer. With a project id, your user can also pair a wallet app on their phone: they scan a code from a computer, or open the link on the phone itself. The Stellar wallet library loads only when your user opens the wallet list, and browser EVM wallets need no library: they are found with EIP-6963. Wallets that cannot pay are listed with the reason, such as a wallet that is not installed, a Stellar wallet for a payment already fixed on Base, or MetaMask’s Stellar account on the sandbox: its Stellar support works on mainnet only. If your app already connects your user’s wallet, implement WalletConnector from @useroutr/checkout-core around it, so they pay without connecting twice.

The token is the credential

Your server keeps the API key, which can create intents, read the ledger, refund and manage webhooks. The browser gets only the funding token, which shows and pays one intent and nothing else.Your server keeps the API key, which can create intents, read the ledger, refund and manage webhooks. The browser gets only the funding token, which shows and pays one intent and nothing else.
The endpoints the checkout calls take no API key, cookie or session. They are addressed by the funding token, which is unguessable and grants one intent. Treat it like a payment link: give it to the person paying and nobody else.
If you find yourself putting an API key in the browser, the funding intent is being created in the wrong place. Move it to your server.