API Reference
API Reference
Complete API reference for the Bag Merchant of Record platform, auto-generated from our OpenAPI specification.
API Reference
Complete endpoint documentation for the Bag API. All endpoints are available at https://justusebag.xyz.
Authentication
Bag 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 |
Endpoints
Payment Links
Create and manage payment links for your products.
Transactions
List and record payment transactions.
Checkout
Checkout session lifecycle management.
Tax
Tax calculation and quotes.
Webhooks
Manage webhook endpoints for payment events.
Developer
API key management.
Settlements
Settlement and balance management.
KYB
Know Your Business verification.
Upload
File uploads via Cloudflare R2.