Documentation

For AI agents: the docs index is at /llms.txt, and every page is also served as markdown at its URL plus .md.

How TrialValid holds, starts, captures and refunds a card-backed free trial.

Trial states

Every trial is in exactly one state. This is the whole state machine the engine enforces.

  • awaiting_cardThe buyer is on the trial page
  • heldThe plan price is held on the card
  • convertedThe hold was captured
  • refundedA converted trial was refunded
trial statesstate machine
transitions { 3 states }
awaiting_card -> held | abandoned | canceled
held          -> converted | canceled | capture_failed | hold_lost
converted     -> refunded
(every other state is terminal)

Browse by topic