Airwallex logo
Airwallex logo

Collect payments directly

With this model, payments belong to the platform account solely. The platform account is responsible for Payments fees, refunds, and chargebacks. The fund will be split from the platform account to one or many connected accounts. It is recommended for the case where the platform directly interacts with end customers and manages daily transactions. Typical cases include marketplaces or on-demand service platforms.

You can specify which connected account to be associated with a given transaction by using the connected_account_id attribute. The below chart illustrates the process of a standard one-off 100 GBP payment in this model.

collect payments directly

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 with connected account id
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> -d'{
6 "request_id": "ee939540-3203-4a2c-9172-89a566485dd9",
7 "amount": 100,
8 "currency": "GBP",
9 "merchant_order_id": "cc9bfc13-ba30-483b-a62c-ee925fc9bfea",
10 "connected_account_id": "acct_ad1KMcnQM2Wmo2PFSuvR2g"
11}'
  1. Platform confirms payment_intent with normal request body
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> -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}'
  1. Platform captures payment_intent with 100 GBP with normal request body
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> -d'{
6 "request_id": "ee939540-3203-4a2c-9172-89a566485dd9",
7 "amount": 100
8}'
  1. Platform creates FundsSplit with 90 GBP where the source_id equals to payment_intent_id, the destination equals to connected account_id
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> -d'{
6 "request_id": "ee939540-3203-4a2c-9172-89a566485dd9",
7 "source_id": "int_e65tkXCSzJrsMpTrzoFrjaau53",
8 "source_type":"PAYMENT_INTENT",
9 "amount": 90,
10 "destination":"acct_ad1KMcnQM2Wmo2PFSuvR2g",
11 "metadata": {
12 "reason": "disbursement to seller A"
13 }
14}'

In the case where funds need to be split into multiple connected accounts, the platform needs to create multiple FundsSplit to each connected account as a destination.

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> -d'{
6 "request_id": "ee939540-3203-4a2c-9172-89a566485dd9",
7 "source_id": "int_e65tkXCSzJrsMpTrzoFrjaau53",
8 "source_type":"PAYMENT_INTENT",
9 "amount": 40,
10 "destination":"acct_ij2YyjhFNv-BGPsjqHuI3w",
11 "metadata": {
12 "reason": "disbursement to seller A"
13 }
14}'
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> -d'{
6 "request_id": "ee939540-3203-4a2c-9172-89a566485dd9",
7 "source_id": "int_e65tkXCSzJrsMpTrzoFrjaau53",
8 "source_type":"PAYMENT_INTENT",
9 "amount": 35,
10 "destination":"acct_aD5rChdqMoCkSn3WseuKLw",
11 "metadata": {
12 "reason": "disbursement to seller B"
13 }
14}'
  1. Funds will be settled to all parties’ wallets based on split portion, where platform receives 5 GBP (5 GBP Airwallex fees being netted) and connected account receives 90 GBP as disbursement

Note:

If you want to create recurring payments in this model you also need to create a PaymentConsent with connected account id.

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> -d'{
6 "customer_id": "cus_aag4MsYdcgHc9UTjVUS15WPvmoX",
7 "request_id": "88bf9327-0c10-4e87-b050-7c74ef11e1c6",
8 "next_triggered_by": "merchant",
9 "connected_account_id": "acct_ad1KMcnQM2Wmo2PFSuvR2g"
10 "payment_method": {
11 "id": "mtd_0eUIICYocwY8prvHWgWoODiGxPP",
12 "type": "card"
13 },
14}'
Was this page helpful?