Extend a trial
harbor_extend_trialExtend a customer's active trial by up to 30 days. Preview the new end date, then confirm with a token to apply.
Instructions
Push a trialing subscription's end date out by a number of days. Requires two calls.
Call 1 — omit confirm_token to get a preview and a token. Call 2 — pass the token with identical arguments to apply it.
Args:
customer_id (string): format cus_0042
days (number): 1 to 30
reason (string): 4-200 chars
confirm_token (string, optional)
Returns for preview: { "stage": "preview", "confirm_token": string, "expires_in_seconds": number, "current_trial_ends_at": string, "new_trial_ends_at": string }
Returns for execute: { "stage": "executed", "customer_id": string, "new_trial_ends_at": string }
Refuses when the customer has no subscription, or the subscription is not in 'trialing' status — you cannot start a new trial for a paying or churned account.
Input Schema
| Name | Required | Description | Default |
|---|---|---|---|
| days | Yes | Days to add to the trial. Maximum 30. | |
| reason | Yes | Why. Stored in the audit log. | |
| customer_id | Yes | Customer whose trial should be extended. | |
| confirm_token | No | Omit on the first call to get a preview. Pass the returned token to execute. |