Stripe set-up
In order to receive subscription payments you need a Stripe account. Follow the steps below to integrate it with your service:
- Register or login to your Stripe dashboard
- Generate your Stripe secret key:
-
Go to Developers > API Keys
-
Click the Create secret key button and give it a name
-
Copy the generated key and store it in a secure location
-
Paste your Stripe secret key in the corresponding field of your service settings page
-
- Set up your Webhook:
-
Go to Developers > Webhooks.
-
Click the Add endpoint button
-
In the Endpoint URL field, put https://exampledomain.com/manage/payments/webhook.php Replacing exampledomain.com with your service actual domain.
-
Leave the Listen to events on Connected accounts checkbox Unchecked
-
Under Select events to listen to click Select events and add the following events (use the Search events.. field):
- customer.subscription.updated
- customer.subscription.deleted
- invoice.payment_failed
- invoice.paid
- checkout.session.completed
-
Click Add endpoint
-
Click Reveal under Signing secret and copy the resulting code
-
Paste the Signing secret code in the Stripe webhook secret field of your service settings page
-
- Set up your Products (subscriptions):
-
Go to Products
-
Click the Add product button
-
Name your product (for example Professional subscription)
-
Under Pricing details > Pricing model select Standard pricing
-
Under Price add a price of your choosing for your monthly subscription
-
Select Recurring
-
Under Billing period select Monthly
-
Click the Add another price button
-
Repeat steps d - f
-
Under Billing period select Yearly
-
Click Save product
-
Repeat steps b - k, (for your Basic subscription product)
-
After following the previous steps, you should have 2 products with 2 prices each (for monthly-yearly subscriptions). Click on each product and copy the Price ID codes for each price. Paste the codes (4 in total) in the corresponding field of your service settings page
-
Note: For testing purposes you can use Test mode data with your service. For testing, replace all codes with testing data:
- Stripe secret key
- Stripe webhook secret
- Stripe starter monthly / yearly ID
- Stripe Professional monthly / yearly ID
IMPORTANT For production environment all above fields must use Live data. Don’t mix live with testing codes!!
Click here for test mode information.