Airwallex logo
Airwallex logo

Collect payments on behalf of connected accounts

With this model, payments belong to your connected account instead of you as the platform. The connected account is responsible for Payments fees, refunds, and chargebacks. The fund will be split from a connected account to a platform account. It is recommended for the case where the connected account directly interacts with end customers and manages daily transactions, while the platform has limited engagement in every transaction. Typical case includes SaaS platforms.

In this model, the platform will submit all the payments on behalf of the connected account to Airwallex. In order to indicate this relation, you need to specify the account ID of the connected account with the x-on-behalf-of header.

The below chart illustrates the process of a standard one-off 100 GBP payment in this model. on behalf of connected accounts

Note:

In the case of Hosted Payment Page/Embedded Fields/Drop-in/Mobile Integration, platform can bypass step 2&3 but needs to create the FundsSplit request after receiving notifications that the payment is successfully captured.

  1. Platform creates payment_intent with 100 GBP on behalf of connected account with id "acct_ad1KMcnQM2Wmo2PFSuvR2g"
Shell
1$ curl --request POST \
2> 'https://api-demo.airwallex.com/api/v1/pa/payment_intents/create' \
3> -H 'Content-Type: application/json' \
4> -H 'Authorization: Bearer eyJhbGciOiJIUzI1NiJ9.eyJzdWIiOiJ0b20iLCJyb2xlcyI6WyJ1c2VyIl0sImlhdCI6MTQ4ODQxNT I1NywiZXhwIjoxNDg4NDE1MjY3fQ.UHqau03y5kEk5lFbTp7J4a-U6LXsfxIVNEsux85hj-Q' \
5> -H 'x-on-behalf-of: acct_ad1KMcnQM2Wmo2PFSuvR2g \
6> -d'{
7 "request_id": "ee939540-3203-4a2c-9172-89a566485dd9",
8 "merchant_order_id": "cc9bfc13-ba30-483b-a62c-ee925fc9bfea",
9 "amount": 100,
10 "currency": "GBP"
11}'
  1. Platform confirms payment_intent on behalf of connected account
Shell
1$ curl --request POST \
2> 'https://api-demo.airwallex.com/api/v1/pa/payment_intents/int_e65tkXCSzJrsMpTrzoFrjaa u53/confirm' \
3> -H 'Content-Type: application/json' \
4> -H 'Authorization: Bearer eyJhbGciOiJIUzI1NiJ9.eyJzdWIiOiJ0b20iLCJyb2xlcyI6WyJ1c2VyIl0sImlhdCI6MTQ4ODQxNT I1NywiZXhwIjoxNDg4NDE1MjY3fQ.UHqau03y5kEk5lFbTp7J4a-U6LXsfxIVNEsux85hj-Q' \
5> -H 'x-on-behalf-of: acct_ad1KMcnQM2Wmo2PFSuvR2g \
6> -d'{
7 "request_id": "ee939540-3203-4a2c-9172-89a566485dd9",
8 "payment_method": {
9 "card": {
10 "expiry_month": "12",
11 "expiry_year": "2030",
12 "number": "4111111111111111"
13 }
14 }
15}'
  1. Platform captures payment_intent with 100 GBP on behalf of connected account (you can also skip this process by choosing auto capture)
Shell
1$ curl --request POST \
2> 'https://api-demo.airwallex.com/api/v1/pa/payment_intents/int_e65tkXCSzJrsMpTrzoFrjaa u53/capture’ \
3> -H 'Content-Type: application/json' \
4> -H 'Authorization: Bearer eyJhbGciOiJIUzI1NiJ9.eyJzdWIiOiJ0b20iLCJyb2xlcyI6WyJ1c2VyIl0sImlhdCI6MTQ4ODQxNT I1NywiZXhwIjoxNDg4NDE1MjY3fQ.UHqau03y5kEk5lFbTp7J4a-U6LXsfxIVNEsux85hj-Q' \
5> -H 'x-on-behalf-of: acct_ad1KMcnQM2Wmo2PFSuvR2g \
6> -d'{
7 "request_id": "ee939540-3203-4a2c-9172-89a566485dd9",
8 "amount": 100
9}'
  1. Platform creates FundsSplit with 10 GBP on behalf of connected account, where the source_id equals to payment_intent_id, and destination equals to platform account’s own account_id. Platform can use metadata to record values that help better recognition of each split
Shell
1$ curl --request POST \
2> 'https://api-demo.airwallex.com/api/v1/pa/funds_splits/create' \
3> -H 'Content-Type: application/json' \
4> -H 'Authorization: Bearer eyJhbGciOiJIUzI1NiJ9.eyJzdWIiOiJ0b20iLCJyb2xlcyI6WyJ1c2VyIl0sImlhdCI6MTQ4ODQxNT I1NywiZXhwIjoxNDg4NDE1MjY3fQ.UHqau03y5kEk5lFbTp7J4a-U6LXsfxIVNEsux85hj-Q' \
5> -H 'x-on-behalf-of: acct_ad1KMcnQM2Wmo2PFSuvR2g \
6> -d'{
7 "request_id": "ee939540-3203-4a2c-9172-89a566485dd9",
8 "source_id": "int_e65tkXCSzJrsMpTrzoFrjaau53",
9 "source_type":"PAYMENT_INTENT",
10 "amount": 10,
11 "destination":"acct_ITNg64dHNgihu9rPpWeiMg",
12 "metadata": {
13 "reason": "commission agreed with seller A"
14 }
15}'
  1. Funds will be settled to both parties’ wallets based on split portion, where platform receives 10 GBP as commission and connected account receives 85 GBP (5 GBP Airwallex fees being netted)

Note:

If you want to create recurring payments in this model you also need to create and verify a PaymentConsent on behalf of connected account.

&nbsp

Shell
1$ curl --request POST \
2> 'https://api-demo.airwallex.com/api/v1/pa/payment_consents/create' \
3> -H 'Content-Type: application/json' \
4> -H 'Authorization: Bearer eyJhbGciOiJIUzI1NiJ9.eyJzdWIiOiJ0b20iLCJyb2xlcyI6WyJ1c2VyIl0sImlhdCI6MTQ4ODQxNT I1NywiZXhwIjoxNDg4NDE1MjY3fQ.UHqau03y5kEk5lFbTp7J4a-U6LXsfxIVNEsux85hj-Q' \
5> -H 'x-on-behalf-of: acct_ad1KMcnQM2Wmo2PFSuvR2g \
6> -d'{
7 "customer_id": "cus_aag4MsYdcgHc9UTjVUS15WPvmoX",
8 "request_id": "88bf9327-0c10-4e87-b050-7c74ef11e1c6",
9 "next_triggered_by": "merchant",
10 "payment_method": {
11 "id": "mtd_0eUIICYocwY8prvHWgWoODiGxPP",
12 "type": "card"
13 },
14 "requires_cvc": false
15}'
Shell
1$ curl --request POST \
2> 'https://api-demo.airwallex.com/api/v1/pa/payment_consents/cst_u79lnfufjxxfdc0/verify' \
3> -H 'Content-Type: application/json' \
4> -H 'Authorization: Bearer eyJhbGciOiJIUzI1NiJ9.eyJzdWIiOiJ0b20iLCJyb2xlcyI6WyJ1c2VyIl0sImlhdCI6MTQ4ODQxNT I1NywiZXhwIjoxNDg4NDE1MjY3fQ.UHqau03y5kEk5lFbTp7J4a-U6LXsfxIVNEsux85hj-Q' \
5> -H 'x-on-behalf-of: acct_ad1KMcnQM2Wmo2PFSuvR2g \
6> -d'{
7 "request_id": "88bf9327-0c10-4e87-b050-7c74ef11e1c6",
8 "verification_options": {
9 "card": { \
10 "amount": 0,
11 "currency": "GBP",
12 "cvc": "string"
13 }
14 }
15}'
Was this page helpful?