Billing

Create a self-serve upgrade checkout

Creates a Chargebee hosted page that changes the organization's existing subscription to a paid plan of the same vertical. Refuses any target that is not a strict upgrade — a downgrade, a cross-vertical plan, or Enterprise. An organization that signed up to the free Agent Wallet trial must also send its billing identity in customer: it is written to Chargebee, then the trial ends on the hosted page (or a new subscription is opened if the trial subscription is already cancelled).

post/v1/billing/upgrade/checkout

Request

  • Base URL: https://api.prod.keyban.io
  • URL: https://api.prod.keyban.io/v1/billing/upgrade/checkout
  • Auth: bearer (a scheme the document does not define)

Request body

itemPriceIdstring required

Chargebee item-price ID of the target plan. Must be a strict upgrade of the organization's current plan, within the same vertical (Dpp / AgentWallet / Trust).

Example request

{
  "itemPriceId": "agent-wallet-growth-plan-v2-eur-monthly",
  "customer": {
    "type": "company",
    "legalName": "Acme Automations SAS",
    "siren": "552032534",
    "vatNumber": "FR32552032534",
    "firstName": "Jane",
    "lastName": "Doe",
    "phone": "+33612345678",
    "billingEmail": "billing@acme.example",
    "address": {
      "line1": "10 Rue de Rivoli",
      "city": "Paris",
      "zip": "75004",
      "country": "FR"
    }
  }
}

Response

Upgrade checkout URL returned successfully

urlstring uri required

Chargebee-hosted page URL that changes the organization's existing subscription to the requested item price. Redirect the user to it.

hostedPageIdstring required

Chargebee hosted page ID to submit to POST /billing/upgrade/complete once the checkout redirects back.

Example response

{
  "url": "https://mysite.chargebee.com/pages/v3/abc123/checkout",
  "hostedPageId": "hp_AzYy7hSFSDadZ4Rd"
}

Changes

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