Skip to main content

Square Integration

Process credit card payments for paid WiFi access on your captive portal using Square's payment platform with integrated transaction management and reporting.

Overview

The Square integration enables:

  • Credit card payments for WiFi access
  • In-person and online payment options
  • Square Dashboard for transaction management
  • Integrated reporting with existing Square setup

Prerequisites

  • IronWifi account with captive portal configured
  • Square account (squareup.com)
  • Square Developer account

Square Setup

Create Developer Account

  1. Go to developer.squareup.com
  2. Sign up or link existing Square account
  3. Accept developer terms

Create Application

  1. In Square Developer Dashboard
  2. Click Applications > Create Application
  3. Name: "WiFi Payments"
  4. Copy credentials:
    • Application ID
    • Access Token (Sandbox and Production)

Get Location ID

  1. In Square Dashboard, go to Account & Settings
  2. Find Locations
  3. Note the Location ID for your business

IronWifi Configuration

Step 1: Add Square Provider

  1. Log in to IronWifi Console
  2. Navigate to Networks > Captive Portals
  3. Select your captive portal
  4. Go to Authentication Providers
  5. Click Add Provider > Square

Step 2: Configure API

Enter Square credentials:

  • Application ID: Your Square Application ID
  • Access Token: Your Square Access Token
  • Location ID: Your Square Location ID
  • Environment: Sandbox or Production

Step 3: Create Access Plans

Set up WiFi access tiers:

PlanPriceDurationFeatures
Basic$2.001 hourStandard speed
Standard$5.00Day passFull speed
Premium$15.00WeekPriority + unlimited

Payment Flow

Web Flow

  1. Guest connects and sees captive portal
  2. Selects access plan
  3. Square payment form appears
  4. Guest enters card details
  5. Payment processed
  6. Access granted

Implementation

Square Web Payments SDK integration:

<div id="card-container"></div>
<button id="pay-button">Pay {{amount}}</button>

<script>
const payments = Square.payments(applicationId, locationId);
const card = await payments.card();
await card.attach('#card-container');

document.getElementById('pay-button').addEventListener('click', async () => {
const result = await card.tokenize();
if (result.status === 'OK') {
// Send token to IronWifi for payment processing
submitPayment(result.token);
}
});
</script>

Integration Options

Online Payments

For captive portal payments:

  • Square Web Payments SDK
  • Embedded payment form
  • PCI-compliant card handling

Point of Sale

For front desk payments:

  • Use Square Terminal or Reader
  • Process payment in Square POS
  • Enter receipt number in IronWifi
  • Access granted via manual voucher

Square Online Checkout

Redirect to Square-hosted checkout:

  1. Create checkout link
  2. Redirect guest to Square
  3. Receive webhook on completion
  4. Grant access

Webhook Configuration

Set Up Webhooks

  1. In Square Developer Dashboard
  2. Go to your application > Webhooks
  3. Click Add Endpoint
  4. Enter IronWifi webhook URL
  5. Select events:
    • payment.completed
    • payment.updated

Webhook Security

Configure webhook signature validation:

  1. Copy Signature Key from Square
  2. Add to IronWifi Square integration settings

Testing

Sandbox Environment

  1. Use Sandbox credentials
  2. Use Square test card numbers:
    • Success: 4532 0000 0000 0000
    • Decline: 4000 0000 0000 0002
  3. Test complete payment flow

Test Scenarios

Verify:

  • Successful payment → access granted
  • Declined card → error message
  • Cancelled payment → return to portal
  • Webhook delivery → access automation

Transaction Management

Square Dashboard

View transactions in Square Dashboard:

  • Payment history
  • Refund processing
  • Customer information
  • Sales reports

IronWifi Logs

Track in IronWifi:

  • Payment attempts
  • Success/failure rates
  • Plan popularity
  • Revenue metrics

Receipts

Digital Receipts

Square can send receipts:

  1. In Square Dashboard > Receipts
  2. Configure email receipts
  3. Customize receipt content

Include WiFi Details

Add to receipt notes:

WiFi Access: {{plan_name}}
Duration: {{duration}}
Network: {{ssid}}

Refunds

Process Refund

  1. In Square Dashboard > Transactions
  2. Find the transaction
  3. Click Issue Refund
  4. Enter refund amount

Partial Refunds

Square supports partial refunds:

  • Refund specific amount
  • Keep remaining balance
  • Access continues until manually revoked

Security

PCI Compliance

Square handles card security:

  • Card data never touches your servers
  • Square is PCI DSS Level 1 compliant
  • Tokenization protects sensitive data

Fraud Prevention

Square includes:

  • Risk assessment
  • Velocity checks
  • Address verification
  • CVV verification

Reporting

Square Reports

Access in Square Dashboard:

  • Sales summary
  • Payment methods
  • Time-based analysis
  • Item sales (plans)

Custom Reports

Export data for:

  • Revenue by plan
  • Peak usage times
  • Conversion rates
  • Average transaction value

Multi-Location

Location-Based Pricing

Different pricing per location:

  1. Set up multiple Square locations
  2. Configure IronWifi per-location settings
  3. Map location to appropriate pricing

Consolidated Reporting

View all locations in Square Dashboard.

Troubleshooting

Payment Failing

  1. Verify credentials (Application ID, Access Token)
  2. Check Location ID is correct
  3. Review Square transaction logs
  4. Test card numbers

Access Not Granted

  1. Confirm payment in Square Dashboard
  2. Check webhook was received
  3. Verify IronWifi configuration
  4. Review error logs

Webhook Issues

  1. Verify webhook URL
  2. Check signature key
  3. Review Square webhook logs
  4. Test webhook delivery

Best Practices

  1. Test in sandbox before production
  2. Clear pricing on portal
  3. Quick checkout - minimize steps
  4. Receipt confirmation for customers
  5. Monitor daily for issues