Airwallex logo

Collect payments on behalf of connected accounts

Copy for LLMView as Markdown

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
    1curl -X POST https://api-demo.airwallex.com/api/v1/pa/payment_intents/create \
    2 -H 'Content-Type: application/json' \
    3 -H 'Authorization: Bearer {{ACCESS_TOKEN}}' \
    4 -H 'x-on-behalf-of: acct_ad1KMcnQM2Wmo2PFSuvR2g' \
    5 -d '{
    6 "request_id": "ee939540-3203-4a2c-9172-89a566485dd9",
    7 "merchant_order_id": "cc9bfc13-ba30-483b-a62c-ee925fc9bfea",
    8 "amount": 100,
    9 "currency": "GBP"
    10 }'
  2. Platform confirms payment_intent on behalf of connected account

    Shell
    1curl -X POST https://api-demo.airwallex.com/api/v1/pa/payment_intents/int_e65tkXCSzJrsMpTrzoFrjaa \
    2 -H 'Content-Type: application/json' \
    3 -H 'Authorization: Bearer {{ACCESS_TOKEN}}' \
    4 -H 'x-on-behalf-of: acct_ad1KMcnQM2Wmo2PFSuvR2g' \
    5 -d '{
    6 "request_id": "ee939540-3203-4a2c-9172-89a566485dd9",
    7 "payment_method": {
    8 "card": {
    9 "expiry_month": "12",
    10 "expiry_year": "2030",
    11 "number": "4111111111111111"
    12 }
    13 }
    14 }'
  3. Platform captures payment_intent with 100 GBP on behalf of connected account (you can also skip this process by choosing auto capture)

    Shell
    1curl -X POST https://api-demo.airwallex.com/api/v1/pa/payment_intents/int_e65tkXCSzJrsMpTrzoFrjaa \
    2 -H 'Content-Type: application/json' \
    3 -H 'Authorization: Bearer {{ACCESS_TOKEN}}' \
    4 -H 'x-on-behalf-of: acct_ad1KMcnQM2Wmo2PFSuvR2g' \
    5 -d '{
    6 "request_id": "ee939540-3203-4a2c-9172-89a566485dd9",
    7 "amount": 100
    8 }'
  4. 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
    1curl -X POST https://api-demo.airwallex.com/api/v1/pa/funds_splits/create \
    2 -H 'Content-Type: application/json' \
    3 -H 'Authorization: Bearer {{ACCESS_TOKEN}}' \
    4 -H 'x-on-behalf-of: acct_ad1KMcnQM2Wmo2PFSuvR2g' \
    5 -d '{
    6 "request_id": "ee939540-3203-4a2c-9172-89a566485dd9",
    7 "source_id": "int_e65tkXCSzJrsMpTrzoFrjaau53",
    8 "source_type": "PAYMENT_INTENT",
    9 "amount": 10,
    10 "destination": "acct_ITNg64dHNgihu9rPpWeiMg",
    11 "metadata": {
    12 "reason": "commission agreed with seller A"
    13 }
    14 }'
  5. 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
    1curl -X POST https://api-demo.airwallex.com/api/v1/pa/payment_consents/create \
    2 -H 'Content-Type: application/json' \
    3 -H 'Authorization: Bearer {{ACCESS_TOKEN}}' \
    4 -H 'x-on-behalf-of: acct_ad1KMcnQM2Wmo2PFSuvR2g' \
    5 -d '{
    6 "customer_id": "cus_aag4MsYdcgHc9UTjVUS15WPvmoX",
    7 "request_id": "88bf9327-0c10-4e87-b050-7c74ef11e1c6",
    8 "next_triggered_by": "merchant",
    9 "payment_method": {
    10 "id": "mtd_0eUIICYocwY8prvHWgWoODiGxPP",
    11 "type": "card"
    12 },
    13 "requires_cvc": false
    14 }'
    Shell
    1curl -X POST https://api-demo.airwallex.com/api/v1/pa/payment_consents/cst_u79lnfufjxxfdc0/verify \
    2 -H 'Content-Type: application/json' \
    3 -H 'Authorization: Bearer {{ACCESS_TOKEN}}' \
    4 -H 'x-on-behalf-of: acct_ad1KMcnQM2Wmo2PFSuvR2g' \
    5 -d '{
    6 "request_id": "88bf9327-0c10-4e87-b050-7c74ef11e1c6",
    7 "verification_options": {
    8 "card": {
    9 "amount": 0,
    10 "currency": "GBP",
    11 "cvc": "string"
    12 }
    13 }
    14 }'
Was this page helpful?