Skip to content

Subscription commands: resume, switch, unsubscribe

The Subscription Verbs resume, switch, unsubscribe as CLI commands, with inputs, result, refusals and an example.

Reference for Subscription, one group of Subscription commands.

Subscription.resume

Resume restarts billing and Entitlements on a paused Subscription before its pause ends. Verb page.

Text
npx startup-builder do Subscription.resume --json '<input>' [--try | --send | --do]

Emits Subscription.resumed.

Inputs

InputTypeRequiredDescription
subscriptionSubscriptionrequiredThe paused Subscription.

Returns

OutputTypeRequiredDescription
subscriptionSubscriptionrequiredThe active Subscription.

Refuses when

CheckErrorFixThen call
The key is valid, but its scopes do not allow this operation.forbiddenUse a key whose scopes cover the operation, or ask an owner of the namespace to grant them.None.

Example

Terminal
npx startup-builder do Subscription.resume --json '{"subscription":"sub_0Ij6oxjf6k"}'

Subscription.switch

Switch moves a Subscription to another Offer and prorates the current period. Verb page.

Text
npx startup-builder do Subscription.switch --json '<input>' [--try | --send | --do]

Emits Subscription.switched.

Inputs

InputTypeRequiredDescription
subscriptionSubscriptionrequiredThe Subscription to move.
offerOfferrequiredThe Offer to move to.
effectiveAtdatetimeWhen the move takes effect; moving existing Customers to a higher Price waits at least the notice period.

Returns

OutputTypeRequiredDescription
subscriptionSubscriptionrequiredThe Subscription on its new Offer.

Refuses when

CheckErrorFixThen call
The input does not match the schema of the operation.invalid-inputRead the schema of the operation, then send every required field with the right type.None.
The operation is part of an Offer the caller has not accepted or paid for.payment-requiredAccept the Offer named in the response, then retry the call.Offer.accept
The key is valid, but its scopes do not allow this operation.forbiddenUse a key whose scopes cover the operation, or ask an owner of the namespace to grant them.None.
The record is not in a state that allows this Verb, so the call is refused.refusedRead the record, run the Verb that moves it to an allowed state, then retry.None.

Example

Terminal
npx startup-builder do Subscription.switch --json '{"subscription":"sub_whVFaHKWIV","offer":"offer_2hzYe1ERo0"}'

Subscription.unsubscribe

Unsubscribe ends a Subscription at the close of its current period, and the Customer keeps access until then. Verb page.

Text
npx startup-builder do Subscription.unsubscribe --json '<input>' [--try | --send | --do]

Emits Subscription.unsubscribed.

Inputs

InputTypeRequiredDescription
subscriptionSubscriptionrequiredThe Subscription to end.
reasontextWhy the Customer leaves.
commenttextThe Customer’s own words, kept verbatim as the Evidence quote.

Returns

OutputTypeRequiredDescription
subscriptionSubscriptionrequiredThe Subscription, ending.

Refuses when

CheckErrorFixThen call
The key is valid, but its scopes do not allow this operation.forbiddenUse a key whose scopes cover the operation, or ask an owner of the namespace to grant them.None.
The record is not in a state that allows this Verb, so the call is refused.refusedRead the record, run the Verb that moves it to an allowed state, then retry.None.

Example

Terminal
npx startup-builder do Subscription.unsubscribe --json '{"subscription":"sub_whVFaHKWIV"}'