251
All tools

Create a checkout for a new subscription

Creates a Chargebee-hosted checkout page for the plan and add-on prices you pass and returns it with the URL to send the customer.

Updated Sep 27, 2026

create-checkout.md

Create a checkout for a new subscription

Creates a Chargebee-hosted checkout page for the plan and add-on prices you pass and returns it with the URL to send the customer.

Note: The first subscription_items price must be a plan. The subscription exists only once the customer completes checkout at the returned url: retrieve the hosted page for the subscription and invoice rather than relying on the redirect.

Set up

Use the first option your agent supports.

API (official)

  • Base URL: https://{site}.chargebee.com/api/v2
  • Endpoint: POST /hosted_pages/checkout_new_for_items
  • Auth: send the header Authorization: Basic $CHARGEBEE_API_KEY
  • Docs: https://apidocs.chargebee.com/docs/api

Note: {site} is your Chargebee site name, such as acme-test. CHARGEBEE_API_KEY holds the base64 of <api key>:, and test and live sites have different keys.

Before anything else, confirm access with the cheapest read-only call, like a list or a search. Never send or change anything to test access.

Rules

  • Ask the user before anything that sends messages, costs money, or changes data, and say how many records it touches. One approval covers a batch the user has seen.
  • Never print API keys.

Ways in

RouteSourceCallRequiredDocs
APIOfficialPOST /hosted_pages/checkout_new_for_itemsAPI key in $CHARGEBEE_API_KEYDocs

Workflows using Create a checkout for a new subscription

No workflows yet
No published workflow uses Create a checkout for a new subscription yet.