POST /api/public/v1/billing/startCheckout

Changed on

Starts a hosted Stripe Checkout for the business's own brand and region offer at the chosen interval, optionally for a named plan and add-ons, and returns its URL; the subscription exists once Stripe confirms it. A quoteId from billing.getQuote is verified against the current terms. Refused with FORBIDDEN for a demo business, and with PRECONDITION_FAILED while billing is paused, as intervalNotOffered when the offer does not sell the interval, as planNotOffered, addonNotOffered, addonIncompatible, addonRedundant, addonDuplicate or quantityUnsupported when the selection is not sold, as quoteRequired when any selection other than legacy pro monthly or yearly omits quoteId, as offerChanged when quoteId no longer matches, as currencyMismatch when the business already bills in another currency, as subscriptionExists when it already has a subscription, as checkoutInProgress while another checkout of the business is being prepared or its outcome is being confirmed, as checkoutConfirming while a payment is being confirmed, as previousPaymentPending, subscriptionUnverified, subscriptionConflict or checkoutCheckFailed when Stripe's own state does not allow a new checkout, as previousPaymentPending also when another checkout carrying the same discount grant may still be paid, as customerMismatch when the business's Stripe Customer belongs to another organization, as emailUnverified before anything reaches Stripe while the caller's stored address is not verified (billing.sendEmailCode starts the verification), and as for billing.getOffer: Refused with PRECONDITION_FAILED as organizationBrandUnknown or organizationRegionUnknown when the business has no recognized brand or region, as priceUnusable when a configured Stripe price cannot back a subscription or the offer's prices name different products or currencies and no period remains usable, as catalogTermsConflict when the deployed catalog redefines a published plan or add-on version, as pilotCouponUnavailable when a staff discount or one of the business's discount grants applies to a selection and its Stripe coupon is missing, spent or no longer matches the terms it was accepted on, and as billingNotConfigured when the offer names prices but billing is not configured. For a classified test organization, billed in the Stripe Sandbox: refused with FORBIDDEN as sandboxNotAllowed unless the caller is a verified Fortune OS employee holding the billing-sandbox experiment, and with PRECONDITION_FAILED as billingNotConfigured while the Sandbox is not configured. Refused with FORBIDDEN as paywallLocked when the caller is an Owner or Manager of a business the merchant Paywall locks: one with no verified subscription that has taken 5 orders while the Paywall's rollout reaches it, an order counting from its first saved line, whether or not it is paid or completed, until it is archived or cancelled before activation. Nothing is read or written; a verified subscription lifts the lock.

Request

  • Base URL
    https://app.fortuneos.ai
  • Auth
    none declared

Request body

object required
organizationId, string required
planCode, string
interval, 'month' | 'year' required
intervalCount, integer
addons, object[]
quoteId, string

Response

OK

unknown required

Changes

    • info

      added the new optional request property addons

    • info

      added the new optional request property intervalCount

    • info

      added the new optional request property planCode

    1 more change in this revision