Guides

Taking payment for guest WiFi with Stripe

From checkout to switching the connection on. What we learned connecting Stripe to TP-Link Omada hotspots, and the parts that went wrong first.

By Andrew Westrope, founder of WifiFee · 22 November 2026

Taking a card payment is the easy part. The hard part is everything around it: a phone with no internet yet, a portal window that closes itself, and a controller that must let one device online for exactly the time paid for. This is how WifiFee handles it, and most of it applies to any hotspot hardware.

The flow in brief

  1. The guest picks a plan on the portal page.
  2. We create a Stripe Checkout session on the venue's own Stripe account. The payment carries everything needed to switch the device on later, without the guest's browser.
  3. The guest pays on Stripe Checkout.
  4. Stripe sends payment_intent.succeeded to our webhook. We check it, create the guest session and tell the Omada controller to let the device online.
  5. The success page, which has been waiting, shows the guest they are connected.

Why the webhook switches the WiFi on, not the redirect

Stripe Checkout redirects the guest to a success URL when they pay. It is tempting to switch access on when that page loads. Don't.

On a captive portal the redirect is the least reliable part of the flow. The iPhone sign-in window closes as soon as it thinks the device is online. Guests tap "Done" or switch apps mid-payment. Android's window can vanish when the network changes. And a success URL is just a URL: anyone can load it.

So the redirect only shows progress. If Stripe says the payment has gone through but our webhook has not finished yet, the success page shows "Payment received" and keeps checking until the guest is online. If the guest has already closed the window, nothing is lost: the webhook switches the WiFi on regardless.

Stripe signs every webhook, so we verify the signature before reading anything, and it retries a webhook that fails. A lost redirect is never retried.

Getting a guest to Stripe from a captive portal

Before payment, the guest's device has no internet, but Stripe Checkout, Apple Pay and bank security checks all need it. iPhone and laptop guests get a short window online to finish paying. It is slowed down and capped, so starting a payment and abandoning it is not a way to get free WiFi.

Android is different: give an Android phone internet and it closes the sign-in window before Stripe loads. So Android guests reach Stripe through the portal's walled garden, the short list of sites (Stripe and the card networks' security pages) a guest can open before signing in. Android's sign-in window takes cards but not Google Pay, so Android guests are also offered a handover to Chrome, where Google Pay works.

There is more on the quirks of each phone's sign-in window in our captive portal guide.

Stripe Connect with the venue's own account

WifiFee is a platform: lots of venues, one integration. Each venue connects a full Stripe account, not an Express account. The venue owns the account and its Dashboard, and Stripe bills the account for its own fees.

Every guest payment is a direct charge on that account. That means:

  • The money goes straight into the venue's Stripe balance and pays out to their bank as usual.
  • Stripe takes its processing fee from the venue.
  • Refunds come out of the venue's balance.
  • Every payment, and any dispute, shows in the venue's own Stripe Dashboard like any other sale.
  • Our 10% platform fee is set as the payment's application fee, and Stripe moves it to the platform.

Checking every payment webhook

Direct charges have a catch. The venue controls its own Stripe account, and anyone with access to it could create a payment there with whatever details they like. So a valid signature is not enough. Before a payment grants any WiFi, we check:

  1. The signature is valid. The event really came from Stripe.
  2. The account belongs to a venue. Events from accounts we don't know are ignored.
  3. The payment names that same venue. Otherwise one venue could create a payment that grants WiFi at another. Payments a venue takes outside WifiFee are ignored too.
  4. The platform fee was taken. We work the fee out again from the amount and VAT rate, and ignore the payment if less was taken.

An ignored event is still acknowledged, because retrying it would never change the answer.

Duplicate webhook events

Stripe delivers each event at least once, which means sometimes more than once. We key records on the payment, not on the event, so a repeated event updates the existing record instead of creating a second one.

The WiFi grant needs the same care. A payment from a device with an active session adds time to it (that is how "buy more time" works), so a repeated event could add the time twice. Once a payment is linked to a session, any repeat is skipped.

Switching the WiFi on after payment

Once the checks pass, we record the payment, create a guest session (or extend the guest's current one), authorise the device on the controller for the time paid for, and set the plan's download and upload speeds. The details are in our guides to the Omada external portal API and per-guest bandwidth limits.

When the WiFi can't be switched on after payment

This is the worst outcome: the guest has paid and is still offline. The controller might be unreachable, restarting, or rejecting the call.

We don't hide it. The session is kept as pending rather than active, and the failure is reported to us straight away. The venue sees the session in their dashboard and can refund it. The guest still gets a confirmation email with a link back to their session. Getting them online from there is a job for a person, not for webhook retries.

Failed payments

A declined card is mostly Stripe's problem, which is one reason to use Checkout: the guest can try another card on the same page. Nothing is granted until a payment succeeds, so a failure needs no clean-up, and the short checkout window simply runs out. The cancel link takes the guest back to the plans page. Failed payments are still logged against the transaction with Stripe's reason.

Refunds end the session

A venue can refund a session from the WifiFee dashboard. That creates the refund on the venue's own Stripe account, disconnects the device, and marks the session refunded.

Venues also refund from the Stripe Dashboard, because it is their account, so we listen for Stripe's refund event too. Any refund on the payment, full or partial, ends the session and removes the device from the hotspot.

Ending sessions when the time runs out

The controller's own timeout is set to the purchased time, but we don't rely on it alone. A scheduled job runs every minute, finds sessions past their expiry time, removes each device from the controller and marks the session expired. The database never shows a guest as online after their time is up.

Receipts and the confirmation email

Stripe Checkout collects the guest's email address, and we pass it to Stripe as the receipt address, so Stripe sends its own payment receipt and any refund notice.

We also send a confirmation email with the plan, the expiry time and a link to the guest's session page, where they can check their remaining time or buy more. If the email bounces, the session gets an "Email bounced" badge in the venue's dashboard. It is almost always a mistyped address.

VAT and Stripe tax rates

Prices are set including VAT. For a VAT-registered venue we add an inclusive Stripe tax rate with the venue's rate and VAT number, so Stripe's receipt shows the breakdown. Tax rates belong to an account, so it is created on the venue's account alongside the payment.

The platform fee is worked out on the amount before VAT, not the gross. On a £6.00 pass at 20% VAT, the net amount is £5.00 and the 10% fee is 50p, not 60p. The webhook repeats the same sum when it checks the fee.

Questions

Can I rely on the Stripe success redirect to switch WiFi on?

No. Guests close the captive portal window, phones drop the redirect, and anyone can load a success URL. Treat the redirect as a page that shows progress, and switch access on from the payment_intent.succeeded webhook, which Stripe signs and retries.

Who pays the Stripe fee with direct charges?

The connected account that takes the payment, which is the venue. Stripe deducts its processing fee from the venue's balance, and the platform receives only its application fee.

Does Apple Pay work in the iPhone captive portal window?

Apple Pay and bank security checks need a working internet connection, so WifiFee gives iPhone and laptop guests a short, capped window online to finish paying. Google Pay is not available in Android's sign-in window, so Android guests are offered a handover to Chrome to pay with it.

What happens to WiFi access when a payment is refunded?

Any refund, full or partial, ends the session and removes the device from the hotspot, whether it was made from the WifiFee dashboard or the venue's Stripe Dashboard.

Rather not build it yourself?

WifiFee does all of this for TP-Link Omada: the portal, Stripe Checkout on your own Stripe account, and switching guests on and off. No monthly fee, just 10% of each payment.