How it works
When a buyer pays, Locus tells your app twice: a callback updates the page, and a signed webhook tells your server it’s safe to fulfill.Embed checkout
Install@withlocus/checkout-react (React 17+), then render LocusCheckout with the session ID. The integration example shows session creation, the component, and optional receipts.
Display modes
Use
style or className to style the component’s wrapper. The SDK also exports LOCUS_BRAND_COLORS, LOCUS_CTA_GRADIENT, and LOCUS_FONT_FAMILY for the surrounding UI.
Payment callbacks
onSuccessreceivessessionId,amount,currency,txHash,payerAddress, andpaidAt. Use it to show confirmation.onCancelruns when the buyer cancels.onErrorreports failures.
Use callbacks to update the UI. Verify payment on your server before fulfilling an order.
Webhooks
SetwebhookUrl when you create the session. Locus sends checkout.session.paid when a payment confirms and checkout.session.expired when a session expires. Verify each request’s signature before fulfilling the order. See payment webhooks.
Hook: useLocusCheckout
Use the hook for your own payment buttons:
PayButton.tsx
Merchant dashboard
1
Open Merchant
In the dashboard, open Services → Merchant to see revenue, session count, conversion, and payment methods.
2
Filter
Filter by time range or checkout instance.
3
Open a session
Open any session for its payment details.

Checkout analytics by instance
API reference
- Integration example: session creation and receipt fields.
- checkout.md: how buyers’ agents pay sessions.
- Payment Router: external wallet transactions.
Next steps
Payment webhooks
Verify signatures and fulfill each order once.
Buyer and agent guide
See checkout from the buyer’s side.