Skip to content

Airwallex Setup & Integration Guide

The airwallex provider integrates Airwallex Payment Links, Multi-Currency Global Acquiring, and Dispute Read Tracking into the Kirak payments runtime across global markets (AUD, HKD, SGD, CNY, GBP, EUR, USD).


Kirak communicates with Airwallex directly via async REST API calls with httpx. No external Airwallex SDK or additional pip package is required.

Terminal window
pip install "kirak"

In the Airwallex Web App:

  1. Navigate to Developer $\rightarrow$ API Keys.
  2. Copy your Client ID.
  3. Generate and copy an API Key.

In Developer $\rightarrow$ Webhooks:

  1. Add a notification URL: https://your-domain.com/payments/webhook/airwallex.
  2. Subscribe to:
    • payment_link.paid
    • refund.accepted, refund.settled, refund.failed
    • All payment_dispute.* events
  3. Copy the webhook Secret.
{
"payments": {
"default_provider": "airwallex",
"providers": {
"airwallex": {
"type": "airwallex",
"environment": "sandbox"
}
}
}
}
Terminal window
KIRAK_PAYMENT_AIRWALLEX_CLIENT_ID=...
KIRAK_PAYMENT_AIRWALLEX_API_KEY=...
KIRAK_PAYMENT_AIRWALLEX_WEBHOOK_SECRET=your_webhook_secret_from_step2

[!NOTE] Automatic Token Caching: Kirak authenticates against POST /api/v1/authentication/login and caches the bearer token in memory until two minutes before expiry (approx. 30 minutes). If Airwallex returns a 401 Unauthorized, Kirak refreshes the token transparently.


result = await kirak.payments.initiate_payment({
"provider": "airwallex",
"user_id": "usr_1000",
"amount": 5000, # $50.00 AUD in cents
"currency": "AUD",
"name": "Global Export Fee",
"type": "one_time",
"payment_email": "buyer@example.com.au",
})
payment_link_url = result["data"]["url"]

Airwallex chargebacks are ingested via webhooks. Administrators can inspect dispute records directly:

dispute = await kirak.payments.get_dispute({
"provider": "airwallex",
"dispute_id": "dis_1234567890",
})

(Contesting evidence via submit_dispute_evidence is not available in Airwallex’s API; evidence must be submitted through the Airwallex web app).


Feature Support Status Notes
One-Time Payment Links Supported Multi-currency global payment methods
Refunds Supported Dispatched via /api/v1/pa/refunds
Dispute Read (get_dispute) Supported Full dispute status query
Dispute Evidence (submit_dispute_evidence) Not Supported Returns 501 NOT_SUPPORTED; use Airwallex dashboard
Subscriptions & Billing Portal Not Supported Returns 501 NOT_SUPPORTED
Saved Payment Methods Not Supported Returns 501 NOT_SUPPORTED

Normalized event Gateway Events Description
payment_completed payment_link.paid Payment link paid successfully
refund_completed refund.settled Refund confirmed and settled
refund_pending refund.accepted Refund accepted by bank
refund_failed refund.failed Refund rejected
dispute_created payment_dispute.created Chargeback initiated
dispute_updated payment_dispute.updated, payment_dispute.closed Dispute status updated