Create plan checkout

Changed on

<Info>This API is in beta. Endpoints, fields, and behavior may still change, so avoid depending on it in production.</Info>

Creates a checkout page where the payer buys a paid plan for your workspace. Nothing is charged until they pay on that page.

Pass the price ID of the plan, from price_ids in List plans, then open url in a browser and let the payer complete the purchase. The page is on Stripe or Wix, depending on how the workspace is billed. Only the workspace owner can start a checkout.

If the workspace already pays for a plan, move it with Change plan or Change Wix plan instead. Checkout refuses it with 409 when the plan is billed through Stripe and 400 when it's billed through Wix. A workspace billed through the App Store, Google Play or an external contract can't check out here either.

Set checkout_return_path to send the payer back to a page on Base44 after checkout. Without it, they land on the billing page.

Each call creates a new checkout page, including a retry after a lost response. Send the payer only one.

The base rate limit is 8 requests per hour per user. See Rate limits for the multiplier your plan gets.

<Warning>Send only checkout_return_path in the body. Other request fields aren't supported and their behavior can change.</Warning>

post/api/billing/create-checkout-session/{price_id}

Request

  • Base URL
    https://app.base44.com
  • URL
    https://app.base44.com/api/billing/create-checkout-session/{price_id}
  • Auth
    HTTP bearer

Path parameters

price_idstring required

Price ID of the plan to buy, from price_ids in List plans.

Request body

checkout_return_pathstring nullable

Path on Base44 to send the payer back to after checkout, such as /apps. It must start with a single /. Any other value is ignored, and the payer lands on the billing page.

Example request

{
  "checkout_return_path": "/apps"
}

Response

The checkout page to send the payer to.

session_idstring required

ID of the Stripe Checkout session. An empty string when the workspace checks out through Wix.

urlstring required

Checkout page for this purchase. Open it in a browser so the payer can review and pay. On Wix the link itself opens the checkout, so don't log or share it.

Example response

{
  "session_id": "cs_live_a1B2c3D4e5F6g7H8i9J0",
  "url": "https://checkout.stripe.com/c/pay/cs_live_a1B2c3D4e5F6g7H8i9J0"
}

Changes