BagsBags Docs
Getting Started

Architecture

How products, checkouts, sessions, webhooks, and settlements fit together in Bags.

Bags is a Merchant of Record API. Your backend creates catalog objects and checkout sessions; customers pay on hosted pages or through your custom UI; Bags notifies you via webhooks and holds funds until you request a settlement.


Primary integration path (v0)

Your backend                    Bags                           Customer
    |                             |                                |
    |-- POST /api/v1/products --->|                                |
    |<-- productId --------------|                                |
    |                             |                                |
    |-- POST /api/v1/checkouts -->|                                |
    |<-- session id, url ---------|                                |
    |-- redirect customer ---------------------------------------->|
    |                             |<-- USDC on-chain -------------|
    |<-- webhook checkout.completed|                               |
ObjectScopeCreated by
ProductReusable catalog item (name, price, network)POST /api/v1/products
Checkout sessionOne buyer attempt (30 min expiry)POST /api/v1/checkouts
Payment linkOptional reusable /pay/{id} URLPOST /api/payment-links
TransactionOn-chain payment recordBags after customer pays
WebhookServer notificationBags when lifecycle events fire
SettlementBulk USDC withdrawalMerchant request → manual approval

Checkout surfaces

SurfaceWho callsUse when
POST /api/v1/checkoutsMerchant (API key)Default: one API call → hosted URL per purchase
POST /api/payment-linksMerchantShareable product URL for many customers
POST /api/checkout/sessionBuyer-facing appCustom/embedded checkout after tax quote

Do not mix merchant catalog calls with buyer session calls. See Choose Your Integration.


Tax and compliance

Tax quotes route to regional providers based on the customer's country (EU VAT, UK VAT, India GST, US sales tax where nexus is active, zero-tax elsewhere). Bags is the legal seller and remits tax as MoR.


Settlements

Withdrawals follow manual approval: appliedapprovedprocessingcompleted. See Payouts and Settlements & Payouts.


Coming soon

Subscriptions, card payments, TypeScript SDK, customer portal, and discounts are on the roadmap. Docs pages mark each as coming soon with waitlist links.


What's next

On this page