BagsBags Docs
SDKs

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" }
  }'
ResourceGuide
Hosted checkoutQuickstart
Payment linksCreate a Payment Link
Custom checkoutBuild a Custom Checkout
WebhooksHandle 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

LanguageRecommendation
Pythonrequests or httpx
Gonet/http
RubyFaraday
PHPGuzzle

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 serverPOST https://www.getbags.app/api/mcp/mcp
  • WebMCP — browser tools on the marketing site
  • x402Agentic Payments

See Agents & MCP.


What's next

On this page