Integrations
Stripe
Set up the Stripe integration for payments
About Stripe
Stripe is one of the largest payment processors in the world, accepted in over 40 countries. The Stripe integration allows you to automate enrollments based on recurring or one-time payments.
Setting up the integration
1. Create the integration in XMembers
- Go to Integrations → New Integration
- Select Stripe as the platform
- Select the linked course
- Copy the generated webhook URL
2. Configure the webhook in Stripe
- Go to the Stripe Dashboard
- Navigate to Developers → Webhooks
- Click Add endpoint
- Paste the URL copied from XMembers
- Select the events you want to listen to:
checkout.session.completedcheckout.session.async_payment_succeededinvoice.paidcharge.refundedcustomer.subscription.deletedinvoice.payment_failed
3. Test the integration
Stripe allows you to send test webhooks. Use this feature to verify that the integration is working before going live.
Processed events
| Event | Action in XMembers |
|---|---|
checkout.session.completed | Creates the member and enrollment when a one-time payment is paid or free |
checkout.session.async_payment_succeeded | Creates the member and enrollment when a delayed payment (such as boleto) is confirmed |
invoice.paid | Creates the member and the subscription enrollment, valid until the end of the paid period |
charge.refunded | Cancels the enrollment on a full refund |
customer.subscription.deleted | Cancels the enrollment |
invoice.payment_failed | Logs the failure |