Create top-up 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 Stripe Checkout page where the card owner reviews and pays for top-up credits for your workspace. Nothing is charged until they pay on that page.

Open url in a browser and let the card owner complete the payment. Stripe then returns them to the Base44 billing page, and the credits are added to the workspace shortly after the payment goes through. Get the amounts and prices from List top-up packs. Send at least one of message_credits (a multiple of 50, up to 400) or integration_credits (a multiple of 1,000, up to 8,000). Prices are in the workspace's billing currency, US dollars or Israeli shekels, and shekel prices have VAT added at checkout.

Only the workspace owner can buy top-ups, and the workspace needs a paid plan other than Enterprise that isn't past due. A workspace with an open payment dispute can't buy top-ups, and neither can one whose plan is paid through the App Store or Google Play. Checkout isn't available on a workspace billed through Wix. Where Base44 has turned on Wix top-ups, those workspaces buy with Buy top-up with saved card instead.

This endpoint is limited to 8 requests an hour per user, and requests it rejects count toward the limit. Some workspaces have a different limit. A read-only token is refused, and workspace API keys aren't accepted.

<Note>Top-ups are only available to accounts Base44 has enrolled in top-up credits. Other accounts get a 403.</Note>

post/api/billing/topup/create-checkout-session

Request

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

Request body

message_creditsinteger

Message credits to buy: a multiple of 50, up to 400. Defaults to 0.

integration_creditsinteger

Integration credits to buy: a multiple of 1,000, up to 8,000. Defaults to 0.

Example request

{
  "message_credits": 100,
  "integration_credits": 1000
}

Response

The checkout page to send the card owner to.

session_idstring required

ID of the Stripe Checkout session.

urlstring required

Stripe Checkout page for this purchase. Open it in a browser so the card owner can review and pay.

Example response

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

Changes