PayPal Integration
Enable paid WiFi access by accepting PayPal and credit card payments on your captive portal using PayPal Checkout with support for multiple currencies.
Overview
The PayPal integration enables:
- One-time payments for WiFi access
- PayPal Checkout for seamless payments
- Credit/Debit card acceptance via PayPal
- Multiple currencies support
Prerequisites
- IronWifi account with captive portal configured
- PayPal Business account
- PayPal REST API credentials
PayPal Setup
Create Business Account
- Go to paypal.com/business
- Sign up for a Business account
- Complete verification
Get API Credentials
- Log in to PayPal Developer Dashboard (developer.paypal.com)
- Go to My Apps & Credentials
- Create a new REST API app:
- App Name: IronWifi WiFi Payments
- Account: Your business account
- Copy credentials:
- Client ID
- Client Secret
Sandbox Testing
For development:
- Use Sandbox credentials
- Create sandbox buyer accounts
- Test payment flow before going live
IronWifi Configuration
Step 1: Add PayPal Provider
- Log in to IronWifi Console
- Navigate to Networks > Captive Portals
- Select your captive portal
- Go to Authentication Providers
- Click Add Provider > PayPal
Step 2: Configure API
Enter PayPal credentials:
- Client ID: Your PayPal REST API Client ID
- Client Secret: Your PayPal Client Secret
- Environment: Sandbox (testing) or Live (production)
Step 3: Create Access Plans
Configure WiFi access plans:
- Click Add Plan
- Set up each plan:
- Name: Display name (e.g., "1 Hour Access")
- Price: Amount (e.g., 2.99)
- Currency: USD, EUR, GBP, etc.
- Duration: Access time in minutes
- Data Limit: Optional data cap
Example Plans:
| Plan | Price | Duration | Data |
|---|---|---|---|
| 1 Hour | $1.99 | 60 min | Unlimited |
| Day Pass | $4.99 | 1440 min | Unlimited |
| Week | $14.99 | 10080 min | 20 GB |
Payment Flow
Guest Experience
- Guest connects to WiFi
- Captive portal shows available plans
- Guest selects plan and clicks "Pay with PayPal"
- Redirected to PayPal Checkout
- Guest logs in to PayPal or pays with card
- Payment confirmed
- Redirected back, access granted
Technical Flow
Guest → Captive Portal → PayPal Checkout
↓
Payment Approved
↓
Access Granted ← IronWifi ← PayPal Webhook
Customization
Splash Page Integration
Add PayPal buttons to your splash page:
<div class="wifi-plans">
<div class="plan">
<h3>1 Hour Access</h3>
<p class="price">$1.99</p>
<button onclick="purchasePlan('1hour')">Buy Now</button>
</div>
<div class="plan">
<h3>Day Pass</h3>
<p class="price">$4.99</p>
<button onclick="purchasePlan('daypass')">Buy Now</button>
</div>
</div>
<script>
function purchasePlan(planId) {
window.location.href = '{{paypal_checkout_url}}?plan=' + planId;
}
</script>
Branding
PayPal Checkout can display:
- Your logo
- Business name
- Custom colors (limited)
Configure in PayPal account settings.
Webhook Configuration
Set Up Webhooks
- In PayPal Developer Dashboard
- Go to your app > Webhooks
- Click Add Webhook
- Enter IronWifi webhook URL
- Select events:
PAYMENT.CAPTURE.COMPLETEDPAYMENT.CAPTURE.DENIEDCHECKOUT.ORDER.APPROVED
Webhook URL
Get webhook URL from IronWifi:
https://auth.ironwifi.com/webhook/paypal/your-org-id
Testing
Sandbox Testing
- Use sandbox API credentials
- Create sandbox buyer account
- Use sandbox buyer to test payments
- Verify access is granted after payment
Test Scenarios
Test these scenarios:
- Successful payment → access granted
- Cancelled payment → returns to portal
- Failed payment → error message shown
- Expired session → graceful handling
Receipts
PayPal Receipts
PayPal automatically sends receipts to buyers.
Custom Receipts
Configure additional email notifications:
- In IronWifi, enable payment confirmation emails
- Customize template with plan details
- Include WiFi credentials if applicable
Troubleshooting
Payment Not Completing
- Verify API credentials
- Check PayPal account status
- Review PayPal transaction logs
- Check webhook delivery
Access Not Granted After Payment
- Confirm payment in PayPal Dashboard
- Check webhook was received
- Review IronWifi logs
- Verify plan configuration
Webhook Errors
- Verify webhook URL is correct
- Check webhook signing verification
- Review PayPal webhook logs
- Ensure IronWifi can receive webhooks
Refunds
Process Refund
- Log in to PayPal Business Dashboard
- Go to Activity > All Transactions
- Find the transaction
- Click Refund
- Enter refund amount
Access After Refund
- By default, WiFi access continues until expiration
- For immediate revocation, manually disconnect user in IronWifi
Security
Best Practices
- Use HTTPS for all webhooks
- Verify webhook signatures (automatic in IronWifi)
- Monitor for fraud using PayPal tools
- Enable 2FA on PayPal account
- Limit API permissions to necessary scopes
PCI Compliance
PayPal handles card data:
- No card numbers touch your systems
- PayPal is PCI DSS Level 1 compliant
- Reduces your compliance burden
Multi-Currency
Supported Currencies
PayPal supports many currencies:
- USD, EUR, GBP, CAD, AUD
- And many more
Configuration
Set currency per plan or globally:
- In plan settings, select currency
- Prices display in selected currency
- PayPal converts if buyer uses different currency
Best Practices
- Clear pricing - Display all fees upfront
- Multiple plans - Offer variety
- Test thoroughly - Use sandbox first
- Monitor transactions - Check daily
- Quick support - Have refund policy ready