Install
Embed checkout
TheLocusCheckout component takes a session ID and renders the full checkout experience. Buyers can pay with their Locus Wallet, an external wallet, or an AI agent — all handled by the component.
Display modes
embedded
Renders an iframe inline in your page. Best for dedicated checkout pages. The iframe loads at
minHeight: 700px.popup
Opens checkout in a centered 450x650 popup window. Shows a branded loading placeholder in the parent. Calls
onCancel if the popup is closed.redirect
Navigates the browser to the hosted checkout page. Renders nothing. Simplest integration.
LocusCheckout props
CheckoutSuccessData
The object passed to your onSuccess callback:
CheckoutSession type
Represents a checkout session’s current state:
Hook: useLocusCheckout
For more control over how you launch checkout, use the hook directly instead of the component.
Options
Return values
All return values are stable across renders (wrapped in
useCallback).
Brand constants
The SDK exports Locus brand tokens for styling surrounding UI to match:All brand values
All brand values
LOCUS_BRAND_COLORSLOCUS_CTA_GRADIENTLOCUS_FONT_FAMILYPostMessage events
If you embed the checkout page in an iframe or popup manually (without the SDK), listen for thesepostMessage events from the checkout origin:
Webhooks
When a session is paid or expires, Locus sends a POST request to your webhook URL.Events
Payload
Headers
Signature verification
Every webhook includes anX-Signature-256 header. The webhook secret (starts with whsec_) is returned when you create a session with a webhook URL. Verify it to ensure the request came from Locus.
Merchant dashboard
Manage sessions, view analytics, and track purchases from the Locus dashboard.Checkout instances
Group sessions by integration point using an instance ID. Each instance tracks its own revenue, session count, and conversion rate. Instances are auto-created on first use.
Checkout instances — per-integration analytics
Analytics
Four stats filterable by time range (7d / 30d / 90d / all time) and by instance:- Total Revenue — sum of USDC across paid sessions
- Total Sessions — count with paid/expired breakdown
- Conversion Rate — paid / total sessions
- Payment Methods — breakdown of Locus Wallet, External Wallet, and Agent payments

Analytics — revenue, sessions, conversion rate, and payment method breakdown
Recent sessions
A paginated table of checkout sessions filterable by status (PAID, PENDING, EXPIRED, CANCELLED). Shows session ID, amount, status, payment method, and creation time.
Recent sessions table
Purchases
The buyer-side view. Shows purchases made via any Locus checkout session, with expandable rows showing full receipt details (seller info, line items, tax, on-chain transaction link).
Purchases — buyer view with expandable receipt details