Accept Recurring Payments - MB Way
Recurring payments require additional onboarding. Please reach out to your Airwallex account manager or [email protected] to enable recurring payments for MB Way.
When processing a payment for the first time
Step 1: Create a Customer
Create a customer with the Create a Customer APIAPI if the customer is new. Otherwise, this step is optional.
1curl -X POST https://api.sandbox.airwallex.com/api/v1/pa/customers/create \2 -H 'Content-Type: application/json' \3 -H 'Authorization: Bearer {{ACCESS_TOKEN}}' \4 -d '{5 "request_id": "2ed2d823-f8b3-416e-86db-ced8770ce217",6 "merchant_customer_id": "9fafc2fb-4262-4ff8-a205-d60fb4781cb0",7 "first_name": "John",8 "last_name": "Doe",9 "email": "[email protected]",10 "phone_number": "+351912345678"11 }'
Step 2: Create a Payment Intent
Create a Payment Intent with the Create a Payment Intent APIAPI.
1curl -X POST https://api.sandbox.airwallex.com/api/v1/pa/payment_intents/create \2 -H 'Content-Type: application/json' \3 -H 'Authorization: Bearer {{ACCESS_TOKEN}}' \4 -d '{5 "request_id": "82b8e8b9-795a-4ca2-94e2-76fbc5417d05",6 "amount": "0",7 "currency": "EUR",8 "merchant_order_id": "85d7b0e0-7235-11ea-862e-9f6aa1adfca6",9 "return_url": "https://www.airwallex.com"10 }'
Step 3: Confirm the Payment Intent with consent info
When you want the shopper to authorize the recurring payment agreement in the MB Way app, call the Confirm a Payment Intent APIAPI with the Payment Consent info.
payment_consent.terms_of_use.payment_amount_type must be either FIXED or VARIABLE.
- If
payment_amount_typeisFIXED, you must also passfixed_payment_amount,payment_currency,payment_schedule, andbilling_cycle_charge_day. - If
payment_amount_typeisVARIABLE, do not pass those fields.
payment_consent.next_triggered_by must be merchant or customer. If payment_consent.merchant_trigger_reason is included, it must be scheduled or unscheduled.
payment_method.mbway.shopper_phone is required.
Example: payment_amount_type is VARIABLE
1curl -X POST https://api.sandbox.airwallex.com/api/v1/pa/payment_intents/{{PAYMENT_INTENT_ID}}/confirm \2 -H 'Content-Type: application/json' \3 -H 'Authorization: Bearer {{ACCESS_TOKEN}}' \4 -d '{5 "request_id": "fb66c21a-946d-4ed6-869e-3352b44c9cc2",6 "customer_id": "{{CUSTOMER_ID}}",7 "payment_method": {8 "type": "mbway",9 "mbway": {10 "flow": "qrcode",11 "shopper_phone": "+351912345678"12 }13 },14 "payment_consent": {15 "next_triggered_by": "merchant",16 "terms_of_use": {17 "payment_amount_type": "VARIABLE"18 }19 }20 }'
Example: payment_amount_type is FIXED
1curl -X POST https://api.sandbox.airwallex.com/api/v1/pa/payment_intents/{{PAYMENT_INTENT_ID}}/confirm \2 -H 'Content-Type: application/json' \3 -H 'Authorization: Bearer {{ACCESS_TOKEN}}' \4 -d '{5 "request_id": "fb66c21a-946d-4ed6-869e-3352b44c9cc2",6 "customer_id": "{{CUSTOMER_ID}}",7 "payment_method": {8 "type": "mbway",9 "mbway": {10 "flow": "qrcode",11 "shopper_phone": "+351912345678"12 }13 },14 "payment_consent": {15 "next_triggered_by": "merchant",16 "merchant_trigger_reason": "scheduled",17 "terms_of_use": {18 "payment_amount_type": "FIXED",19 "payment_currency": "EUR",20 "fixed_payment_amount": 1,21 "payment_schedule": {22 "period": 7,23 "period_unit": "WEEK"24 },25 "billing_cycle_charge_day": 1226 }27 }28 }'
Once the shopper authorizes the payment in the MB Way app, the Payment Consent will be verified automatically, and Airwallex will notify you of the Payment Consent status asynchronously via the webhook. Please refer to the webhook documentation to set up your webhook accordingly.
Sample response:
1{2 "id": "int_sgsthdj5ghhnow9qovr",3 "request_id": "91a84dcb-aa7f-4815-be4a-e94558591f3b",4 "amount": "0",5 "currency": "EUR",6 "payment_consent_id": "cst_sgstwg7b7hhnow9wc5l",7 "status": "REQUIRES_CUSTOMER_ACTION",8 "captured_amount": 0,9 "created_at": "2026-04-16T10:18:21+0000",10 "updated_at": "2026-04-16T10:18:29+0000",11 "payment_consent": {12 "initial_payment": false,13 "next_triggered_by": "merchant",14 "merchant_trigger_reason": "unscheduled",15 "terms_of_use": {16 "payment_amount_type": "VARIABLE"17 }18 },19 "next_action": {20 "type": "notify_customer_authorization"21 },22 "return_url": "https://www.airwallex.com/"23}
When initiating a subsequent transaction
Step 1: Initialize a Payment Intent
When you are ready to process the subsequent recurring payment, create a Payment Intent with the Create a Payment Intent APIAPI.
1curl -X POST https://api.sandbox.airwallex.com/api/v1/pa/payment_intents/create \2 -H 'Content-Type: application/json' \3 -H 'Authorization: Bearer {{ACCESS_TOKEN}}' \4 -d '{5 "request_id": "ed11e38a-7234-11ea-aa94-7fd44ffd1b89",6 "amount": "5",7 "currency": "EUR",8 "merchant_order_id": "85d7b0e0-7235-11ea-862e-9f6aa1adfca6",9 "return_url": "https://www.airwallex.com"10 }'
Step 2. Complete payment with verified consent
Confirm the subsequent payment with the verified Payment Consent by calling the Confirm a Payment Intent APIAPI.
Sample request:
1curl -X POST https://api.sandbox.airwallex.com/api/v1/pa/payment_intents/{{PAYMENT_INTENT_ID}}/confirm \2 -H 'Content-Type: application/json' \3 -H 'Authorization: Bearer {{ACCESS_TOKEN}}' \4 -d '{5 "request_id": "b9c01d9f-493d-4362-a7f2-c46989814b24",6 "payment_consent_id": "cst_sgstwg7b7hhnow9wc5l"7 }'
Sample response:
1{2 "id": "int_sgst7h5p4hh1e9dhcvo",3 "request_id": "b9c01d9f-493d-4362-a7f2-c46989814b24",4 "amount": "5",5 "currency": "EUR",6 "merchant_order_id": "bae8fca0-c571-4cc3-9a74-af197835ebff",7 "status": "PENDING",8 "captured_amount": 0,9 "created_at": "2026-03-27T04:58:57+0000",10 "updated_at": "2026-03-27T04:59:00+0000",11 "return_url": "https://www.airwallex.com/",12 "base_amount": "5",13 "base_currency": "EUR"14}