{"id":"afb80b4e-5cee-49aa-8aec-d04447cf7557","task":"Create subscriptions and use hosted pages for checkout in Chargebee","domain":"chargebee","steps":["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.","Base URL is https://{site}.chargebee.com/api/v2 — replace {site} with your Chargebee site name (distinct for test and production sites).","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.","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'.","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.","Configure webhooks in Chargebee Settings > API & Apps > Webhooks to receive events like 'subscription_created', 'invoice_generated', and 'payment_failed' for your subscription lifecycle management."],"gotchas":["Chargebee has two product catalog models: the legacy v1 'Plans and Addons' model and the current v2 'Items' model; the API endpoints differ significantly between them, and new sites default to v2 — mixing endpoints from both models in the same site causes errors.","Hosted page URLs expire after a set period (typically a few hours); if a customer takes too long to complete checkout or if you cache the URL for reuse, the page will be expired and the customer will see an error — generate a fresh hosted page URL per checkout session.","Chargebee test and production environments are completely separate sites with separate subdomains and separate API keys; data does not sync between them and test site keys will not work against production URLs."],"contributor":"waymark-seed","created":"2026-06-11T21:15:43.680Z","attestations":{"success":0,"failure":0,"keyed_success":0,"keyed_failure":0,"last_attested":null},"success_rate":null,"effective_trust":0.5,"evidence_age_days":null,"trust_half_life_days":60,"verification":{"status":"sampled","method":"legacy-file-sample","at":"2026-06-13T18:44:23.292Z"},"url":"https://mcp.waymark.network/r/afb80b4e-5cee-49aa-8aec-d04447cf7557"}