thru gives each payment a one-time address, watches the chain, sends your server a signed webhook when the money arrives, and forwards the funds to your own settlement wallet. Fifteen topics, written to be read top to bottom.
For agents
Append .md to any path for the raw source. Index at /llms.txt, release feed at /changelog.json.
From the API
The same content, one topic at a time, as JSON:GET https://api.thru.la/v1/docs/:topic
start-hereWhat thru is, the five facts every integration needs, and a table for choosing between checkout sessions, direct payments, payment links, invoices and agent paymentsquickstartCreate a key, register a webhook, create a 1 USDC payment on Arc testnet, pay it, and receive a signed payment.confirmed event, all with curlauthThe x-api-key header, creating and revoking keys in the console, what a key can do, testnet vs mainnet with one key, and the endpoints that need no keycheckout-sessionsSend a buyer to a thru-hosted page for one of your products, at its fixed price or at an amount your server locks per session; signed return, checkout.session.* and payment.* webhooks, the one-session-one-payment rule, statuses and reconciliationcredit-topupsLet users top up a balance with any amount on the thru-hosted page: one custom_amount product, a checkout session per top-up with the amount locked, credit on payment.* from receivedAmount; table, handler, idempotent credit step, reconciliation; plus the direct-payments variant for your own screenpaymentsPOST /v1/payments field by field, the response, reads, the status lifecycle, confirmations, the seven-day late-transfer watch window, how a missed transfer is recovered and when its payout is manual, the single-use address, idempotency and common mistakeswebhooksRegister endpoints and filters, which event family to listen to (and how not to count a sale twice), payload shapes, signature verification code, dedupe, retries, test sends and replaysupported-chainsREAD BEFORE OFFERING A CHAIN: which chain/network/token combinations confirm on api.thru.la today, contract addresses and decimals, and the ones the API accepts but never confirmsproductsCatalogue items in two pricing modes: fixed (a plan or SKU with a price) and custom_amount (credit or quantity, the amount named per checkout within your min/max); per-chain rails, the server-generated slug, the anonymous /pay/:slug payment link, and the product lifecycleinvoicesBill a named customer with line items: create, edit while draft, send, void, the hosted page at /i/:publicId, and how to tell when an invoice is paid (there is no invoice webhook)refunds-and-settlementRefund a payment (full or partial, and what fires), and how received funds are forwarded to your settlement addresses, with per-product routing and the change cool-downapi-conventionsRequest and response conventions (decimal strings, ids, timestamps), the error body and every status code, list limits and pagination, idempotency, rate limits and time limitssdks@thru-payment/server (checkout sessions, return and webhook verification), checkout-core (headless, React or plain JS), pay-sdk (React components) and x402; what each covers and what it does notgoing-liveWhat to check before you accept real money: keys, network checks, chains, webhooks, idempotency, settlement and reconciliationfacilitator-x402NOT ENABLED on api.thru.la (the /v1/facilitator/* endpoints return 404). Per-request HTTP 402 payments by AI agents: how the flow works, the @thru-payment/x402 middleware, chains and schemes