SDKs
Official TypeScript SDK — coming soon. Use the REST API for v0 integrations.
Coming soon. The first-party TypeScript SDK is in development and not yet published for general use. Join the waitlist for early access.
For v0, integrate with the REST API directly — any HTTP client works (fetch, curl, requests, etc.).
REST API (v0)
All v0 integrations use Bearer auth and JSON over HTTPS:
export BAG_API_KEY="bag_test_sk_your_key_here"
curl -X POST https://www.getbags.app/api/v1/checkouts \
-H "Authorization: Bearer $BAG_API_KEY" \
-H "Content-Type: application/json" \
-H "Idempotency-Key: $(uuidgen)" \
-d '{
"productId": "YOUR_PRODUCT_UUID",
"network": "base_sepolia",
"externalCustomerId": "cus_123",
"metadata": { "orderId": "ord_456" }
}'| Resource | Guide |
|---|---|
| Hosted checkout | Quickstart |
| Payment links | Create a Payment Link |
| Custom checkout | Build a Custom Checkout |
| Webhooks | Handle Webhooks |
OpenAPI spec: openapi.yaml
TypeScript SDK (planned)
The SDK will wrap the REST API with typed resources for payment links, checkout sessions, webhooks, customers, and events. Package name and npm publish date will be announced when the SDK ships.
Until then, use the Sample Integration as a copy-paste starting point.
Other languages
| Language | Recommendation |
|---|---|
| Python | requests or httpx |
| Go | net/http |
| Ruby | Faraday |
| PHP | Guzzle |
All examples in the Quickstart use portable REST patterns you can translate to any language.
Agents & MCP (live)
Agent tooling is available today without an SDK:
- MCP server —
POST https://www.getbags.app/api/mcp/mcp - WebMCP — browser tools on the marketing site
- x402 — Agentic Payments
See Agents & MCP.