Skip to main content
EaseLMS integrates with leading payment gateways to help you monetize your courses with secure, reliable payment processing.

Supported payment gateways

Choose the payment gateway that works best for your audience and location:

Stripe

Global payment processing with support for credit cards, debit cards, and digital wallets in 135+ currencies.

Flutterwave

African-focused payment gateway supporting cards, mobile money, bank transfers, and USSD in 34+ African countries.

Setting up payments

Stripe setup

1

Create a Stripe account

Sign up at stripe.com and complete account verification.
2

Get API keys

From your Stripe dashboard:
  • Navigate to Developers → API keys
  • Copy your Publishable key
  • Copy your Secret key (keep this secure!)
3

Configure environment variables

Add these to your .env.local file:
STRIPE_SECRET_KEY=sk_test_...
NEXT_PUBLIC_STRIPE_PUBLISHABLE_KEY=pk_test_...
4

Test the integration

Create a test course with paid enrollment and use Stripe’s test card numbers to verify the integration.

Flutterwave setup

1

Create a Flutterwave account

Sign up at flutterwave.com and complete business verification.
2

Get API keys

From your Flutterwave dashboard:
  • Navigate to Settings → API
  • Copy your Public key
  • Copy your Secret key
3

Configure environment variables

Add these to your .env.local file:
FLUTTERWAVE_SECRET_KEY=FLWSECK_TEST-...
NEXT_PUBLIC_FLUTTERWAVE_PUBLIC_KEY=FLWPUBK_TEST-...
4

Test the integration

Use Flutterwave’s test mode to verify payments work correctly before going live.
Never commit API keys to version control. Always use environment variables and keep secret keys secure.

Currency support

EaseLMS supports multiple currencies based on your payment gateway:

Default currency

Set your platform’s default currency in Settings → Platform:
  • USD - US Dollar (recommended for Stripe, global audience)
  • NGN - Nigerian Naira (recommended for Flutterwave, African audience)

Per-course currency

While creating or editing a course, you can:
  • Use the platform default currency
  • Override with a specific currency for that course
  • Display prices in the selected currency
The default currency setting helps streamline course creation, but you have full flexibility to set different currencies for individual courses.

Payment flow

Understand how payments work from the learner’s perspective:
1

Select a paid course

Learner browses the course catalog and selects a course with paid enrollment.
2

View course details

The course page displays:
  • Course price in the configured currency
  • “Purchase Course” button
  • Payment gateway options (Stripe/Flutterwave)
3

Initiate payment

Learner clicks “Purchase Course” and selects their preferred payment method:Stripe checkout:
  • Credit/debit card payment
  • Secure hosted checkout page
  • Support for 3D Secure authentication
Flutterwave checkout:
  • Card payments
  • Mobile money (MTN, Airtel, etc.)
  • Bank transfer
  • USSD codes
4

Process payment

The payment gateway securely processes the transaction and returns the result to EaseLMS.
5

Confirm enrollment

On successful payment:
  • Learner automatically enrolled in the course
  • Payment confirmation email sent
  • Receipt generated
  • Immediate course access granted

Payment failure handling

If a payment fails:
  • Learner sees a clear error message
  • Payment failure email sent (if configured)
  • No enrollment created
  • Learner can retry payment
  • Admin notified of failed transaction

Payment webhooks

EaseLMS uses webhooks to receive real-time payment confirmations from payment gateways.

How webhooks work

  1. Payment processed - Gateway processes the payment
  2. Webhook sent - Gateway sends confirmation to your server
  3. Verification - EaseLMS verifies the webhook authenticity
  4. Enrollment created - System creates enrollment and sends notifications
  5. User notified - Learner receives confirmation email

Webhook endpoints

EaseLMS provides these webhook endpoints:
  • Stripe webhook: /api/webhooks/stripe
  • Flutterwave webhook: /api/webhooks/flutterwave
Webhooks ensure reliable payment processing even if the user closes their browser before the payment completes.

Transaction management

Track and manage all payment transactions from the admin dashboard.

Viewing purchases

Access purchase history in Admin → Purchases:
  • Transaction ID and reference
  • Learner name and email
  • Course purchased
  • Amount and currency
  • Payment gateway used
  • Transaction date and time
  • Payment status (success/failed)

Payment records

Each payment record includes:

Transaction details

Complete information about the payment including amount, currency, and gateway.

User information

Learner details including name, email, and enrollment date.

Course details

Course title, ID, and enrollment status.

Payment metadata

Transaction ID, payment method, and gateway-specific data.

Exporting data

Export payment data for accounting and reporting:
  • Download transaction history as CSV
  • Filter by date range, course, or payment gateway
  • Include metadata for reconciliation

Email notifications

Automatic email notifications keep everyone informed about transactions:

Learner emails

Payment confirmation
  • Sent immediately after successful payment
  • Includes transaction ID and amount
  • Course access link
  • Receipt/invoice
Payment failed
  • Sent when payment fails
  • Includes failure reason
  • Retry instructions

Admin emails

New payment notification
  • Sent when payment succeeds
  • Includes learner details
  • Transaction amount and ID
  • Link to admin dashboard
Configure email settings in Settings → Platform to control which notifications are sent.

Multi-currency handling

When working with multiple currencies:

Exchange rates

Optionally configure exchange rate API for currency conversion:
EXCHANGERATE_API_KEY=your_api_key
This enables:
  • Real-time currency conversion
  • Display prices in multiple currencies
  • Accurate reporting across currencies

Currency display

Courses display prices in their configured currency:
  • USD - $99.00
  • NGN - ₦35,000.00
The currency symbol and formatting adjust automatically.

Testing payments

Test mode

Both payment gateways offer test modes for safe testing: Stripe test cards:
Success: 4242 4242 4242 4242
3D Secure: 4000 0025 0000 3155
Declined: 4000 0000 0000 9995
Flutterwave test mode:
  • Use test API keys (starting with FLWSECK_TEST-)
  • Test cards provided in dashboard
  • Simulate different payment methods

Testing checklist

1

Successful payment

Test that successful payments create enrollments and send confirmation emails.
2

Failed payment

Test that failed payments don’t create enrollments and show error messages.
3

Webhook delivery

Verify webhooks are received and processed correctly.
4

Email notifications

Confirm all payment emails are sent with correct information.

Production checklist

Before going live with payments:
  • Switch to production API keys (remove _TEST keys)
  • Enable webhook endpoints in gateway dashboards
  • Test production payment with real card
  • Verify SSL certificate is active on your domain
  • Configure payout settings in gateway dashboard
  • Set up business verification with payment gateway
  • Test refund process (if applicable)
  • Review and comply with payment gateway terms
Always test payments thoroughly in test mode before switching to production keys.

Security best practices

API key management

  • Never expose secret keys - Keep them in server-side environment variables only
  • Rotate keys regularly - Update keys periodically for security
  • Use separate keys - Different keys for test/production environments
  • Restrict key permissions - Use minimum required permissions

PCI compliance

EaseLMS is designed to minimize PCI compliance requirements:
  • Card data never touches your servers
  • Payment forms hosted by gateways
  • Secure redirects for checkout
  • No card storage on your platform

Webhook security

Protect webhook endpoints:
  • Verify webhook signatures
  • Use HTTPS for webhook URLs
  • Validate payment amounts
  • Check transaction uniqueness
EaseLMS automatically handles webhook signature verification to prevent fraudulent payment confirmations.