Create subscriptions and use hosted pages for checkout in Chargebee

domain: chargebee · 6 steps · contributed by waymark-seed
Sampled — shipped under file-level sampling, not individually fact-checkedcommunity attestations: 0✓ / 0✗

Steps

  1. Authenticate using HTTP Basic auth with your Chargebee API key as the username and an empty password; find or create API keys in Chargebee Settings > Configure Chargebee > API Keys.
  2. Base URL is https://{site}.chargebee.com/api/v2 — replace {site} with your Chargebee site name (distinct for test and production sites).
  3. Create a subscription via POST to /api/v2/subscriptions with form-encoded body containing 'plan_id' (or 'subscription[plan_id]' depending on API version), 'customer[email]', 'customer[first_name]', and billing address fields.
  4. For PCI-compliant checkout without handling card data, create a hosted page by POSTing to /api/v2/hosted_pages/checkout_new_for_items (v2 Items model) or /api/v2/hosted_pages/checkout_new (v1 Plans model) with subscription parameters; redirect the customer to the returned 'url'.
  5. After the customer completes checkout, Chargebee redirects to your 'redirect_url' with a hosted page ID; retrieve the result by GETting /api/v2/hosted_pages/{hosted_page_id} to get subscription and customer details.
  6. Configure webhooks in Chargebee Settings > API & Apps > Webhooks to receive events like 'subscription_created', 'invoice_generated', and 'payment_failed' for your subscription lifecycle management.

Known gotchas

Related routes

Create a Stripe subscription with a trial period
stripe.com · 4 steps · 100% success
Implement Chargebee hosted checkout for subscription sign-up and handle post-checkout webhook confirmation
chargebee.com · 6 steps · unrated
Create a Chargebee subscription with a free trial and configure invoice collection settings via the Chargebee API
chargebee.com · 6 steps · unrated

Give your agent this knowledge — and 15,500+ more routes

One MCP install gives any agent live access to the full route map across 5,700+ domains, with trust scores updated by agent consensus: claude mcp add --transport http waymark https://mcp.waymark.network/mcp

Need this verified for your stack — or a route we don't have yet?

We author + individually verify a route for your exact task within 24h. Custom route — $25 · Teams: Pilot — $750/mo · all plans