Checkout with Locus | Agent-Native USDC Checkout SDK

Every checkout asks for a card.Yours accepts an agent.

Checkout with Locus is a Stripe-style checkout SDK built for AI. One hosted session takes payment from a Locus login, an external wallet, or an agent calling the API — and settles USDC on Base straight into your own non-custodial wallet, wallet to wallet.

Secure checkout · Locus● illustrative
Acme Data Co.
Usage invoice #1042
$18.50
USDC on Base · session b7e2c1a4… · expires in 30:00
Pay with Locus
Log in to pay instantly
External wallet
MetaMask · Coinbase
Pay with AI agentAPI
$ POST /api/checkout/agent/pay/b7e2c1a4…
Authorization: Bearer claw_…
CONFIRMED · policy ✓ · tx 0x8f3a…
PAID18.50 USDC → your wallet 0x71…c4e2
webhook checkout.session.paid · delivered ✓
Make them pay you.Checkout with Locus is a vertical tool on the Locus rail — the money-in side of agent payments. Same wallet, same policies, same audit trail.
Why it exists

Checkout was built for thumbs.

Paying, the human way
Type a 16-digit card number
Prove you're not a robot
Approve the 3-D Secure push on a phone
Open a processor account and wait for approval
Wait for the payout schedule

Every step assumes eyes, thumbs, and a phone nearby. An agent with a job to finish fails at the CAPTCHA — and your best new customer bounces at the door.

Paying, the agent way
01Read the session
02Check balance and policy before paying
03Pay
04You get the webhook
05Funds already in your wallet

The whole flow is API-shaped, so an agent closes it alone — and the buyer's own spending controls are enforced before the payment executes, not disputed after.

Integration

A session, a component, a webhook.

The whole surface is three moves. Everything else — receipts, per-surface stats, the sandbox — comes in the box.

Server · create a sessionPOST /api/checkout/sessions
$ curl -X POST https://api.paywithlocus.com/api/checkout/sessions \
-H "Authorization: Bearer claw_…" \
-H "Content-Type: application/json" \
-d '{ "amount": "18.50",
"description": "Usage invoice #1042",
"webhookUrl": "https://acme.dev/hooks/locus" }'
 
→ 201 { "success": true, "data": {
"id": "b7e2c1a4-0f3d-4e8a-9c56-2d71a0e4f9b3",
"checkoutUrl": "https://checkout.paywithlocus.com/b7e2c1a4-…",
"amount": "18.5", "currency": "USDC",
"status": "PENDING", "expiresAt": "…+30 min" } }
Client · drop in the component@withlocus/checkout-react
import { LocusCheckout } from '@withlocus/checkout-react';
 
<LocusCheckout
sessionId={session.id}
checkoutUrl={session.checkoutUrl}
mode="embedded" // or "popup" | "redirect"
onSuccess={() => setPaid(true)} // UI only — fulfill server-side
onCancel={() => setRetryBanner(true)}
/>
Fulfill · webhook, then confirmcheckout.session.paid
POST https://acme.dev/hooks/locus
X-Webhook-Event: checkout.session.paid X-Session-Id: b7e2c1a4-…
{ "event": "checkout.session.paid", "data": { "sessionId": "…", "paymentTxHash": "0x8f3a…", … } }
 
$ curl -H "Authorization: Bearer claw_…" \
https://api.paywithlocus.com/api/checkout/sessions/b7e2c1a4-…
→ 200 { "success": true, "data": { "status": "PAID", … } } ← fulfill on data.status, not the webhook body

Sessions are plain UUIDs that expire in 30 minutes by default (configurable). Pass a webhookUrl and deliveries are retried with backoff; webhook URLs are SSRF-checked and ownership-verified before a session is ever created — your endpoint answers a one-time locus.webhook.verify challenge by echoing it back. Treat the webhook as a wake-up call — confirm the session status with an authenticated GET before fulfilling.

What ships in the box

Stripe-shaped. Agent-native.

The parts you'd expect from a payments company, rebuilt for a world where the payer might be software — and the money is yours the moment it moves.

Drop-in React SDK

One component, zero runtime dependencies. Render the hosted page embedded, as a popup, or by redirect. In embedded and popup modes, success and cancel come back as origin-checked events with the transaction hash attached.

Three payers, one session

The same session takes a Locus login, an external wallet, or an agent paying by API with its claw_ key. You don't build separate flows for human and machine customers — the hosted page carries all three.

Instances, not plumbing

Tag sessions with your own unique instanceId "acme-product-page-shoes" — and the surface appears in your dashboard on first use. Conversion and payment-method stats split per surface, no setup step.

A sandbox that tells the truth

Sandbox keys (claw_sandbox_…) run every checkout API endpoint against fixtures kept in parity with live captures. Wire up your server and agent flows before a cent moves.

How it works

From session to settled in three steps.

01

Create a session

Your server calls POST /api/checkout/sessions with an amount and description. You get back a hosted checkoutUrl to embed, pop up, link — or hand straight to an agent.

02

The buyer pays — whoever they are

A human logs in or connects a wallet; an agent preflights the session and pays by API. Locus-wallet and agent payments clear the buyer's own spending controls before they execute.

03

USDC lands in your wallet

The payment is detected on-chain — typically 10–30 seconds — and the session flips to PAID. If you set a webhook URL it fires, and receipts go out when configured with a payer email. No payout schedule: the funds are already yours.

FAQ

Questions, answered.

Open a checkout agents can walk through.

Sign in for your API key, stats, and session history — your first session is one curl away.

Reading this as an agent? Locus checkouts accept you natively — read the agent guide, preflight the session, pay.Your operator sets the rules. You do the work.