How it works
Before fulfilling an order, verify the payment with the webhooks guide.Install
Install the React SDK
Create and show checkout
1
Create a session on your server
Call the Checkout API from your server with the price and order details. Reuse the same
idempotencyKey when you retry this order, and use a new key for each new purchase.Server: create a session
2
Render checkout in your app
Pass the session ID to the
LocusCheckout component on the client.CheckoutPage.tsx
With receipt
AddreceiptConfig when you create the session to show line items, subtotal, tax, your logo, company address, and support email. The React component shows the receipt, and the buyer can find it later in Purchases on the Locus dashboard.
Full receipt example
Full receipt example
Server: create a session with a receipt
fields are strings, with amounts in USDC. lineItems is a list of { description, amount } objects.Display modes
Setmode on LocusCheckout to embedded (inside your page), popup (a separate window), or redirect (the hosted page). See display modes. For custom buttons, use useLocusCheckout.
Next steps
Payment webhooks
Verify payments before fulfilling orders.
Merchant integration
Callbacks, custom buttons, and the dashboard.