To connect Stripe to WPMarmite Pay, you need to follow 2 steps:
- Add Stripe API keys (test and production) ;
- Create a webhook and save your secret key.
You can then use Stripe products in WPMarmite Pay.
Add the API keys
To retrieve your API keys, click on these links:
- Secret API key: https://dashboard.stripe.com/apikeys
- Secret test API key: https://dashboard.stripe.com/test/apikeys
Now go to WordPress, then click on the “WPMarmite Pay” menu.
Copy/paste your Stripe keys into the appropriate fields:
- Stripe Test Secret API Key > Secret API Key
- Stripe Live Secret API Key > Secret API test key
Add the webhook
Next, add the webhook available on this page to the “Stripe Webhook Secret” field: https://dashboard.stripe.com/webhooks
To do this, click on the Add endpoint button. You will be taken to the following page:
In the URL field, enter the URL from the WPMarmite Pay settings (below the Save Changes button):
Then, select the following events:
checkout.session.completed
customer.subscription.created
customer.subscription.updated
Then click on Add endpoint.
Return to the webhooks page: https://dashboard.stripe.com/webhooks
Click on the newly created webhook, then on the Reveal link under Signing secret.
Copy the key and paste it into the WPMarmite Pay settings, then save the settings.
Congratulations, you’ve successfully configured WPMarmite Pay!