Billing

Start a hosted checkout.

Creates a provider checkout session for the plan upgrade (or first paid plan) and returns the URL to send the customer to.

post/v1/billing/checkout

Request

  • Base URL: https://api.scalix.world
  • URL: https://api.scalix.world/v1/billing/checkout
  • Auth: HTTP bearer

Request body

planstring required

Plan id to check out. The console sends price_id — accepted as an alias.

success_urlstring uri required

URL to return to after a successful payment.

cancel_urlstring uri required

URL to return to when the customer cancels.

country_codestring nullable

Customer country code (tax calculation).

tenant_idstring nullable

Tenant id; defaults to the caller's authenticated org.

emailstring email nullable

Customer email for the provider customer record.

intervalstring nullable

Billing interval: "month" (default) or "year"/"annual".

Example request

{
  "plan": "pro"
}

Response

Checkout session created

session_idstring required

Provider session id.

urlstring uri required

Hosted payment page URL.

providerstring required

Payment provider that owns the session.

razorpay_key_idstring nullable

Razorpay only: the public key id the console needs to open Checkout.js as an in-page modal.

Example response

{
  "provider": "razorpay"
}

Changes

No recorded changes to this operation across all 1 revision of this API.