Payment Gateway Integration for Premium Wi-Fi¶
Guest Wi-Fi monetization can drive revenue while improving network service quality through premium pricing tiers. This guide explains how to enable online payment on a hotspot portal, allowing users to purchase Wi-Fi access plans using credit card before connecting to the internet.
When payment is enabled, unauthenticated users are redirected to a login page with a link for user to purchase/topup usage plans, where they enter their email, select a plan, choose a payment method, and complete checkout. Upon successful payment, they receive email confirmation and automatic internet access.
Video Demo: Payment Gateway Integration Setup
Supported Payment Gateways¶
RansNet HSG includes native API integration with major payment processors across global and regional markets. Any combination can be enabled simultaneously, allowing users to choose their preferred payment method.
| Gateway | Coverage | Best For |
|---|---|---|
| Airwallex | Global | Cards, Alipay and WeChat Pay on one hosted payment page |
| PayPal | Global | PayPal checkout (PayPal account or card) and Alipay through PayPal |
| Mastercard (MPGS) | Global | Enterprise, high-volume transactions |
| Midtrans | Southeast Asia | Indonesia, Malaysia, Singapore, Philippines |
| Ooredoo | Middle East / North Africa | Telecom-integrated payments, regional markets |
| M-Pesa | East Africa | Mobile money (STK push to the user's phone) |
| Custom / Other Providers | Any region | Provider-specific development, white-label integration |
One payment provider is active per portal. Select the provider that matches your customer base; to offer several methods (e.g. cards, Alipay and WeChat Pay), choose a provider that supports them all, such as Airwallex. Credentials for each provider are entered in the portal settings (Step 3); for custom integrations, contact RansNet support.
Prerequisites¶
Gather Payment Gateway Credentials¶
Before configuring payment on HSG, retrieve credentials from your selected payment providers. The steps below detail PayPal and Mastercard; for Midtrans, Ooredoo, or custom integrations, contact your provider's business team or RansNet support.
PayPal Setup:
- Log into PayPal Developer Dashboard
- Navigate to My Apps & Credentials
- Retrieve:
- Client ID — Application identifier
- Client Secret — Secure authorization token
- Merchant Name — Your business name (displayed to users during checkout)
Mastercard MPGS Setup:
Contact your acquiring bank or MPGS support team to obtain:
- Merchant ID — Your unique merchant identifier
- API Password — Secure authentication credential
- Merchant Name — Your business name (displayed to users during checkout)
Warning
Protect your credentials. Client IDs, secrets, and API passwords are sensitive. Never share them or store them in plain text. HSG encrypts them at rest and transmits them over HTTPS only.
Deployment Steps¶
Step 1: Create Purchase Plans¶
Purchase plans define what users can buy. Each plan is tied to a hotspot access profile with specific bandwidth, session duration, and access restrictions.
Via GUI:
Step 1a: Navigate to HOTSPOT USERS → Access Profile (or create a new profile).
Step 1b: Click the Access info tab, configure speed and quota (time and/or data volume) for each plan.
Step 1c: Click the Billing tab and configure the plan pricing:
| Field | Description | Example |
|---|---|---|
| Currency | Currency code (ISO 4217) | SGD, USD, MYR, IDR |
| Billing Price | Cost of this plan | 5.00 |
| Plan Enable | Toggle ON to make plan available to users | ON |
Repeat for each plan. Only plans with Plan Enable toggled ON will appear on the payment page.
Note
Create at least one enabled plan before enabling payment. Users cannot proceed without a plan to select. Common examples: 1-hour, 24-hour, 7-day, and 30-day plans at tiered pricing.
Step 2: Choose What Users Can Buy¶
Navigate to CAPTIVE PORTAL → Portal List, click Edit on the portal, and stay on the Login Option tab. Purchases are chosen per sign-in method:
| Sign-in Method (Section) | Purchase Options | Result |
|---|---|---|
| Sign in with username and password (Pre-created Accounts) | Post-paid data top-up, Prepaid data top-up via payment gateway, or Prepaid access plan via payment gateway (choose one, optional) | Existing users buy data or a plan for their own account (Buy data / Buy access plan link on the login page). |
| Register by purchase only (no free sign-up) (Email Self-registration) | Prepaid data top-up or Prepaid access plan | New users pay first; the account is created with their email and the password is emailed with the receipt. Tick Confirm email (user types it twice) to avoid typing mistakes. |
| Register by purchase only (no free sign-up) (SMS Self-registration) | Prepaid data top-up or Prepaid access plan | Same, with the mobile number as username and the password sent by SMS. |
For data top-ups, add the plans under Purchase Plans and Payment Gateway → Data Top-up Plans (quota, unit, price, currency). Access plans are the priced Access Profiles from Step 1. See Captive Portal — Login Option.
Step 3: Configure the Payment Gateway¶
Under Purchase Plans and Payment Gateway:
- Tick Payment gateway.
-
Select the Payment provider and enter its credentials:
Provider Fields Airwallex Client ID, API Key, Merchant Name PayPal Client ID, Client Secret, Merchant Name. Guests choose PayPal or Alipay under Choose Payment on the purchase page. MPGS (Mastercard) Merchant ID, API Password, Merchant Name Midtrans / M-Pesa / Ooredoo The keys issued by the provider -
Tick Sandbox (test) mode while testing with the provider's test credentials. The purchase pages show a test-mode notice and no real money is charged.
- Click Test payment gateway. It checks the credentials on the page (before saving) and reports whether they work in live or sandbox mode.
- Click Save.
Warning
Untick Sandbox (test) mode and enter live credentials before going live. Live credentials with sandbox mode on (or the reverse) fail the payment gateway test.
Step 4: Allow the Payment Pages Before Login¶
Users open the provider's payment pages before they are online. Add the provider's domains to the hotspot's bypass list (HSG: Bypass/Whitelist — Destination Domain; third-party routers: Walled Garden):
| Provider | Domains |
|---|---|
| Airwallex | .airwallex.com, .forter.com, .statsigapi.net, .featureassets.org |
| PayPal | .paypal.com, .paypalobjects.com |
| Alipay through PayPal | .alipay.com, .alipayobjects.com, .alicdn.com |
Via CLI (HSG / HSA hotspot): enter all domains in one comma-separated line under the hotspot instance:
security hotspot vlan1
bypass-domain airwallex.com,forter.com,statsigapi.net,featureassets.org,paypal.com,paypalobjects.com,alipay.com,alipayobjects.com,alicdn.com
!
bypass-domain replaces the instance's whole list each time it is entered, so include every domain you need (the portal domain .ransnet.com is always added in front). Each domain also allows its subdomains, e.g. paypal.com covers www.sandbox.paypal.com. Keep only the providers you use: for Airwallex only, the first four domains; for PayPal only, paypal.com,paypalobjects.com (plus the three Alipay domains if guests pay with Alipay through PayPal). Third-party routers use their own walled garden settings (see Walled Garden).
Guest Payment Flow¶
Once enabled, the guest experience is streamlined:
- Connect to Wi-Fi — Guest connects to the hotspot SSID (e.g.,
Venue-WiFi) - Login Page — Browser is redirected to the portal, which shows Buy data and/or Buy access plan links
- Identify — Existing users sign in; new users (purchase only) enter their email or mobile number
- Select Plan — Guest chooses a Data Top-up Plan or an access plan
- Choose Payment Method — e.g. card, Alipay or WeChat Pay (Airwallex), PayPal or Alipay (PayPal)
- Complete Checkout — Guest pays on the provider's secure page
- Automatic Access — The provider returns the guest to the portal, which adds the purchase and logs the guest in. If the provider page does not return (some WeChat Pay pages), the guest taps Back or reconnects to the Wi-Fi and the portal completes the paid order.
- Receipt — Sent by email (or SMS for mobile purchases) and shown on the status page; new accounts get their password with it
Verification¶
After configuring payment, test the flow end-to-end:
| Test | Expected Outcome |
|---|---|
| Portal loads correctly | Navigate to the portal URL and verify the login page displays the payment option |
| Purchase links visible | Buy data / Buy access plan links appear on the login page for the sign-in methods you set |
| Plan selection works | Click to select a plan and verify available options match what you configured |
| Gateway test | Test payment gateway reports the credentials work in the selected (live or sandbox) mode |
| Test payment | With Sandbox (test) mode on, complete a purchase with the provider's test account; the guest returns to the portal and is online |
| Receipt delivery | Verify email receipt arrives with plan details and expiry time |
| Access granted | Verify guest can browse the internet after successful payment |
| Plan expiry enforced | Wait until plan expiry time and verify guest is redirected back to payment page |
Troubleshooting¶
| Symptom | Likely Cause | Solution |
|---|---|---|
| Purchase links don't appear | No purchase option ticked for the sign-in method, or Payment gateway unticked | Tick a purchase option under the sign-in method and tick Payment gateway with a provider selected |
| No plans available | No priced Access Profiles, or no Data Top-up Plans with a price | Create at least one plan with "Plan Enable" ON, or add priced Data Top-up Plans |
| Payment gateway returns error | Credentials incorrect or gateway down | Verify Client ID/Client Secret (PayPal) or Merchant ID/API Password (Mastercard) in settings |
| Guests unable to complete payment | Provider's pages blocked before login | Add the provider's domains to the bypass list / walled garden (Step 4) |
| Payment fails with sandbox credentials | Sandbox (test) mode off while using test credentials | Tick Sandbox (test) mode, or enter live credentials |
| WeChat Pay shows "Succeeded" but the guest is not returned | The provider page does not redirect back | Guest taps Back or reconnects to the Wi-Fi; the portal completes the paid order within 15 minutes |
| Receipt not received | SMTP not configured | Verify SMTP settings in Application Settings |
| Plan expiry not enforced | Session timeout not configured | Set appropriate session timeout in the access profile |
Best Practices¶
Pricing Strategy¶
- Tiered plans — Offer multiple durations (1-hour, 24-hour, 7-day, monthly) to accommodate different user types
- Competitive rates — Research local Wi-Fi pricing; set rates 10-20% below premium venues, 5-10% above free Wi-Fi
- Off-peak discounts — Consider lower prices during low-traffic hours to drive usage
- Bundle offers — E.g., "3 days for the price of 2" to encourage longer commitments
Guest Experience¶
- Clear branding — Customize the payment page with your venue logo and color scheme
- Fast checkout — Keep registration to email-only; avoid unnecessary fields
- Multiple payment methods — Choose a provider that offers the methods your guests use (e.g. cards, Alipay and WeChat Pay)
- Instant access — Minimize delay between payment confirmation and internet access
- Reminder emails — Send expiry reminders (24 hours before, 1 hour before) to repeat customers
Security & Compliance¶
- Never handle card data — HSG payment integration is gateway-native; cards are never transmitted through HSG
- PCI compliance — PayPal and Mastercard handle PCI-DSS compliance; HSG remains out of scope
- HTTPS only — Ensure portal URL uses HTTPS with a valid SSL certificate
- Secure credentials — Change API passwords quarterly; rotate Client Secrets annually
- Monitor transactions — Review payment logs regularly for suspicious patterns or failed charges
Related Features¶
- Captive Portal Configuration — Customize login page branding and authentication methods
- Third-Party Hotspot Routers — Payments on Peplink, Teltonika and other CoovaChilli routers
- Access Profiles — Define bandwidth limits, session timeouts, and per-plan restrictions
- User Management — View payment history and paid user accounts
- Hotspot Instance Configuration — Configure VLAN, DHCP, and instance-level policies
- Application Settings — Configure SMTP for receipt delivery





