> ## Documentation Index
> Fetch the complete documentation index at: https://funnelfox.com/docs/llms.txt
> Use this file to discover all available pages before exploring further.

# Airwallex integration

> Connect Airwallex to FunnelFox Payments through Primer, set up webhooks, 3DS, and device fingerprinting.

Airwallex is one of the <Tooltip tip="Payment Service Provider">PSPs</Tooltip>
you can connect to FunnelFox Payments, alongside the others already in your
payment stack. You connect it through Primer, which routes your payments to
Airwallex as part of your
[payment orchestration](/docs/billing/payments-orchestration) setup.

## Setup

You need admin access to both your Airwallex account and your Primer account.
Keep both open in separate browser tabs, because the setup moves back and forth
between them.

### 1. Connect Airwallex to Primer

1. Go to **Integrations** in your Primer dashboard.

2. Click **New integration** at the top right.

<Frame>
  <img src="https://mintcdn.com/funnelfox/7MZEjMiqWe92YM6g/assets/airwallex-new-integration.png?fit=max&auto=format&n=7MZEjMiqWe92YM6g&q=85&s=4812c07a056b94c070d9aacc0796c3d8" width="1834" height="916" data-path="assets/airwallex-new-integration.png" />
</Frame>

3. Click **Connect** under **Airwallex**.

<Frame>
  <img src="https://mintcdn.com/funnelfox/7MZEjMiqWe92YM6g/assets/airwallex-connect.png?fit=max&auto=format&n=7MZEjMiqWe92YM6g&q=85&s=f79197990c4a51aeb6649c6ee90bf939" width="1920" height="989" data-path="assets/airwallex-connect.png" />
</Frame>

4. Keep Primer open and go to your Airwallex account in another browser tab.

5. Go to **Settings > Developer > API keys** in Airwallex.

6. Click **New scoped API key** at the top right.

<Frame>
  <img src="https://mintcdn.com/funnelfox/7MZEjMiqWe92YM6g/assets/airwallex-new-key.png?fit=max&auto=format&n=7MZEjMiqWe92YM6g&q=85&s=f2ef528c88fff1a800fba94e35168fe6" width="1877" height="564" data-path="assets/airwallex-new-key.png" />
</Frame>

7. Name your key and configure its scope. It needs the **Payment Acceptance**
   and **Payment Disputes** scopes.

8. Click **Create** to generate the key, then copy it.

   <Info>
     Copy the API key now. Airwallex shows it once, and you cannot retrieve it
     later. If you lose it, create a new key.
   </Info>

9. Go back to Primer and paste the key into **API key**.

<Frame>
  <img src="https://mintcdn.com/funnelfox/7MZEjMiqWe92YM6g/assets/airwallex-paste-key.png?fit=max&auto=format&n=7MZEjMiqWe92YM6g&q=85&s=9f237782021c2431cfa6b792427f5401" width="1837" height="921" data-path="assets/airwallex-paste-key.png" />
</Frame>

10. Go back to Airwallex and copy the **Client ID** for the key you created.

<Frame>
  <img src="https://mintcdn.com/funnelfox/7MZEjMiqWe92YM6g/assets/airwallex-clientid.png?fit=max&auto=format&n=7MZEjMiqWe92YM6g&q=85&s=4d557b7b83a3cd8c7681094f97144249" width="1877" height="564" data-path="assets/airwallex-clientid.png" />
</Frame>

11. Go back to Primer and paste the ID into **Client ID**.

<Frame>
  <img src="https://mintcdn.com/funnelfox/7MZEjMiqWe92YM6g/assets/airwallex-paste-clientid.png?fit=max&auto=format&n=7MZEjMiqWe92YM6g&q=85&s=c3aed2207c9f8997ff418e674f16f569" width="1832" height="914" data-path="assets/airwallex-paste-clientid.png" />
</Frame>

12. Click **Connect**.

### 2. Set up Primer webhook in Airwallex

This webhook tells Primer about refunds and disputes that happen in Airwallex.

1. Go to **Settings > Developer > Webhooks** in Airwallex.

2. Click **New webhook** at the top right.

<Frame>
  <img src="https://mintcdn.com/funnelfox/7MZEjMiqWe92YM6g/assets/airwallex-new-webhook.png?fit=max&auto=format&n=7MZEjMiqWe92YM6g&q=85&s=7cef9508f1f12aa71387806fedcfe2d7" width="1357" height="435" data-path="assets/airwallex-new-webhook.png" />
</Frame>

3. Name your webhook.

4. Go back to the Airwallex integration in Primer and copy the endpoint URL
   under **Set up webhook**.

<Frame>
  <img src="https://mintcdn.com/funnelfox/7MZEjMiqWe92YM6g/assets/airwallex-copy-url-webhook.png?fit=max&auto=format&n=7MZEjMiqWe92YM6g&q=85&s=82b5a67ec29ec4a73c39f481ae39b8ec" width="1835" height="920" data-path="assets/airwallex-copy-url-webhook.png" />
</Frame>

5. Go back to Airwallex and paste the URL into **Notification URL**.

<Frame>
  <img src="https://mintcdn.com/funnelfox/7MZEjMiqWe92YM6g/assets/airwallex-paste-url.png?fit=max&auto=format&n=7MZEjMiqWe92YM6g&q=85&s=9ca405380dbafc9c5694d9f585eb1507" width="1920" height="989" data-path="assets/airwallex-paste-url.png" />
</Frame>

6. Go to **Payment events** under the **Events** section and enable
   `Refund.Failed`, `Refund.Accepted`, and all **Payment Dispute** events.

<Frame>
  <img src="https://mintcdn.com/funnelfox/7MZEjMiqWe92YM6g/assets/airwallex-events-section.png?fit=max&auto=format&n=7MZEjMiqWe92YM6g&q=85&s=1107f86aaf44cf9ec3970d56d27a8635" width="1920" height="989" data-path="assets/airwallex-events-section.png" />
</Frame>

7. Click **Create**.

8. Click **Finish** in the Airwallex integration in Primer.

### 3. Set up FunnelFox Payments webhook in Airwallex

Airwallex needs a second webhook that posts refund and capture events straight
to FunnelFox Payments.

1. Go back to **Settings > Developer > Webhooks** in Airwallex and click
   **New webhook**.

<Frame>
  <img src="https://mintcdn.com/funnelfox/7MZEjMiqWe92YM6g/assets/airwallex-new-webhook.png?fit=max&auto=format&n=7MZEjMiqWe92YM6g&q=85&s=7cef9508f1f12aa71387806fedcfe2d7" width="1357" height="435" data-path="assets/airwallex-new-webhook.png" />
</Frame>

2. Name your webhook.

3. Paste your FunnelFox Payments webhook endpoint into **Notification URL**:

   ```
   https://billing.funnelfox.com/{org_id}/v1/airwallex/webhook
   ```

   Replace `{org_id}` with your organization ID, which looks like
   `live_xxxx000000`. The result looks like this:

   ```
   https://billing.funnelfox.com/live_af123456bb789/v1/airwallex/webhook
   ```

4. Go to **Payment events** under the **Events** section and enable
   `Refund.Accepted` and `payment_attempt.capture_requested`.

<Frame>
  <img src="https://mintcdn.com/funnelfox/7MZEjMiqWe92YM6g/assets/airwallex-events-section.png?fit=max&auto=format&n=7MZEjMiqWe92YM6g&q=85&s=1107f86aaf44cf9ec3970d56d27a8635" width="1920" height="989" data-path="assets/airwallex-events-section.png" />
</Frame>

5. Click **Create**.

6. Open the webhook you just created and copy its **Secret key**.

<Frame>
  <img src="https://mintcdn.com/funnelfox/7MZEjMiqWe92YM6g/assets/airwallex-webhook-secret.png?fit=max&auto=format&n=7MZEjMiqWe92YM6g&q=85&s=a525e8d06e117a789e72021301713e59" width="1881" height="827" data-path="assets/airwallex-webhook-secret.png" />
</Frame>

7. Go to the **Settings** page of your FunnelFox Payments dashboard, paste the
   key into **Airwallex webhook secret**, and press Enter.

<Frame>
  <img src="https://mintcdn.com/funnelfox/7MZEjMiqWe92YM6g/assets/airwallex-webhook-secret-paste.png?fit=max&auto=format&n=7MZEjMiqWe92YM6g&q=85&s=fe6aa21abf0e7708bef5b7c5672e9db5" width="1920" height="989" data-path="assets/airwallex-webhook-secret-paste.png" />
</Frame>

### 4. Set up 3DS

[Adaptive 3DS](/docs/billing/payments-adaptive-3ds) applies authentication only when
a payment needs it. Airwallex needs its own 3DS profile.

First, collect these values from Airwallex:

* **Acquirer BIN**: One per card network (Visa, Mastercard, AMEX, UnionPay).
* **MID**: One per card network.
* **Merchant name**
* **Merchant URL**
* **Merchant country code**: ISO 3166-1 alpha-2, for example `US`.
* **Merchant Category Code (MCC)**

Then request the profile from your FunnelFox Payments dashboard:

1. Go to the **Payment Features** page.

2. Click **Request** to the right of **Adaptive 3DS**.

<Frame>
  <img src="https://mintcdn.com/funnelfox/4S7clAA_4nme-R6x/assets/3ds-request.png?fit=max&auto=format&n=4S7clAA_4nme-R6x&q=85&s=55f26048f49b730374bfc294c103874c" width="1920" height="989" data-path="assets/3ds-request.png" />
</Frame>

3. Complete the form:

   * **Primer Organisation ID**: Find it in the
     [Primer Dashboard](https://dashboard.primer.io/settings/organisation) under
     **Settings > Organisation**.
   * **Processor (PSP)**: Select Airwallex.
   * **Merchant Account**: Find it in the
     [Primer Dashboard](https://dashboard.primer.io/integrations) under
     **Integrations > Airwallex > Merchant Account**.
   * **Display name**: Name for the 3DS profile.
   * **Merchant name**: Name shown in the authentication window.
   * **Merchant URL**: A bare domain like `example.com` is fine.
   * **Country code**: ISO 3166-1 alpha-2, for example `US`.
   * **Merchant Category Code (MCC)**: Exactly 4 digits, for example `5734`.
   * **Card networks**: Select at least one (Visa and Mastercard are selected
     by default). For each selected network, enter:
     * Processor Merchant Account ID (MID)
     * Acquirer BIN

<Tip>
  Optionally, send your Airwallex legal entity name and legal entity ID to your Solutions
  manager at FunnelFox. It speeds up verification on the Airwallex side.
</Tip>

<Frame>
  <img src="https://mintcdn.com/funnelfox/4S7clAA_4nme-R6x/assets/3ds-form.png?fit=max&auto=format&n=4S7clAA_4nme-R6x&q=85&s=fb98b2ab5fbf3b54f83e85128270a075" width="1920" height="989" data-path="assets/3ds-form.png" />
</Frame>

4. Click **Submit request**.

### 5. Pass device data

<Info>
  This step applies only if you build your checkout with the
  [FunnelFox Payments Web SDK](/docs/billing/integration-web-sdk). If you use FunnelFox
  funnels, skip to the next step.
</Info>

Airwallex needs the customer's IP address and device identifier for its fraud
risk assessment. Pass both in the `metadata` field of your
`createClientSession` request:

```json theme={null}
{
  "ipAddress": "1.2.3.4",
  "deviceId": "device_123"
}
```

### 6. Turn on device fingerprinting

1. Go to the **Settings** page of your FunnelFox Payments dashboard.

2. Set **Airwallex device fingerprinting for fraud risk assessment** to **Yes**,
   then press Enter.

<Frame>
  <img src="https://mintcdn.com/funnelfox/7MZEjMiqWe92YM6g/assets/airwalles-risk-enabled.png?fit=max&auto=format&n=7MZEjMiqWe92YM6g&q=85&s=d405c43df79583a8dedee7f79c488932" width="1920" height="989" data-path="assets/airwalles-risk-enabled.png" />
</Frame>

<Check>
  Your Airwallex integration is now complete. Primer can route payments to
  Airwallex, and Airwallex reports refunds and disputes back to Primer and
  FunnelFox Payments.
</Check>

## Next steps

* [Recover failed payments automatically](/docs/billing/payments-retries)
* [Manage payments and process refunds](/docs/billing/payments-management)
* [Secure payment data with tokenization](/docs/billing/payments-tokenization)
