me

Schedule a downgrade to Trial at the end of the current billing period (admin only)

Admin-only Zygnal-side cancel path since Stripe Customer Portal does not list Trial in the plan picker. Schedules the Stripe subscription for cancel-at-period-end and tags subscription.metadata.downgrade_target='trial' so the eventual subscription.deleted webhook flips planId to Trial. Existing credit balance is preserved until period_end (then wiped by the local-expiry cron). No future Trial allotments are granted. PAYG packs survive untouched at their original rate. Idempotent — repeat calls return 409 already_scheduled.

post/api/me/plan/cancel-to-trial

Request

  • Base URL: https://api.signalraven.ai
  • URL: https://api.signalraven.ai/api/me/plan/cancel-to-trial
  • Auth: none declared

Response

Cancel-to-Trial scheduled

oktrue required
effectiveAtstring date-time required

ISO timestamp of when the downgrade takes effect (= current period_end). After this date, the customer is on the Trial plan with no auto-allotment; existing credits expire via the local-expiry cron.

subscriptionIdstring required

Stripe subscription id that was scheduled for cancellation.

previousPlanSlugstring required

Plan slug the customer is downgrading FROM (e.g. "pro"). Used by the portal to render the confirmation.

creditsRemaininginteger required

Credit balance at the time the downgrade was scheduled. Carries through until effectiveAt.

Changes

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