SubsieBeta
Documentation

Build on Subsie

Subsie is API-first stablecoin payment infrastructure on Base. You create checkout sessions over REST, buyers pay USDC from their own wallets on a hosted page, settlement happens on-chain in a single non-custodial transaction, and you get signed webhooks plus retrieval APIs to confirm everything server-side.

How a payment works

The whole integration is one loop. Your server creates a checkout session with the terms of the charge; Subsie returns a hosted URL; the buyer connects a wallet and pays; the PaymentRouter contract settles the transfer on-chain in production; Subsie verifies the settlement and notifies you. Test mode uses the same checkout/session model on Base Sepolia, with a temporary direct-transfer fallback until the Sepolia router is configured.

StepWhat happens
1. CreatePOST /api/v1/checkout/sessions with a title, amount, and your internal reference. The response includes a hosted url.
2. RedirectSend the buyer to the session URL. Subsie hosts the checkout page: wallet connect, USDC approval, and payment.
3. SettleThe buyer pays through the PaymentRouter contract when it is configured. Funds move directly from the buyer to your verified settlement wallet (and the fee split to Subsie) in one transaction. Subsie never holds funds.
4. ConfirmSubsie verifies the on-chain settlement against the session, marks it completed, and sends checkout.session.completed and payment.succeeded webhooks. You can always re-check with the retrieval APIs.
Chain is the source of truth
Completion does not depend on the buyer keeping the tab open. Subsie independently indexes In router mode, Subsie indexes PaymentRouter settlement events and reconciles them against sessions, so a payment that lands on-chain completes the session even if the browser disappears right after the transaction. The direct-transfer fallback is for development and test-mode bring-up only.

Authentication

Every API request is authenticated with a secret key in the Authorization header. Create keys on the Developers page of your dashboard. Keys are shown once and stored hashed.

Authenticated request
curl https://pay.example.com/api/v1/payments \
  -H "Authorization: Bearer orven_sk_test_..."

The base URL is the host where your Subsie instance runs — the same origin that serves the dashboard. All endpoints in these docs are relative to it.

Test and live mode

Keys come in two modes, and the mode decides everything: which chain sessions settle on, which data you can see, and which webhooks fire. Test and live data never mix.

Test modeLive mode
Key prefixorven_sk_test_orven_sk_live_
NetworkBase Sepolia (chain 84532)Base (chain 8453)
USDC0x036CbD53842c5426634e7929541eC2318f3dCF7e0x833589fCD6eDb6E08f4c7C32D4f71b54bdA02913
MoneyFaucet USDC, free to testReal funds
SubscriptionsNot available (returns 400)Available

Every API object carries a livemode boolean so your handlers can assert they are processing the data they expect.

Core objects

ObjectPrefixWhat it is
Checkout sessioncs_One intent to charge: terms, hosted URL, expiry, and a snapshot of the fee terms at creation.
Paymentpay_A settled on-chain charge with gross, fee, and net amounts plus the transaction hash.
Subscriptionsub_A recurring on-chain billing agreement, charged by Subsie on schedule (live mode).
Payment attemptatt_One recurring charge try, including failures and the dunning retry state.
Settlement walletwlt_A merchant wallet that proved ownership by signing a message. Payments settle only to verified wallets.
Webhook endpointwe_A URL that receives signed event deliveries for one mode.

Next steps