billing

Create Checkout

Create a checkout session for a plan upgrade.

Requires the X-API-Key header — the calling key is the one that will be upgraded. The returned URL should be opened in the user's browser to complete payment.

curl example:

curl -X POST https://api.halalterminal.com/api/billing/checkout \
  -H "X-API-Key: ht_abc123def456" \
  -H "Content-Type: application/json" \
  -d '{"plan": "starter"}'
post/api/billing/checkout

Request

  • Base URL: https://api.halalterminal.com
  • URL: https://api.halalterminal.com/api/billing/checkout
  • Auth: API key in header X-API-Key

Request body

api_keystring nullable

Deprecated — set the X-API-Key header instead. If provided here it must match the header value.

planstring required

Target plan name (starter, pro, or enterprise)

Example request

{
  "plan": "starter"
}

Response

Checkout session URL and ID

checkout_urlstring required

Hosted checkout page URL — open in the user's browser

session_idstring required

Checkout session identifier

Example response

{
  "checkout_url": "https://checkout.example.com/c/pay/cs_test_abc123",
  "session_id": "cs_test_abc123"
}

Changes

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