Payment Gateways
Free & ProLearnomy supports three real-money payment gateways: Stripe, PayPal, and WooCommerce. Each one handles the money collection independently; Learnomy handles enrolment, subscription creation, and commission calculation the same way regardless of which gateway the customer used.
You can also enable a Test Gateway for development and QA work.
Overview
Go to Learnomy Settings > Payments to configure gateways. Each gateway has its own settings card. Enable as many as you want; the checkout page will show all enabled gateways to the student.
The Payments tab also contains Checkout settings (business name, refund policy, guarantee days).
Stripe
Stripe processes credit and debit card payments for one-time purchases and recurring membership subscriptions.
Enable Stripe
Check Enable Stripe to activate the gateway. Uncheck to disable Stripe entirely even if API keys are saved.
Mode
Choose Test or Live. The mode toggle switches which set of credentials the gateway reads. Test mode uses Stripe test API keys and does not charge real cards. Live mode charges real cards.
A badge at the top of the Stripe card shows the current mode (TEST MODE or LIVE MODE).
Webhook URL
Copy the webhook URL shown in the settings card and add it to your Stripe account.
- In Stripe Dashboard, go to Developers > Webhooks > Add endpoint.
- Paste the Learnomy webhook URL.
- Subscribe to these events:
checkout.session.completed,invoice.payment_succeeded,invoice.payment_failed,customer.subscription.deleted,customer.subscription.updated. - Copy the Signing secret from the created endpoint and paste it into the Webhook Signing Secret field in Learnomy.
Test credentials
- Test Publishable Key - starts with
pk_test_. Enter it in plain text; it is not a secret. - Test Secret Key - starts with
sk_test_. Stored encrypted. Leave blank to keep the saved value; the field shows bullet characters when a key is already saved. - Test Webhook Signing Secret - starts with
whsec_. Stored encrypted.
Live credentials
The same three fields for the live environment (pk_live_..., sk_live_..., whsec_...).
Testing the connection
Click Test Stripe Connection after saving credentials. The button sends a test API call and returns a pass or fail message without creating any charge.
Membership plan setup
For each membership plan that bills through Stripe, you need to create a recurring Price in Stripe Dashboard and copy its Price ID into the plan editor.
- In Stripe Dashboard, go to Products > Add product and create a product.
- Under Pricing, add a recurring price with the same interval as your plan.
- Copy the API ID (starts with
price_for live,price_test_for test). - In Learnomy, go to Commerce > Memberships, edit the plan, open the Payment Provider Mapping accordion, and paste the Price ID into the correct field (Stripe Test Price ID or Stripe Live Price ID).
For one-time course purchases, no Stripe product setup is required. Learnomy creates a checkout session at the time of purchase with the exact course price.
PayPal
PayPal handles one-time course purchases and recurring membership subscriptions via its REST API.
Enable PayPal
Check Enable PayPal to activate the gateway. Requires both a Client ID and Secret to be configured.
Mode
Choose Sandbox or Live. Sandbox uses PayPal Developer test accounts. Live charges real PayPal balances.
Webhook URL
Copy the webhook URL and register it in the PayPal Developer Dashboard.
- Go to PayPal Developer > My Apps > your app > Webhooks > Add webhook.
- Paste the Learnomy webhook URL.
- Subscribe to the events you need:
CHECKOUT.ORDER.APPROVED,PAYMENT.SALE.COMPLETED,BILLING.SUBSCRIPTION.ACTIVATED,BILLING.SUBSCRIPTION.CANCELLED,BILLING.SUBSCRIPTION.UPDATED. - Copy the Webhook ID from the created webhook entry (a string like
1AB23456CD789012E) and paste it into the Webhook ID field in Learnomy.
Sandbox credentials
- Sandbox Client ID - from PayPal Developer Dashboard under your app credentials.
- Sandbox Secret - stored encrypted. Leave blank to keep the saved value.
- Sandbox Webhook ID - the webhook ID from the PayPal sandbox webhook you created.
Live credentials
The same three fields for the live environment.
Testing the connection
Click Test PayPal Connection after saving credentials. Returns a pass or fail without creating a charge.
Membership plan setup
PayPal subscriptions require a Billing Plan created in your PayPal account.
- In PayPal Developer, go to Subscriptions > Plans > Create plan.
- Set the billing cycle to match your Learnomy plan interval and price.
- Activate the plan and copy its Plan ID (starts with
P-). - In Learnomy, edit the membership plan, open Payment Provider Mapping, and paste the Plan ID into PayPal Sandbox Plan ID or PayPal Live Plan ID.
WooCommerce
WooCommerce can act as the payment gateway for every Learnomy purchase type: single course, membership plan, space, space seat, gift, and learning path.
WooCommerce only collects the money. Learnomy handles enrolment, subscription, and commission the same way it does for Stripe and PayPal.
How it works
When a student checks out with WooCommerce:
- Learnomy adds one hidden virtual product ("Learnomy Checkout Item") to the WooCommerce cart and sets the line price to the exact amount (already adjusted for any sale or coupon).
- The student is redirected to the standard WooCommerce checkout page.
- The student pays using whatever payment method WooCommerce has configured (any WooCommerce payment plugin works).
- When the order reaches "processing" or "completed" status, Learnomy's adapter reads the purchase payload from the order, records a transaction, fires the standard enrolment or subscription actions, and calculates instructor commission.
For one-time purchases, Learnomy uses one reusable hidden virtual product across all purchase types. Recurring membership billing (when WooCommerce Subscriptions is active) uses a small set of period-keyed subscription products, one per billing interval (for example, monthly and yearly), with the price still set dynamically at checkout. Learnomy does not create a separate WooCommerce product per course or membership plan.
Prerequisites
- WooCommerce must be installed and active.
- The WooCommerce Checkout page must use the classic shortcode (
[woocommerce_checkout]), not the block-based checkout. The block checkout does not support third-party payment gateways that operate outside the Store API. - The WooCommerce Cart page must also use the classic shortcode (
[woocommerce_cart]). - If WooCommerce has "Coming soon" store mode enabled, disable it (set WooCommerce > Settings > General > Store notice off or use the
woocommerce_coming_soon=nooption). Coming-soon mode blocks the cart and checkout.
Enabling WooCommerce
- Install and activate WooCommerce.
- In Learnomy, go to Learnomy Settings > Payments.
- Check Enable WooCommerce and save.
WooCommerce now appears as a gateway option at checkout alongside Stripe and PayPal.
No API keys or per-plan mapping is required. WooCommerce uses its own installed payment methods (card, PayPal, bank transfer, etc.) for the actual charge.
Recurring subscriptions via WooCommerce Subscriptions (Pro feature)
๐ถ Pro feature. Recurring membership billing through WooCommerce Subscriptions is available in Learnomy Pro.
When the WooCommerce Subscriptions extension is active, recurring membership plans are supported. Learnomy creates a period-keyed subscription product per billing interval (e.g. one for monthly, one for yearly) and sets the recurring price dynamically at checkout. No per-plan subscription products are needed.
Lifecycle events (cancellation, expiry, payment failure, reactivation) from WooCommerce Subscriptions are mapped back to the corresponding Subscription_Service methods in Learnomy, so the subscription status in Commerce > Subscriptions stays in sync.
Commission with WooCommerce
Instructor commission works exactly as with Stripe and PayPal. When the WooCommerce order completes, Learnomy fires learnomy_payment_completed and the commission service calculates the platform and instructor split using the same rules (per-course rate, per-instructor rate, or the default 30% platform / 70% instructor). The commission rows appear on the transaction detail page.
Test Gateway
The Test Gateway completes any checkout instantly without calling an external service. It records a completed transaction and triggers all the same fulfilment actions as a real gateway.
Enable it at Learnomy Settings > Payments > Test Gateway. Turn it off before going live. It is intended for development and QA only.
Checkout and Refund Policy settings
Below the gateway cards, the Checkout settings card contains:
- Business Name - shown on receipt PDFs and invoice emails. Defaults to the site title.
- Money-Back Guarantee - the number of guarantee days shown on course pages and at checkout. Set to 0 to hide it.
- Refund Policy - plain-text refund policy shown at checkout and on receipts.
Tips
- You can run Stripe in Test mode and PayPal in Live mode at the same time. Each gateway uses its own mode setting.
- Stripe and PayPal secret keys are stored encrypted in the database using WordPress's
AUTH_KEY. They are never sent back to the browser. - If a student's checkout redirects to WooCommerce but the cart looks empty, the most common cause is that WooCommerce's "Coming soon" store mode is active.
- For WooCommerce refunds, go to the WooCommerce order (find the order ID in the transaction's gateway reference) and use WooCommerce's own Refund button. Learnomy detects the refund via webhook and creates the corresponding refund transaction row automatically.
- The test gateway is detected by Learnomy's onboarding check as "not a real gateway". If you see a warning about no payment gateway being configured, it means only the test gateway is active.