Subscriptions

From SocialStack
Revision as of 14:22, 3 August 2022 by Luke (talk | contribs)

This article is part of a series on the payments module. Subscriptions are a mechanism for obtaining repeat payments on some well defined schedule, typically monthly. Subscriptions are capable of billing for any number of "product quantities" either ahead of usage or after it.

Gateways

Subscriptions support any payment gateway which permits tokenised payments. Currently the default implementation includes Stripe.

Schedule Frequencies

Subscriptions currently support 3 typical frequencies:

  • Monthly. This is triggered when the UTC month changes.
  • Quarterly. This is triggered when the UTC month divided by 4 changes.
  • Yearly. This is triggered when the UTC year changes.

Regardless of the selected frequency, the subscription module checks consistency daily. So if a payment window is skipped for whatever reason, be it because the server is offline at that point in time or the payment gateway is unavailable, the consistency check the following day will get everything back in line.

Failure modes

When a subscription payment fails, the subscription is marked as inactive immediately. Note that this failure exclusively originates from the user's card - if there is an internal failure with for example the connection to the gateway, this deactivation will not occur.