Skip to Content

Airwallex Payment

Momen integrates Airwallex Drop-in for multi-currency one-off payments, recurring payments, and refunds. Before continuing, read the Payment Overview, prepare an order table, and understand how generated Webhook Actionflows confirm final results.

Set up Airwallex

Prepare an Airwallex account

Sign in to the Airwallex demo environment or production environment. Under Settings → Developers → API Keys, create an API key and save the Client ID. The API key is shown only when it is created; regenerate it if it is lost.

Create an API key in the Airwallex dashboard

Find the Client ID and API key in the Airwallex dashboard

If the account uses a legal entity or linked payment account, obtain the Legal entity ID and Linked payment account ID under Settings → Entities.

Find the Legal entity ID in the Airwallex dashboard

Find the Linked payment account ID in the Airwallex dashboard

Activate Airwallex

Open Action → Payment → Airwallex (Web) and select Activate. If this is the project’s first gateway, select the order table.

After activation, open the generated Airwallex Payment Processing Actionflow from Related Actionflows. Select its Webhook Trigger and copy the Webhook URL.

Create the Airwallex webhook

Under Settings → Webhooks in Airwallex, create a Webhook with:

Create a Webhook in the Airwallex dashboard

  • API version: Enter the fixed value 2025-11-11.
  • Account: Select the account represented by the Linked payment account ID, or the current collection account when no linked account is used.
  • Notification URL: Paste the Webhook URL from the Airwallex Payment Processing Actionflow.
  • Events: Select the following events.
payment_intent.succeeded payment_intent.cancelled invoice.finalized subscription.in_trial subscription.active subscription.unpaid subscription.cancelled subscription.modified refund.accepted refund.failed

Set the Webhook version, account, and events in Airwallex

Copy the Webhook secret after creating the Webhook.

Copy the Webhook secret from Airwallex

Enter the payment settings

SettingRequiredDescription
EnvironmentYesDEMO for testing or PROD for production
Client IDYesAirwallex Client ID
API keyYesAirwallex API key
Webhook secretYesSecret from the Airwallex Webhook
Legal entity IDNoRequired only when a legal entity is used
Linked payment account IDNoRequired only when a linked payment account is used

Save and publish the payment configuration, system tables, Actionflows, and frontend changes. Do not mix demo credentials with the production environment.

Webhook processing

Payment, refund, and subscription events share the generated Airwallex Payment Processing Actionflow. It parses the event, updates the relevant system table, and routes the event to payment, refund, subscription-status, or renewal processing.

Airwallex may deliver the same Webhook more than once. Run the corresponding business logic only when alreadyProcessed is false.

This value protects the system payment record only. Use order-state conditions, unique constraints, or another idempotency mechanism for fulfillment, entitlement delivery, and inventory changes.

One-off payments

Create an order and add the action

Create an order in the bound order table, then add Airwallex → One-off payment from the Payment category under a page or component Trigger.

ParameterTypeRequiredDescription
Order idIntegerYesID of the order record in the bound table
CurrencyTextYesCurrency code supported by Airwallex, such as USD or HKD
AmountDecimalYesAmount in the major currency unit; enter 10 for USD 10

Disable or debounce the payment button until the action returns or checkout closes to avoid opening multiple checkouts.

The action’s On success branch means the frontend call returned successfully and cannot contain data mutations. Confirm the final payment result through the Webhook.

Handle the payment webhook

The Sync Payment Status node exposes:

ResultTypeDescription
orderIdIntegerRelated order ID
paymentIdIntegerPayment record ID
recurringPaymentIdIntegerSubscription ID for a recurring charge; may be empty for a one-off payment
paymentStatusTextSUCCESSFUL or CANCELLED
alreadyProcessedBooleanWhether the same state was already processed

Run successful fulfillment only when paymentId is present, paymentStatus is SUCCESSFUL, and alreadyProcessed is false. Compare the payment amount and currency with the trusted order first.

Refunds

Restrict permissions and add the action

Refund actions should not be available to regular users. Under Settings → Permissions → Payment, enable Airwallex refunds only for a trusted administrator role.

Add Airwallex → Refund from the Payment category:

ParameterTypeRequiredDescription
Payment idIntegerYesID of the payment record, not the order ID
Refund amountDecimalYesAmount in the original payment’s major currency unit; cumulative refunds cannot exceed the payment amount

Check successful refund records and the cumulative refunded amount before starting another refund.

Handle the refund webhook

The Sync Refund Status node exposes:

ResultTypeDescription
orderIdIntegerRelated order ID
refundIdIntegerRefund record ID
paymentIdIntegerOriginal payment record ID
recurringPaymentIdIntegerSubscription ID for a recurring-charge refund
statusTextREFUNDED or FAILED
alreadyProcessedBooleanWhether the same refund state was already processed

Handle the result only when refundId is present and alreadyProcessed is false.

Recurring payments

Create a product and recurring Price under Billing → Products in Airwallex, then copy its Price ID.

Start a subscription

Add Airwallex → Recurring payment → Initiate.

ParameterTypeRequiredDescription
Order idIntegerYesID of the first subscription order
Price IDTextYesAirwallex recurring Price ID

The frontend branches represent the subscription authorization interaction. Treat the status synchronized by the Webhook as the actual activation result.

Cancel a subscription

Add Airwallex → Recurring payment → Cancel and bind the Recurring payment id from recurring_payment.

Handle subscription status

Airwallex Payment Processing receives subscription.in_trial, subscription.active, subscription.unpaid, subscription.cancelled, and subscription.modified, then updates recurring_payment.

The synchronization result includes recurringPaymentId and status. Stored states include INCOMPLETE, TRIALING, ACTIVE, UNPAID, and CANCELED. subscription.modified is a Webhook event, not a stored status named MODIFIED.

Enable, pause, or revoke subscription benefits in the ACTIVE, CANCELED, or other state branches required by your product.

Create renewal orders

An invoice.finalized event starts renewal processing. Momen obtains or creates the current payment record from the Invoice ID and opens the Airwallex Subscription Renewal Processing Actionflow.

In the reserved order-creation section:

  1. Create the period’s business order from the first subscription order and fill in its amount, account, and other fields.
  2. Pass the new order ID to the following system step so the current payment record is associated with it.
  3. Fulfill the period only after the corresponding payment status is confirmed.

The template checks whether the current payment already has an order ID to avoid creating the renewal order twice. Any additional business nodes still require their own idempotency controls.

Troubleshooting

  1. Webhook verification fails: Check the Notification URL, Webhook secret, API version, and selected account against the Momen configuration.
  2. Payment status does not update: Confirm that all required events are selected and the Airwallex Payment Processing Actionflow is published.
  3. A cancelled payment enters the other branch: The one-off cancellation status is CANCELLED, not FAILED.
  4. Authorization completes but benefits remain inactive: Use the ACTIVE state in recurring_payment, not the frontend success branch.
  5. A renewal has a payment record but no order: Configure the order-creation node in Airwallex Subscription Renewal Processing.
Last updated on