Get Stripe API Keys
If you plan on testing ProCourse Memberships with Stripe, make sure to set
View test data in the Stripe Dashboard to get your sandbox API keys.
- Sign into https://stripe.com/dashboard
- Under Developers > API Keys, find your Publishable key and Secret key.
Set up the Stripe Gateway
Configure the following settings under
memberships go live— Check this box only if you are ready to take payments. Requires Live API Publishable and Secret keys when checked.
memberships gateway— Set to
memberships stripe publishable key— Enter the sandbox/live Publishable key here.
memberships stripe secret key— Enter the sandbox/live Secret key here.
Configure Webhooks (Subscriptions Only)
If you plan on using recurring levels (subscriptions), you must configure a webhook endpoint to send notifications to your site in order for customers to receive receipts upon recurring transaction success or failure.
- Log into the Stripe Dashboard
- Under Developers > Webhooks, click Add endpoint
- Enter in the following URL:
https://<your Discourse site>/memberships/webhook/stripe
- Set the Filter event sector to Select types to send
- Check the following event types to send:
- Click Add endpoint
- Click on the newly created endpoint.
- Under Signing secret, obtain the webhook verification key and copy it to the
memberships stripe webhook secretsetting field under
Level creation under the Stripe gateway works as normal except in one instance.
When a level is set to recur, the plugin automatically creates the needed product and plan in Stripe. The first time the level is set to Enabled, the billing plan is activated via Stripe’s API.
At this time, Stripe does not allow changes to active billing plans via the API, therefore, once a recurring level is enabled, no further changes are allowed by the plugin. A new level needs to be created with the new settings instead. Levels can still be enabled/disabled and removed.