Link

Terminology

  • Asset - An asset is a locked resource, which can be unlocked with a purchase.
  • Subscription Group - A subscription group gives a user access to some number of assets.
  • Subscription Plan - A subscription plan is a purchasable item, for some duration. A subscription plan is attached to a group. Each plan has it’s own price, and may give a few additional assets free.
  • Subscriber - A person that purchases’s to locked assets. Subscribers will typically not have direct access to AccessType. A subcriber may have multiple identities.
  • Subscription - A subscription is a particular subscriber’s access to a subscription plan. It will typically have a start date, and an end date, and may recur at some period. A subscription may have an external id if it came from an earlier CMS, which must be unique. Payment is required to create a subscription.
  • Campaign - A campaign is typically used to fund a project and therefore has a goal. A subscriber can contribute to a campaign by choosing any plan.
  • Wallets - A wallet is used by a subscriber to purchase assets or plans. Purchases by subscribers must be validated by Wallet tokens which can be saved in and retrieved from Accesstype.

Payment

Payment is required to create a subscription for any subscription plan.

Payment Types

A payment always has a payment_type associated. It can be one of the below:

Type Description
razorpay Can be used only with one-time subscription plans
razorpay_recurring Can be used only with recurring subscription plans
android_pay (Deprecated) Can be used only with one-time subscription plans
androidpay_recurring (Deprecated) Can be used only with recurring subscription plans
juspay Can be used only with one-time subscription plans
simpl Can be used only with one-time subscription plans
paytm_auto_debit Can be used only with one-time subscription plans
stripe Can be used only with one-time subscription plans
stripe_recurring Can be used only with recurring subscription plans
paypal Can be used only with one-time subscription plans
paypal_recurring Can be used only with recurring subscription plans
googlepay Can be used only with one-time subscription plans
googlepay_recurring Can be used only with recurring subscription plans
sponsored Can be used only when subscription plan worth is zero
reward Can be used only when subscription plan worth is zero
skip_payment_gateway Can be used only when payment amount is zero
omise Can be used only with one-time subscription plans
omise_recurring Can be used only with recurring subscription plans
adyen Can be used only with one-time subscription plans
adyen_recurring Can be used only with recurring subscription plans

Payment Amount

It must be same as subscription plan price. If a valid coupon code is applied, the difference of subscription plan price and payment amount must be equal to the discount amount.

This price validation will be skipped when payment type is android_pay or androidpay_recurring

Subscription Status

Active When the current time is between start and end time
Pending When the current time is less than start time
Expired When the current time is greater than end time
Cancelled When subscription is cancelled. The cancellation timestamp is stored in deleted_at field. A recurring subscription when cancelled, remains in active state till the end of duration.
In Grace Period When the current time is within the grace period duration. Grace period is applicable only on recurring subscriptions. Its the duration just after end time within which we expect user to be successfully charged. Subscription is active in this duration.

Subscription Types

standard When subscription is for a standard subscription plan
campaign When subscription is for a campaign subscription plan
dynamic_assets When subscription is for a Pay per asset pricing plan
group_access When subscription is a group subscriptions