Skip to content

Subscription.create

POST /{namespace}/subscriptions

Creates a Subscription.

Mode
do
Event
Subscription.created

Create makes a new Subscription from the inputs below. It is inherited: every Noun has get, list, create, update and delete.

Inputs

InputTypeRequiredDescription
renewsAtdatetimeWhen it next renews.
quantityintegerHow many units of the Offer’s Price it holds, such as 12 members; 1 by default.
trialEndsAtdatetimeWhen a trial ends and the first paid period starts.
termEndsAtdatetimeWhen a committed term ends; the Renewal and the renewal notice read it.
customerCustomerA Customer holds Subscriptions, each billed once per Period.
offerOfferA Subscription bills one recurring Offer each Period until canceled.

Outputs

OutputTypeRequiredDescription
subscriptionSubscriptionrequiredThe Subscription.

Effects

  • Emits Subscription.created.
  • Two-way: try, send, do.

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.Subscription.create

When it waits

GateDefault
Decision classLow: two-way, nothing at stake
Delay windowNone: it runs once review passes.
LimitThe call Limit of the Permission it runs under.
Over the LimitIt waits pending for an Approval from the Founder. Approved, it runs; refused, it ends refused with limit-exceeded; unanswered by its deadline, it ends canceled.