Back to BlogCourse apps

Sell Courses in WooCommerce, Unlock Them in Your App

Keep selling in WooCommerce and let paid orders unlock courses in your iPhone and Android app. Order statuses, refunds, and Apple and Google rules.

Vaclav Skarka12 min read
In this guide

Short answer: Yes, usually. You keep selling in your WooCommerce shop, and each paid order unlocks the right course or membership in your own app; a refund can remove it the same way. The limits come from Apple and Google, not from WooCommerce: on iPhone, Apple usually expects the same courses to be for sale as in-app purchases too, and both stores restrict links from the app to your checkout, with exceptions by country (as of November 2026).

How it works: when an order changes, the shop sends a webhook (an automatic message from one system to another) to your backend (the server and database behind your app), which checks the order is paid and gives the buyer's app account what they bought.

Your shop already holds your products, prices, coupons and customer history; rebuilding that inside an app splits your sales in two. As the owner, you decide four things: which product unlocks which course, what a refund does to access, whether a member keeps access while a failed card payment is retried, and whether past buyers get the courses you add to a bundle later. The first section below covers what Apple and Google allow. The sections after it are mostly for whoever builds your backend: they cover the cases that go wrong, such as a pending payment, a message that arrives twice, a refund for one course in a bundle, and a buyer who signs in to the app with another email.

I built this for ProFinity, a learning app for aesthetics clinicians on iPhone, Android and the web. Since April 2026, a purchase in its WooCommerce shop unlocks the right course or membership in the app. The team maps products to courses itself, with a history of every change, and buyers claim a purchase with a link and a six-digit code sent by email.

Selling in WooCommerce already? Tell me what you sell and whether your app exists yet. I reply with how I would connect the two and which store rules apply to your app. I build the app as well.

Can my app unlock what people bought in my WooCommerce shop?

Usually, yes. On Android, an app that sells nothing inside it, doesn't send users to your checkout and lets buyers sign in to what they bought in your shop fits Google's consumption-only description. On iPhone, Apple expects the same content to also be for sale as an in-app purchase unless an exception fits, and outside the United States storefront the app may not point users to your shop unless Apple grants an entitlement (3.1.3, 3.1.1(a)); the EU has its own terms, below. These details are as of November 2026 and are not legal advice.

The rules in the stores' own words, the exceptions and the EU terms are in Can an App Unlock Courses Bought on Your Website?.

Which WooCommerce order statuses mean the customer has paid?

Processing and Completed mean the customer has paid, so both grant access; Pending payment, On hold and Draft mean wait; Failed, Cancelled and Refunded mean no access (order status guide).

StatusWhat it meansAccess
Processing"Payment has been received (paid)"Grant
Completed"fulfilled and is complete"Grant
Pending payment"no payment has been made"Wait
On hold"awaiting payment confirmation"Wait
DraftCheckout not yet submittedWait
Failed, Cancelled, RefundedNot paid, or no longer paidNone, or remove

WooCommerce says all orders need processing "except those in which all products are both virtual and downloadable", so a paid course order may sit at Processing or Completed.

Setting an order to Cancelled or Refunded "will not automatically refund your customer" (refund guide): removing access and returning money are separate actions.

Should I use webhooks or poll the WooCommerce REST API?

This section and the next are for whoever builds your backend. Your decisions come back under refunds, renewals and trials.

Use both: webhooks for speed, a scheduled check for completeness.

Create a WooCommerce webhook for each of the order.created and order.updated topics. The REST API docs say delivery is processed in the background, so show "setting up your access" in the app right after checkout, not an error.

Webhooks can be missed. WooCommerce "automatically disables a webhook after more than five consecutive delivery failures", and a failure is any response other than 2xx, 301 or 302 (webhook guide). Its docs describe no retry schedule, so add a scheduled job that asks the REST API (the shop's interface for other software) for orders changed since its last run (modified_after). Run them through the same code, and alert someone when a webhook's status shows disabled.

How do I process WooCommerce webhooks safely?

Verify the signature, answer fast and process later, re-read the order, and make processing safe to repeat. This section is for whoever builds your backend.

  1. Verify the signature. WooCommerce sends "a base64 encoded HMAC-SHA256 hash of the payload" in the X-WC-Webhook-Signature header (REST API docs). Compute it over the raw body and reject mismatches. Set your own long random secret; if the field is blank, WooCommerce uses the API user's consumer secret (webhook guide).
  2. Answer fast, work after. Store the delivery, return 2xx, then process it. Errors and timeouts count toward the automatic disable (WooCommerce source).
  3. Re-read the order. Treat the webhook as a signal: fetch the current order and act on what it says now, so a stale "processing" update arriving after a refund can't hand access back.
  4. Make processing safe to repeat (idempotent). Expect repeats: order.updated also fires when a refund is added or deleted (WooCommerce source). Keep one access row per order, line item and course with a unique key, and write it as "insert or update".

The signature check:

import { createHmac, timingSafeEqual } from "node:crypto";

// rawBody: the raw request bytes, before any parsing.
export function isValidWooSignature(rawBody: Buffer, header: string | null, secret: string) {
  if (!header) return false;
  const expected = Buffer.from(createHmac("sha256", secret).update(rawBody).digest("base64"));
  const received = Buffer.from(header);
  return expected.length === received.length && timingSafeEqual(expected, received);
}

How do I match the WooCommerce buyer to the right app account?

Grant access against the order's billing email, and let a buyer whose app email differs claim the purchase with a one-time code sent to that email.

Each order carries a billing email and a customer_id, which is 0 for guest checkouts (order properties). Access recorded against the billing email attaches to whichever app account signs in with that address.

Email alone fails when someone buys with a work address and signs into the app with a personal one. In the claim flow, the buyer enters the purchase email in the app and types the one-time code sent there; proving control of that inbox makes it safe to move the purchase to their account. I use the same claim flow for GoHighLevel funnel purchases.

How do I map WooCommerce products and variations to courses?

Don't hard-code product IDs; keep a mapping your team edits in an admin screen:

WooCommerce productVariationUnlocksAccess length
Foundations course(none)FoundationsLifetime
Advanced bundle(none)Advanced 1, Advanced 2Lifetime
MembershipMonthlyMember areaWhile subscription is active
  • Map variations when they differ. Each line item has a product_id and a variation_id (line item properties).
  • Log every change. Who changed which mapping, and when, answers "why does this person have access?"
  • Alert on unmapped products in paid orders.
  • Decide whether past buyers get courses you add to a bundle later. If they do, grant them; if not, write it down so support can answer.

How should refunds, cancellations, renewals and trials work?

Three decisions here are yours: what a partial refund does, whether a member keeps access while a failed card payment is retried, and what happens when a free trial ends without a payment.

Access should follow the latest order or subscription status: a full refund or a cancelled order removes it, a partial refund follows your written rule, and subscription access follows the subscription, not its first order.

Refunds and cancellations. "If the full order value is not refunded, the order status will not change to Refunded" (refund guide), so a partly refunded order still looks paid. Read the refunds endpoint, which lists each refund and any line items it covers, and apply your rule: for example, a line refunded in full loses its course, a goodwill refund keeps access.

Renewals. With WooCommerce Subscriptions, each renewal creates a new renewal order (renewal process). Access by subscription status:

  • Active: grant.
  • Pending cancellation: cancelled with prepaid time left. Keep access until the term ends.
  • On hold: awaiting payment, or suspended by the store owner or customer. If you enable the failed payment retry system, it retries "over 7 days by default", with the subscription On hold and the renewal order Pending. I prefer keeping access while a retry is scheduled, so a declined card doesn't lock out a paying member; a subscription put on hold by hand, or still On hold after the retries end, loses access.
  • Cancelled and Expired: remove access.

Trials. With "$0 initial checkout without a payment method" and no sign-up fee, the subscription moves to On hold when its free trial ends (creating subscription products), so your On hold rule applies.

How do I test the integration before launch?

Use a staging shop and app, and your payment gateway's test mode if it has one. WooCommerce logs each delivery and your server's response under WooCommerce > Status > Logs, source "webhooks-delivery" (webhook guide).

  1. Save the webhook as Active and confirm your endpoint accepts WooCommerce's first ping.
  2. Buy every mapped product and variation, once as a guest with a new email.
  3. Leave an order On hold and confirm nothing unlocks until it is paid.
  4. Replay a stored delivery twice, and send one with a wrong signature.
  5. Refund fully, refund partly, cancel.
  6. For subscriptions: renew, fail a renewal, cancel with time left, let one expire.
  7. Break the delivery URL, place an order, restore it, and confirm the scheduled check grants access.

WooCommerce app integration checklist

  • Store rules checked per country, with the date.
  • Only Processing and Completed orders grant access.
  • order.created and order.updated webhooks with your own random secret, verified on the raw body.
  • Endpoint stores, returns 2xx, then processes; each delivery re-reads the order.
  • Unique key per access row; insert-or-update writes.
  • Scheduled modified_after check and a disabled-webhook alert.
  • Staff-editable product mapping with an audit trail.
  • Written rules for refunds, partial refunds and cancellations.
  • Subscription access follows subscription status.
  • Claim flow for buyers with a different app email.
  • All test cases pass on staging.

Common questions

What does it cost to connect WooCommerce to my own app?

If you do not have an app yet, you get a fixed price in writing for the app and the link to your shop before any work starts. If your app is already live, you get a fixed price in writing too.

Which WooCommerce order status should unlock a course?

Processing and Completed. WooCommerce describes Processing as "Payment has been received (paid)" and Completed as "fulfilled and is complete" (order statuses). Pending payment, On hold and Draft should wait.

Do buyers need the same email in the shop and the app?

Not if you build a claim flow. Grant access against the purchase email, then let a user prove they control that inbox with a one-time code and move the purchase to their account.

Need help with this?

If you sell through WooCommerce and want buyers to get access in your own iPhone, Android or web app, I build the app and the link from your shop to it. For ProFinity, a purchase in the WooCommerce shop unlocks the right course or membership in the app.

Tell me what you sell and what the app should unlock. I reply with how I would connect the two, and you get a fixed price in writing before any work starts. Two decisions shape everything else: which store rules apply to your app, and what a refund does to access. Both are cheap to settle before launch.

Related: moving LearnDash courses and customer access into a mobile app, moving GoHighLevel customers into your app, apps for aesthetic clinics and clinician training.

Sources

Selling in WooCommerce already?

Tell me what you sell and what the app should unlock. I reply with how I would connect the two, which store rules apply, and a fixed price in writing.

Tell me what you sell

Written by Vaclav Skarka, founder of HLT3 Studio in Zurich, software engineer since 2008 and former software architect at Avaloq.