Closed AdamVig closed 7 years ago
The new Subscription entity contains the following fields:
subscriptionID
organizationID
stripeCustomer
: unique ID for accessing Stripe customer informationvalid
: 0
for invalid (when status is EXPIRED
or TRIAL_EXPIRED
), 1
for valid (when status is TRIAL
or VALID
). Quick way of discerning whether or not user should be allowed to use the app.subscriptionStatusID
: relates to the new Subscription Status entity, described belowstatusUntil
: datetime that represents when the current subscription status ends. Relevant for TRIAL
and VALID
statuses. Should be null
when the status is EXPIRED
or TRIAL_EXPIRED
.The new Subscription Status entity is simply a name
and subscriptionStatusID
. It allows the apps to use an enum for customizing behavior based on the current subscription status. The current statuses are (the list numbers represent the ID of each status):
TRIAL
: default state.TRIAL_EXPIRED
: trial has ended, user has not paid for a subscription.VALID
: user has paid for a subscription.EXPIRED
: user's payment is overdue.CANCELED
: user has cancelled subscription.
/subscription/hook
that receives webhooks when subscription is updated or payment is received.PUT
,POST
, andDELETE
request (returns402 Payment Required
when invalid)GET /subscription
for checking subscription status