billing

Sync Subscription

Reconcile the caller's subscription tier from Stripe and return the refreshed session.

Fallback path after the Stripe Checkout redirect: if the webhook hasn't delivered (or has been broken), the frontend calls this to force the backend to look up the user's subscription directly from Stripe and update the DB.

post/api/billing/sync

Request

  • Base URL: https://api.retirementlab.app (the document declares no server; this is the origin it was published from)
  • URL: https://api.retirementlab.app/api/billing/sync
  • Auth: HTTP bearer

Request body

session_idstring

Response

Successful Response

anonymousboolean
account_tierstring
scenario_capinteger
run_capinteger
runs_remaininginteger
billing_enabledboolean
has_stripe_customerboolean
paid_access_expires_atstring date-time
billing_planstring
has_active_subscriptionboolean
can_start_stripe_checkoutboolean
can_start_store_purchaseboolean
trial_eligibleboolean
pro_plan_price_usdinteger
free_n_scenariosinteger
signup_conversionboolean
missing_terms_acceptanceboolean
auth_tokenstring
auth_token_expires_atstring date-time

Changes

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