Airwallex WHMCS Gateway

Airwallex WHMCS Gateway Documentation

Complete guide to installing and configuring the Airwallex payment gateway in your WHMCS installation.

Prerequisites

  • WHMCS version 8.0 or higher
  • PHP version 8.0 or higher
  • IonCube Loader installed and enabled
  • SSL certificate installed on your domain
  • Airwallex Business Account with:
    • Verified business profile
    • PCI-DSS SAQ A questionnaire completed to enable payments access
  • API credentials from your Airwallex Dashboard

WHM/cPanel Configuration

The Airwallex WHMCS gateway securely communicates via API to establish a session and load the payment fields within an iframe from Airwallex for PCI compliance. You must configure your server to allow iframes to load properly.

Important:

You need to disable X-Frame-Options in WHM for the Airwallex payment gateway to function correctly.

Disable Use X-Frame-Options

Follow these steps in cPanel & WHM to allow iframes to load:

  1. Log in to WHM

  2. Access Tweak Settings

    Navigate to WHM » Server Configuration » Tweak Settings

  3. Modify X-Frame-Options Setting

    Set "Use X-Frame-Options and X-Content-Type-Options headers with cpsrvd" to Off

    Disabling X-Frame-Options in WHM Tweak Settings
  4. Save Changes

    Click the "Save" button at the bottom of the page to apply the changes

Installation

Follow these steps to install the Airwallex payment gateway module:

  1. Download the Module

    After your purchase, you will receive an email containing the download link for the latest version of the Airwallex WHMCS module.

  2. Upload to WHMCS

    Upload the zip file to your whmcs directory in your web hosting. Extract the file here.

  3. Verify Installation

    Ensure the following paths exist in your WHMCS installation:

    modules/gateways/airwallex.php
    modules/gateways/callback/airwallex.php
    Folder: modules/gateways/airwallex
    includes/hooks/airwallex.php

Configuration

Configure the Airwallex payment gateway in your WHMCS admin panel:

  1. Access Apps & Integrations

    Navigate to Settings → Apps & Integrations in your WHMCS admin area

  2. Locate Airwallex Gateway

    Use the search function to find "Airwallex Gateway" and click on it

    Search for Airwallex Gateway in Apps & Integrations
  3. Activate the Gateway

    Click the "Activate" button to enable the Airwallex payment gateway

    Activating the Airwallex Gateway
  4. Access Gateway Settings

    After activation, either click the "Manage" button or navigate to System Settings → Payment Gateways to configure the gateway

  5. Enter API Credentials

    • API Key
    • Client ID
  6. Configure Settings

    • Display Name - Enter what you would like your clients to see as the payment method name
    • Enter in your Airwallex API Key and Client ID
    • Configure Card & Provisioning Controls
    • Airwallex WHMCS Gateway Settings
    • Auto-accept free orders: Automatically accept the orders after a valid payment method is added
    • Pause provisioning until card is active: Pause provisioning until valid payment method is added
    • Custom Messages: Customize the messages your clients see when waiting for a payment method to be added
    • Fee Configuration: Configure the fee for the Airwallex Gateway to record transaction fees against payments.

    Note about Test Mode:

    Test mode is available for Airwallex Demo accounts which requires Airwallex to create you a demo tenant. If you need to do some testing we can assist with some demo credentials. Please feel free to contact us.

Adding Payment Methods

Your clients can easily add new payment methods in their client portal:

  1. Access Payment Methods

    In the client portal, customers can navigate to the payment methods section to add a new payment method.

  2. Add New Payment Method

    When adding a new payment method, clients will see the payment options that you have enabled in your Airwallex account:

    • Credit/Debit Card - Enter card details securely
    • Google Pay - Quick and convenient payment setup
    • Apple Pay - Seamless payments on Apple devices
    • Other payment methods that are enabled in your Airwallex account
    Adding a new payment method in the client portal
  3. Secure Storage

    Payment methods are securely stored using Airwallex's tokenization system, ensuring that sensitive payment data is never stored on your WHMCS server.

Invoice Payment

The Airwallex Gateway uses remote tokenization, providing a seamless checkout experience for your clients' first transaction. Their payment method will be automatically saved for future payments:

  1. First Invoice Checkout

    When clients view their first invoice and select to pay, they will be presented with the available payment options. After completing their first payment, their payment method will be securely saved for future use.

  2. Payment Options

    During checkout, clients will see:

    • Their saved payment methods (for returning customers)
    • Option to add a new payment method
    • Available payment options as configured in your Airwallex account
    Invoice payment checkout screen
  3. Future Payments

    For subsequent invoices, clients can easily pay using their saved payment method, or choose to add a new one. All payment methods are securely stored using Airwallex's tokenization system, ensuring that sensitive payment data is never stored on your WHMCS server.