Creating Point Subscriptions
As of version 2.0, the plugin has built-in support for subscriptions. Let your users signup for a subscription where they get points automatically. Users can cancel or switch to other subscription plans at any time.
The subscription module will payout the points associated with the subscription plan when a users card is charged. When a user signs up for a subscription plan for the first time, their card will be charged which in turn will trigger a payout.
However if a user changes subscription from one active subscription to another, the point amount is not paid out until his card is charged. In certain cases, Stripe will not charge a card after an upgrade until the users current subscription has run out. This means that no payout will occur until the charge is made!
If you set a trial period for a subscription plan, the users card will not be charged until that trial period has expired. This means that a user will not receive their points until the trial period has ended!
Just like the Stripe gateways, the Stripe Subscriptions settings allows you to set the short description, credit card statement etc. You are also required to setup how the Checkout popup window should look along with what labels should be used.
Just like when we sell points, your popup window settings can always be overridden when you use the mycred_stripe_subscription shortcode.
In order for this gateway to work, we need to setup a Stripe Webhook. This webhook will inform our website when a subscription is renewed or cancelled which will allow us to payout points or take the appropriate action.
Simply create a new webhook and enter the URL shown to you in your Stripe settings on your website and select “Send me all events”.