PayPal Subscriptions

Configure PayPal Subscriptions in Antamedia WiFi Hotspot to offer recurring paid WiFi access with automatic billing.
Create a PayPal REST API app, register subscription webhooks, configure the payment gateway and Internet Plans, and verify the complete process in Sandbox before accepting live payments.

Configure PayPal Subscriptions for WiFi Hotspot

1. Create / use a PayPal Business account

2. Go to https://www.paypal.com and open or use a Business account (merchant account that will receive subscription payments).

3. For testing, you will use Sandbox accounts from the Developer site. Live money uses the real Business account.

Create a REST API app (Sandbox first)

1. Open https://developer.paypal.com and sign in with the same PayPal account.

2. Go to Dashboard / Apps & Credentials.

3. Select Sandbox.

4. Under REST API apps, click Create App (name e.g. Hotspot Subscriptions).

5. Copy:

- Client ID

- Secret (click Show)

6. Under Sandbox accounts, note a Business and a Personal (buyer) account for testing.

When going live: switch to Live, create (or use) a Live REST app, and copy the Live Client ID and Secret.

Register the webhook (required for renewals)

PayPal must call your Hotspot server when renewals and cancels happen.

1. In the same REST app / Webhooks / Add Webhook.

2. Webhook URL (HTTPS, public):

https://YOUR-HOTSPOT-DOMAIN/payment/PayPalSubscriptionWebhook

Example: https://wifi.example.com/payment/PayPalSubscriptionWebhook

3. Subscribe at least these events:

- PAYMENT.SALE.COMPLETED (renewal payments — required)

- BILLING.SUBSCRIPTION.CANCELLED

- BILLING.SUBSCRIPTION.SUSPENDED

- BILLING.SUBSCRIPTION.EXPIRED

Optional: BILLING.SUBSCRIPTION.ACTIVATED

4. Save. You do not need to paste Webhook ID/secret into Antamedia for this integration (Hotspot verifies by calling PayPal with Client ID/Secret).

Use a Sandbox webhook URL while testing Sandbox; create a Live webhook on the Live app for production (same path, Live domain).

Configure Antamedia Hotspot

1. Payment Gateways / add / edit gateway.

2. Type: PayPal Subscriptions (not PayPal Checkout).

3. Fill in:

- PayPal Client Id = Client ID from step 2

- Client Secret = Secret from step 2

- Currency = same currency you sell plans in (e.g. USD)

- Test mode = ON for Sandbox, OFF for Live

4. Save.

5. Splash page / Login and Signup widget / select this payment gateway.

6. Internet plans used for paid signup should be priced and (recommended) marked as subscription with the correct cycle (day / week / month / quarter / year). Hotspot creates matching PayPal billing plans automatically when a user chooses a plan —- you do not create plans manually in PayPal for normal use.

Captive portal / firewall whitelist

Allow end-user devices to reach:

- https://www.paypal.com (Live SDK)

- https://www.sandbox.paypal.com (Sandbox SDK)

- related PayPal API/CDN hosts already used for PayPal Checkout, if any

Without this, the Subscribe button may not load on the splash page.

Test (Sandbox)

1. Open the splash page on a test hotspot.

2. Choose a paid plan / PayPal Subscribe.

3. Log in with a Sandbox Personal buyer account and approve.

4. Confirm: user is created, can log in, and a subscription appears in the user profile.

5. In Developer / Webhooks / event history, confirm deliveries to your URL return HTTP 2xx.

6. Cancel from the user profile and confirm the subscription is cancelled in PayPal Sandbox as well.

Go Live

1. Create/use Live REST app + Live Client ID/Secret.

2. Add the same webhook URL on the Live app with the same events.

3. In Hotspot: paste Live credentials, turn Test mode OFF, same currency.

4. Run one real small-value subscription and confirm first payment + later renewal.

Notes for operators

- PayPal Checkout = one-time payment. PayPal Subscriptions = recurring. Use the correct gateway type on the splash.

- Do not put plan IDs in gateway special fields; plans are created from the Internet Plan the guest selects.

- Renewals are charged by PayPal, not by Hotspot Hangfire. If renewals do not extend access, check the webhook URL, HTTPS, and that PAYMENT.SALE.COMPLETED is subscribed.

- Customers cancel in Hotspot profile; Hotspot also sends cancel to PayPal.

Bottom line: Ship after Sandbox signup + webhook proof; then Live credentials. The earlier note was about missing that live exercise during coding - not a missing feature in the build.