extend_customer_trial
Extend a customer's Stripe subscription trial by 1-30 days, with dry-run preview and idempotency to prevent duplicate extends, for internal support use.
Instructions
Extend your account's Stripe subscription trial by 1-30 days (POST /v1/tier2/trial/extend). Founder-operations only (an internal support tool; general accounts get 403). Trial extension directly affects revenue, so there is no plan to open it up. Cumulative cap of 60 days (aggregated from the last 30 days of audit logs); 409 unless status='trialing'. dryRun must be passed explicitly (guards against accidental mutation via an implicit false); when dryRun=false, idempotencyKey is also required (16-128 alphanumeric plus '_-'). Re-calling with the same key returns the cached result via the tier2_idempotency table (structurally preventing retry double-extends). dryRun=true previews previousTrialEnd / newTrialEnd / the cumulative total only (no Stripe call); dryRun=false performs the actual Stripe mutation plus the accounts_subscription sync update.
Input Schema
| Name | Required | Description | Default |
|---|---|---|---|
| dryRun | Yes | Must be passed explicitly. true = preview only; false = actual trial extension + Stripe mutation | |
| reason | Yes | Reason for the extension (recorded in the audit log; required, 200 chars max) | |
| approvalId | No | Approval id granted via request_approval (apr_ + 32 hex; create with action 'extend_customer_trial'). Server-side verification + atomic consumption on a fresh execution (1 approval = 1 execution chain; retries with the same idempotencyKey do not re-consume). dryRun only verifies | |
| extendDays | Yes | Days to extend (1-30, cumulative cap 60 days) | |
| idempotencyKey | No | Required when dryRun=false. 16-128 chars alphanumeric plus '_-'; re-calls with the same key return the cached result | |
| targetAccountId | Yes | Target account id (your own account only for now; specifying another user gets 403) |