Log in to Stripe and navigate to Developers to generate your API keys. For this integration, you will need the following credentials:
- Secret Key
- Publishable Key
- Webhook Secret
In Open LMS, go to:
Site Administration → Plugins → Local → Commerce → Stripe payment provider
On this page, enter your Stripe credentials and configure key settings for the integration, such as the currencies you want to support.
You will also need to configure a webhook in Stripe. The endpoint URL should follow this format:
https://your-site-url/local/commerce/provider/stripecheckout/handlers/incominghooks.php
When creating the webhook, select the following events (covering checkout and invoice updates):
- checkout.session.async_payment_failed
- checkout.session.async_payment_succeeded
- checkout.session.completed
- checkout.session.expired
- invoice.created
- invoice.deleted
- invoice.finalization_failed
- invoice.finalized
- invoice.marked_uncollectible
- invoice.paid
- invoice.payment_action_required
- invoice.payment_failed
- invoice.payment_succeeded
- invoice.sent
- invoice.upcoming
- invoice.updated
- invoice.voided
After creating the webhook, reveal the signing secret in Stripe. Copy this value and paste it into the Webhook secret field in your Open LMS configuration page.
Once your Stripe account is configured in Open LMS and at least one currency is enabled, you can proceed to create your benefits and products.