How Shopify sales of Open edX courses enroll buyers
A team that wants to sell Open edX courses from a Shopify store needs every paid order to create a learner enrollment without staff touching it. The supported method in the Open edX documentation for this is the Open edX Webhook Receiver, a small Django app that turns incoming webhooks into Open edX REST API calls. It supports Shopify and WooCommerce as of Sumac, and it sits between the store and the LMS. When an order completes, Shopify sends a webhook to the receiver, the receiver reads the order, and it calls the LMS to enroll the buyer in the course tied to the purchased product. The receiver is the only component that talks to both sides, so it is where most of the design work lives.
Everything before the webhook stays outside Open edX. The Shopify storefront, product pages, checkout, tax handling, refunds and payment processing all remain in Shopify and its payment providers, and the LMS never sees card data. Your responsibilities are the product-to-course mapping, the service account the receiver uses to call the LMS, and the handling of failed deliveries. Confirm with your Shopify plan and the receiver release you intend to run how webhooks are signed and retried, and decide what happens when a buyer's email does not match an existing LMS account. The Adding ECommerce to Open edX page is the natural next read for the receiver's configuration and its current support list.
What you need before connecting Shopify to Open edX
The receiver sits between Shopify and Open edX, so the connection only works when both platforms are ready and the mapping data exists. Check each component below before writing any webhook code, because a gap in one card usually shows up as a failed enrollment later.
Running Open edX with LMS and Studio
The receiver calls the LMS REST APIs to enroll learners, so the LMS must be up and reachable from the receiver. Studio is needed to author and publish the courses being sold. Confirm the deployment is a working site, not a test instance you plan to rebuild. The named release in use decides compatibility: Verawood is the current named release, and the receiver's compatibility with it should be confirmed against the receiver's own requirements in the Open edX docs before go-live.
Receiver docsShopify store with webhook access
Someone must hold a Shopify account with permission to create and manage webhook subscriptions for order completion events. Confirm which store admin role has that permission and who will own the subscription after launch. If you sell through WooCommerce instead, the same receiver applies, but the webhook settings live in WordPress. Record which store is the source of truth for orders so that refunds and test orders are handled from one place.
Open edX service account for enrollment
Create a dedicated service account in the LMS for the receiver rather than reusing a staff login. Grant it only the rights needed to enroll users through the REST APIs, and record who can rotate its credentials. Because the account can enroll users in paid courses, treat its password or token like any other production secret. Keep its audit trail separate so that enrollments made by the receiver can be traced apart from manual changes by course staff.
Reachable HTTPS endpoint for the receiver
Shopify sends order events to a public HTTPS address, so the receiver needs a hostname, a valid certificate and a route through your proxy and firewall. Confirm that inbound traffic from Shopify reaches the receiver while the receiver can still call the LMS internally. Decide where the endpoint runs, such as the same cluster as the LMS or a separate service, and who monitors it. Verify that the endpoint rejects requests without a valid webhook signature.
Published courses with matching run identifiers
The mapping between a product and an Open edX course run must be exact. Each course you sell needs a published run in Studio with a known course key, and the product SKU or variant in Shopify must map to that key. Check that every run is open for enrollment and that enrollment dates match what you sell. Runs created later will need a new mapping entry, so list them before launch and assign an owner for keeping the table current.
Test orders and a staging path
Plan a non-production environment with its own Shopify development store and Open edX instance where test orders can create enrollments without touching real learners. Agree on how test purchases are refunded or reversed in both systems. Ask the implementation partner or your own team to confirm the steps for rolling back an enrollment, since the receiver's behavior on refunds and cancellations should be verified rather than assumed.
How an order becomes an enrollment
The flow starts when a buyer completes checkout in Shopify, which sends an order webhook to the Webhook Receiver on a public address. The receiver sits in its own network zone, verifies that the request is authentic, and translates the order into calls to the Open edX REST APIs. The LMS network accepts only those authenticated calls, and the LMS writes the enrollment to its database. Check each arrow that crosses a boundary, because that is where credentials and request validation matter most.
Order flow across the internet, receiver and LMS network boundaries.
Configuring the receiver and the Shopify webhook in sequence
This sequence connects a paid Shopify order to a single Open edX enrollment, with each step confirmed by a check before the next one starts. The order matters because the webhook should not go live until the receiver can authenticate, map products and write enrollments.
Deploy the receiver beside the LMS
The platform team deploys the Webhook Receiver as a small Django app in the same infrastructure as the LMS, so it can reach the LMS REST API on the internal network and expose only the webhook endpoint to Shopify. Confirm the hostname, TLS certificate and firewall rules with your security team before you expose anything to the internet. The step is done when the receiver's health endpoint responds over HTTPS from outside your network and the LMS API is reachable from the receiver's host only. Check the receiver's own documentation for the exact configuration keys and install method for your release.
Create the service account and scope its permissions
Create a dedicated LMS service account for the receiver, not a staff user who signs in to Studio or the LMS. Grant it only the roles needed to look up learners by email and create enrollments in the course runs you sell, and confirm the exact permissions against the receiver documentation and your own role model. Record who approved the account and what it can change. The step is done when a test API call made with the account's credentials can enroll a sandbox learner in a sandbox course run and is refused for a course run outside the catalog you set up.
Store credentials and the webhook secret outside source control
Put the API token, the service account identifier and the Shopify webhook signing secret into your secrets manager or the deployment's secret store, and inject them into the receiver at runtime. Keep them out of Git repositories, Tutor configuration files committed to version control, container images and chat tools. Rotate the webhook secret when someone with access leaves. The step is done when a scan of your repositories and images finds none of these values and the receiver starts with them loaded from the secret store.
Map Shopify products to course runs
Build a mapping table that links each Shopify product or variant SKU to one Open edX course run identifier, with the owner who maintains it. Include a rule for what happens when a product has no mapping, which should be a logged failure that someone reviews, not a silent skip. Agree with the course team which run a buyer receives when a course has several open runs. The step is done when every product you plan to sell has exactly one mapped course run, and a review of the table shows no unmapped SKUs in the storefront.
Register the order-completed webhook in Shopify
In the staging store, register a webhook for the order-completed event that points to the receiver's endpoint, and configure it with the signing secret stored in the previous step. Confirm the event topic name and the payload format in Shopify's current webhook documentation before you rely on them. Do not register the same webhook in production until the staging test in the next step passes. The step is done when Shopify lists the webhook as active against the staging store and a manual test delivery reaches the receiver with a valid signature.
Run a test order in a staging store
Place a test order in the staging store for a product mapped to a sandbox course run, using a learner account created for testing. Watch the receiver logs for the incoming payload, the signature check, the lookup of the learner by email, and the enrollment call to the LMS API. A passing test produces exactly one enrollment in the sandbox run and one logged API response with a success status. Repeat with a refunded or cancelled order and a duplicate delivery to confirm the receiver does not create a second enrollment. The step is done when all three cases behave as expected and the results are saved with the change record.
Enable the production webhook after sign-off
Once the staging tests pass, the owners of the storefront, the LMS and the receiver sign off in writing, then register the same webhook on the production store with production credentials. Place one low-value real order or use a controlled purchase, confirm one enrollment in the live run, and check the logs for an unchanged signature result and a success response. Set an alert for failed deliveries and failed API calls so the team hears about them before buyers do. The step is done when the first live order produces one enrollment, the logs match the staging results and the alert is tested.
How order fields map to learner and enrollment records
This table compares each Shopify order field the Webhook Receiver reads with the Open edX record it affects, so you can see where an order turns into an account, a course run enrollment and a support reference. Use it as a checklist to confirm against the receiver documentation before you write any mapping code, because field names and endpoints can change between releases.
| Order field | Open edX record affected | What to confirm before building |
|---|---|---|
| Buyer email | User account (matched or created by email) | Whether the receiver matches existing accounts by email, and how it handles an email that already belongs to a staff user |
| Product or variant identifier | Course run, selected through a mapping you maintain | Which Shopify product or variant ID the receiver expects, and whether one variant can map to several course runs |
| Order identifier | Order reference kept for support (stored with the enrollment or in your own log) | Where the order ID is saved on the Open edX side and whether it is searchable by your support team |
| Order status (for example paid or refunded) | Enrollment created or left unchanged | Which status values trigger enrollment and which trigger unenrollment or no action |
| Quantity | Number of enrollments or seats, if your product allows multiple buyers | Whether the receiver supports quantity above one, or whether each seat needs a separate order |
| Enrollment mode (audit or verified) | Enrollment mode on the course run | Which mode your product maps to, and whether a verified mode requires an ID verification step your policy allows |
| Exact REST endpoints | Account, enrollment and course run API calls used by the receiver | The endpoint paths and required permissions for the service account, taken from the receiver documentation for your release |
What you lose compared with the archived e-commerce service
The archived e-commerce service kept the catalog, basket, checkout and order records inside Open edX, so an order and its enrollment lived in one system. A Shopify setup moves selling, tax calculation, refunds, invoices and customer receipts into Shopify, and the LMS only receives the outcome through the Webhook Receiver. That split means the order record and the enrollment record no longer share a database, and every gap between them is a design task for your team.
Refund and cancellation handling is the first gap. Shopify decides when a refund is issued, but the receiver only knows what it is told to do with an order event, so a refund that does not remove the learner's enrollment will leave paid-for access in place. Decide which Shopify events should unenroll a learner, whether partial refunds matter for course access, and how a chargeback is handled. Confirm in the receiver's current documentation which events it handles and test each refund path on a staging LMS before launch, rather than assuming the archived service's behavior carries over.
Reconciling orders with enrollments is the second gap. The receiver calls Open edX REST APIs to enroll buyers, so failed calls, duplicate webhook deliveries and orders placed by learners who already have an account must each produce a predictable result. Store the Shopify order identifier alongside each enrollment, and run a scheduled comparison of paid orders against active enrollments. Where order history lives is the third gap: buyers will look for past purchases in Shopify, staff will look for them in the LMS, and no single view covers both unless you build it. Confirm each of these capabilities against the current docs and your own test orders instead of assuming parity.
Securing the webhook path from Shopify to the LMS
Every completed order sends buyer data from the storefront through the Webhook Receiver into the LMS enrollment API. Each control below sits on one boundary of that path, so a gap at any hop can expose buyer records or let a forged request enroll someone. Treat this path as personal data processing and include it in the privacy review.
Verify the signature on every request
Shopify signs each webhook with a shared secret, and the receiver must recompute that signature from the raw request body and reject any mismatch before parsing the payload. Check that the receiver rejects requests with no signature header, not only bad ones. Also confirm that the body is hashed before any framework middleware modifies it. A forged request that passes this check could enroll arbitrary accounts, so test it with a deliberately wrong signature during acceptance.
Webhook Receiver docsServe the endpoint only over HTTPS
The receiver's public URL is the boundary between the storefront and your infrastructure, so it must accept connections over TLS only and redirect or refuse plain HTTP. Confirm that the certificate chain is valid and renews automatically, and that the webhook URL configured in Shopify uses https. Plain HTTP would expose order payloads and buyer names and emails to anyone on the network path. Ask your proxy team to confirm that HTTP to HTTPS redirects do not drop the request body.
Limit the service account to enrollment rights
The receiver calls Open edX REST APIs with a service account, and that account's permissions define what a compromised receiver can do. Grant only the API scopes needed to create enrollments for the products sold, and keep it off staff and admin roles. Review the account's rights against the actual calls the receiver makes, and rotate its credentials on a schedule you document. Ask your LMS team to confirm which endpoints the account can reach.
Hold secrets in a managed store
The Shopify webhook secret and the service account token should live in a managed secret store, such as one your platform team already operates, and never in source control, container images or plain environment files committed to a repository. Restrict read access to the receiver's runtime identity, and log every read. Plan rotation for both secrets, because a rotated Shopify secret that the receiver still holds will cause every order to fail verification.
Log order identifiers, not buyer records
Logs help you trace a failed enrollment, but they should record the order number, the Shopify event ID, the product mapped and the outcome, not the buyer's name, email, address or payment details. Check the receiver's logging configuration and any framework debug output, since a verbose error page can echo the full payload. Set a retention period for these logs that your privacy review approves, and confirm who can read them.
Restrict network access to the LMS
Only the receiver should reach the LMS API, and the LMS should accept those calls only from the receiver's network address or private subnet. Block the receiver from reaching other internal systems it does not need. Document the allowed flows in a diagram, so the boundary between the public storefront, the receiver and the LMS is visible to auditors. Ask your network team to test that a host outside this path cannot call the enrollment endpoints.
Why enrollments fail after an order completes
This table lists the failures most likely to stop a paid Shopify or WooCommerce order from becoming an Open edX enrollment, with the likely cause, the log evidence to check and the fix for each. Read it when a buyer has paid but has no course access, and work down the rows in the order the receiver processes an event.
| Failure | Likely cause | How to confirm in logs | Fix |
|---|---|---|---|
| Webhook signature rejected | The shared secret in the Shopify or WooCommerce webhook settings does not match the receiver's configured secret, or the request body was altered by a proxy before it reached the receiver. | The receiver logs an authentication or signature error for the request, and the store's webhook delivery log shows a failed response code for the same order. | Copy the secret again into both systems, confirm the receiver reads the raw request body, and check that any reverse proxy passes headers and body unchanged. |
| Buyer email has no matching Open edX account | The buyer checked out with an email address that has no LMS account, or the account uses a different address from the store order. | The receiver logs a user lookup that returned no result for the order email, and no enrollment call follows it. | Decide in advance whether buyers must create an account first or whether the receiver creates one. Confirm the matching rule and tell buyers which address to use at checkout. |
| Product not mapped to a course run | The Shopify product or WooCommerce SKU has no mapping to an Open edX course run identifier, or the mapping uses an old or misspelled run key. | The receiver logs that no course run was found for the product identifier in the order line item. | Maintain one mapping table that lists each product identifier and its course run key, and check it before each new course run opens. |
| Duplicate deliveries create repeated enrollment attempts | Shopify and WooCommerce can resend a webhook when they do not receive a timely success response, so the same order arrives more than once. | Several log entries share one order identifier, and the second or later attempts report that the learner is already enrolled or return an error. | Make enrollment idempotent by checking the order identifier before calling the enrollment API, and return a success response quickly so the sender does not retry. |
| Service account lacks permission | The account the receiver uses to call the REST APIs is missing the staff or enrollment permissions needed for the target course run, or its token has expired. | The receiver logs an authorization or forbidden response from the enrollment endpoint, while the signature and lookup steps succeed. | Grant the service account the permissions the enrollment call needs, rotate its credentials on a schedule, and test one enrollment in a staging LMS before each course launch. |
| Receiver version does not match the platform release | The receiver release was built for a different Open edX release, so an API path, field name or response format has changed since it was written. | The receiver logs an unexpected status code, a missing field or a schema error from an endpoint the platform changed. Compare the running platform release with the receiver's documented compatibility. | Confirm the receiver supports your named Open edX release before upgrading either side, and upgrade the receiver and platform together with a staging test of one full order. |
Questions buyers ask before connecting Shopify to Open edX
What does it cost to connect Shopify to Open edX, and which parts are one-time?
The cost is set by the written scope, not by a list price, because DeployOpen does not publish one. Most of the spend is one-time: scoping the product-to-course mapping, configuring the Webhook Receiver, wiring the Open edX REST API calls, and testing purchases end to end. Recurring costs sit mainly in hosting the receiver, keeping the Open edX platform upgraded, and monitoring webhook failures. Ask for the quote to split one-time build from any ongoing support or retainer, and to list which recurring items the client pays directly to cloud or Shopify providers.
How long does a Shopify to Open edX integration take?
Duration depends on how much needs to be decided before any code is written. The main drivers are the number of products that map to course runs or enrollment modes, how refunds and cancellations should revoke access, whether buyers sign in through an existing identity provider, and how many test orders your staff can run. A narrow setup with one course and a single product usually moves faster than a catalog with bundles and multiple currencies. Ask for a timeline tied to named milestones in the written scope.
What must our team provide before the work starts?
Plan to supply four things: administrative access to the Shopify store and its webhook settings, a written course structure that lists each course run and its enrollment rules, a dedicated Open edX service account with only the API permissions the receiver needs, and staff who can place and refund test orders during acceptance testing. Also confirm which identity method buyers use to sign in, since that affects how an enrollment is matched to a learner account. Missing any of these usually delays the build more than the code itself.
Can an internal developer build this integration alone?
A developer who already runs Open edX with Tutor and knows Django and the Open edX REST APIs can build a basic receiver, provided they have time to test webhook signatures, retries and duplicate deliveries. The harder parts are often operational: deciding how refunds revoke access, handling orders that arrive before a learner account exists, and keeping the receiver current through platform upgrades. If your team lacks one of these skills or cannot staff acceptance testing, a partner may be the faster route. Compare both options against the same written scope.
What drives the effort up or down in this integration?
Effort rises with the number of products and variants, the number of course runs they map to, refund and partial-refund rules, subscription or bundle logic, and the identity setup for matching buyers to accounts. Each added product, currency, or exception path adds test cases. Effort falls when the catalog is small, every product maps to one enrollment, and buyers create accounts in the same flow as checkout. Ask the vendor to show which cases are in scope and which are excluded.
How does a fixed-scope quote follow from the written scope?
DeployOpen agrees scope, deliverables and timelines in writing before work starts, and the quote is built from that document. Ask for the scope to list each product-to-course mapping, each webhook event handled (such as order completion and refund), the Open edX API calls made for each event, the test cases and acceptance criteria, and what is excluded. Any change to the scope should be handled through a written change request that updates the quote. This keeps the price tied to the work you actually agreed to.
What do we lose compared with the archived e-commerce service?
The Webhook Receiver is a small Django app that turns incoming webhooks into Open edX REST API calls and supports WooCommerce and Shopify. It does not replicate every feature of the archived e-commerce service, so check your current order flow against it. Confirm in writing how coupons, taxes, invoices, multi-currency pricing and refund workflows will be handled, because some may move to the store platform or to manual steps. The Open edX e-commerce documentation is the right place to confirm current options before you commit.
Who is responsible for security and data handling in this setup?
Your organization stays responsible for the platform, the store, and the data they hold. The receiver must verify that webhooks come from Shopify, store API credentials outside the code, limit the service account's permissions, and log enrollments without exposing payment data. Decide which buyer fields the receiver needs, since it rarely needs payment details at all. DeployOpen can test the receiver and review these controls as part of scoped security work, but it does not issue audit reports or certifications.
How DeployOpen scopes and delivers the Shopify integration
DeployOpen plans, implements, integrates, hardens, documents and supports self-hosted open-source platforms inside your own infrastructure. For selling Open edX courses through Shopify, we start from the order flow and your Open edX environment, agree the work in writing, and hand over a receiver you can operate and review.
How we scope
- Map which Shopify product types, variants and order states should trigger enrollment in a given Open edX course run
- Confirm the Open edX release and hosting setup, since the receiver's behavior depends on the REST APIs available in your environment
- Agree in writing how refunds, cancellations and failed enrollments are handled before any build starts
- Engagements are fixed-scope, with deliverables and timelines set out in the written scope before work begins
How we build
- Deploy and configure the Open edX Webhook Receiver in infrastructure you control, with secrets kept out of the codebase
- Verify Shopify webhook signatures and reject unsigned or replayed requests before any Open edX API call is made
- Test paid, refunded and duplicate-order scenarios in a staging environment that mirrors your production Open edX setup
- Document the order-to-enrollment mapping, the API calls made and the logs your support team will read
How we hand over
- Deliver a runbook covering configuration keys, credential rotation, deployment steps and rollback procedures
- Walk your operations and course team through how to find and resolve a failed enrollment from the logs
- Provide a list of what the receiver does not cover compared with the archived e-commerce service, so the gaps are known before launch
- Hand over source, configuration and test evidence in a form your own engineers can review and maintain
How we support
- Offer ongoing support, upgrades and continuous testing as a retainer, so changes in Shopify or Open edX are handled on a schedule
- Retest the integration after each Open edX upgrade or Shopify app change before it reaches learners
- Confirm with your team which costs are one-time build work and which recur under a support retainer when you request a quote

