Desktop/Mobile Website Browser
Step 1. Initialize a Payment Intent
Create a PaymentIntent object with a request_id
, amount
, currency
and a merchant_order_id
from your backend server.
Step 2: Generate QR and accept payments
When a shopper selects to pay with FPS on their desktop browser, call the following API endpoints to get a QR code in the response, which you can then render on your website.
a. Generate a QR code/Refresh a QR code upon expiry
Request:
Response: Render the value of qrcode
as a QR code on your website for the shopper to scan with his/her Mobile banking app.
b. Wait for notification from Airwallex
Airwallex will notify you the payment result asynchronously via webhook API. Please refer to webhook documentation to set up your webhook accordingly. While it is optional to subscribe to different events, we recommend that you at least subscribe to payment_intent.succeeded
, which notifies you that the shopper completed his/her order and successfully paid through FPS.
c. Query the Payment Intent status (optional)
A QR code expires in 10 minutes once generated. You may query the status of a payment anytime via the PaymentIntents API