API Reference
Complete API reference for the Bags Merchant of Record platform, auto-generated from our OpenAPI specification.
Complete endpoint documentation for the Bags API. All endpoints are available at https://www.getbags.app.
Coming soon in the product: Subscriptions API, self-serve refunds via API key, and card payment flows. Endpoints may exist in the OpenAPI spec for early access — check each tag page for live vs waitlist notes.
Authentication
Bags uses Bearer token authentication. Include your API key in the Authorization header:
Authorization: Bearer bag_test_sk_your_key_hereThere are two types of API keys:
| Key type | Prefix | Environment |
|---|---|---|
| Test | bag_test_sk_* | Sandbox (no real money) |
| Live | bag_live_sk_* | Production |
Some routes (webhook endpoint listing, refund initiation from the dashboard) require dashboard session auth, not an API key. Guides call these out explicitly.
Endpoints
Products
Catalog products for V1 checkouts.
Checkouts
Hosted checkout sessions — create, redirect, poll.
Payment Links
Reusable payment links.
Customers
Customer records.
Transactions
List and inspect payment transactions.
Webhooks
Manage webhook endpoints (dashboard session for GET).
Webhook Events
Live checkout events and payloads.
Settlements
Balance and payout requests.
Refunds
Refund endpoints — dashboard session in v0.
Subscriptions
Recurring billing — coming soon.
System
Health and version probes.
Rate Limits
Rate limit tiers and retry guidance.
Error Codes
Stable error codes and fixes.