POST /api/public/v1/publicPricing/startPurchase

Changed on

Starts or edits the caller's purchase selection from public Pricing, or replays the answer a startKey already recorded. Takes plan, period and add-on codes with the quoteId shown, never a price: any other field is refused as BAD_REQUEST. Answers signUp for a visitor and continue for a signed-in caller, with the new choiceRevision, and sets the signed purchase cookie for a visitor. A signed-in caller's start without a revision is a fresh choice: it replaces the plan of the caller's live purchase in the same environment and keeps its business and confirmations; a purchase frozen for a Checkout is released only after Stripe confirms every session it made is no longer payable, and is refused checkoutCheckFailed (freeze kept) when Stripe cannot confirm it, or checkoutAlreadyPaid for a session the business's standing subscription paid; it also deletes the unbound selection the browser's cookie carried from before sign-in and clears the cookie, while a refused start keeps both. With restart, a start over after a discarded carried plan, it instead begins a purchase only while the caller has none live in either environment, and is refused PRECONDITION_FAILED with purchaseInProgress otherwise, leaving that purchase untouched. Refused PRECONDITION_FAILED with selectionChanged for a stale revision or a concurrent first start, checkoutInProgress while a Checkout attempt is reserved or unknown, checkoutPaymentPending while a paid session is still being settled, startKeyUnavailable for a visitor's replay that lost its cookie, purchaseIntentClosed for a replay whose purchase closed, and the Billing refusals (offerChanged, planNotOffered, intervalNotOffered, the add-on refusals) for a selection the offer rejects. TOO_MANY_REQUESTS past the per-IP budget.

Request

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

Request body

object required
planCode, string
interval, 'month' | 'year' required
intervalCount, integer
addons, object[]
quoteId, string required
startKey, string uuid required
choiceRevision, integer nullable required
promo, string
restart, unknown

Response

OK

object required
next, 'signUp' | 'continue' required
choiceRevision, number required

Changes