Search...
Log inGet started
Airwallex logo
Home
Core API
Payments
Transactional FX
Payouts
Issuing
Back to home
OverviewChoose your payments solutionGet started with payments
Online payments
Online payments overviewGet started with online paymentsHosted Payment Page
Drop-in Element
Embedded Elements
Mobile SDK
Guest user checkout
iOS Airwallex SDK
OverviewBefore you startNative UI Integration
CardRedirectWeChat Pay
Apple Pay
SDK Examples
Android Airwallex SDK
Registered user checkout
Airwallex iOS SDK Privacy Details
Plugins
Native API
Automatic Currency Conversion
Invoice integrations

WeChat Pay

Integration flow for WeChat Pay module

iOS WeChat one-off

Universal Link as returnURL

Please make sure that you provide a Universal Link (not a scheme uri link such as "airwallexcheckout://com.aireallex.payment") as the returnURL when creating a payment session, so that WeChat app can redirect shoppers back to your app as per iOS system security requirements.

  1. (Optional) Create a Customer

    Create a customer object and pass it to your server if you want to save your customer's details and attach payment information to them. (This step is compulsory when you process recurring payment for a new customer)

    From your server, access Airwallex API to Create a Customer API

  2. Create a Payment Intent

    Your client app will need a PaymentIntent to form a payment session for Airwallex SDK to present payment flow.

    From your server, access Airwallex API to Create a Payment Intent API and pass the PaymentIntent returned to client app.

  3. Create an AWXOneOffSession with the PaymentIntent created in the previous step, a returnURL to your app, and shipping address and shopper country code of this order.

    Java
  4. Present payment flow by with the Session created in the last step, Airwallex SDK will handle the rest of the payment process and let you know when the payment flow is completed or cancelled.

    Java
  5. Query WeChat payment result with callback function onResp

    Implement the callback function onResp which will be invoked when the shopper is redirected from WeChat back to your app. The onResp function is declared in WXApiDelegate protocol and can get the payment result directly from WeChat, or you can retrieve the PaymentIntent from you server, afterwards to confirm the payment result.

    Your server can retrieve the Payment Intent API, get the payment result within it and return it to client app.

    Java