Invitation Links
Invitation Links are used by platforms or partners to manage Scale Connect invitation links.
POST /api/v1/accounts/invitation_links/createGET /api/v1/accounts/invitation_links/{id}
Create an account invitation link
POST /api/v1/accounts/invitation_links/create
Id of Airwallex account to be invited. Required for scale_connect mode, optional for oauth2 mode. When provided, account must already be connected to partner or platform.
Invitation link mode. One of oauth2, scale_connect.
OAuth parameters, if invitation link mode is oauth2
The platform callback URL redirected to after auth.
This tells the Airwallex authorization server that the platform is initiating a Scale Invitation Link flow with OAuth mode. One of code.
The permissions the platform is requesting from the user.
The platform generates a random string and includes it in the request. It should then check that the same value is returned after the user authorizes the app. Max length is 100 characters.
Scale connect parameters, if invitation link mode is scale_connect
The platform callback URL redirected to after scale connect.
A set of key-value pairs that you can attach to an Account object. This can be useful for storing additional information about the account in a structured format. You can specify up to 5 keys, with key names up to 20 characters long and values up to 150 characters long.
The identifier that the platform uses to identify a merchant, usually a unique merchant identifier. In oauth2 mode, identifier will be included in the query parameter when redirecting a user back to the client's redirect_uri. Max length is 1000 characters.
Data pre-filled by platform during new user signup.
the field name of pre filled form data
email, first_name, last_name, mobile_number, business_name, country, contact_name
The field value of pre-filled form data.
Whether the platform has verified the value.
Whether the user can edit the value.
Invite Airwallex account Id.
Time the account link was created.
Time the account link will expire.
Airwallex account link unique identifier.
The identifier that the platform uses to identify a merchant, usually a unique merchant identifier. In oauth2 mode, identifier will be included in the query parameter when redirecting a user back to the client's redirect_uri. Max length is 1000 characters.
A set of key-value pairs that you can attach to an Account object. This can be useful for storing additional information about the account in a structured format. You can specify up to 5 keys, with key names up to 20 characters long and values up to 150 characters long.
Invitation link mode.
OAuth parameters, if invitation link mode is oauth2
The platform callback URL redirected to after auth.
This tells the Airwallex authorization server that the platform is initiating a Scale Invitation Link flow with OAuth mode. One of code.
The permissions the platform is requesting from the user.
The platform generates a random string and includes it in the request. It should then check that the same value is returned after the user authorizes the app. Max length is 100 characters.
Data pre-filled by platform during new user signup.
the field name of pre filled form data
email, first_name, last_name, mobile_number, business_name, country, contact_name
The field value of pre-filled form data.
Whether the platform has verified the value.
Whether the user can edit the value.
Scale connect parameters, if invitation link mode is scale_connect
The platform callback URL redirected to after scale connect.
URL provided by Airwallex for the end user to use in order to complete their OAuth 2.0 authorization.
| Error status | Description |
|---|---|
| 400 | Possible errors: |
| 401 | Possible errors: |
| 429 | Too many requests |
| 500 | Service unavailable |
$curl --request POST \> --url 'https://api-demo.airwallex.com/api/v1/accounts/invitation_links/create' \> --header 'Authorization: Bearer {{ACCESS_TOKEN}}' \> --header 'Content-Type: application/json' \> --data '{> "account_id": "acct_hm-QFRVYO4-InXeIsCPKOg",> "mode": "oauth2",> "oauth2": {> "redirect_uri": "https://oauth.pstmn.io/v1/callback",> "response_type": "code",> "scope": [> "r:awx_action:balances_view",> "r:awx_action:settings.account_details_view"> ],> "state": "xcoiv98y2kd22vusuye3kch"> },> "scale_connect": {> "redirect_uri": "https://www.pstmn.io/v1/callback"> },> "metadata": {> "id": "1"> },> "identifier": "2fe425fd",> "prefilled_formdata": [> {> "field": "email",> "value": "[email protected]",> "verified": true,> "editable": false> }> ]>}'
1{2 "account_id": "acct_hm-QFRVYO4-InXeIsCPKOg",3 "created_at": "2021-07-13T15:56:57.006071Z",4 "expire_at": "2021-08-12T15:56:57.006071Z",5 "id": "link_V8CoOYobPMyBKyL-S59DtA",6 "identifier": "2fe425fd",7 "metadata": {8 "id": "1"9 },10 "mode": "oauth2",11 "oauth2": {12 "redirect_uri": "https://oauth.pstmn.io/v1/callback",13 "response_type": "code",14 "scope": [15 "r:awx_action:balances_view",16 "r:awx_action:settings.account_details_view"17 ],18 "state": "xcoiv98y2kd22vusuye3kch"19 },20 "prefilled_formdata": [21 {22 "field": "email",23 "value": "[email protected]",24 "verified": true,25 "editable": false26 }27 ],28 "scale_connect": {29 "redirect_uri": "https://www.pstmn.io/v1/callback"30 },31 "url": "https://demo.airwallex.com/connect/scale?invitationId=link_V8CoOYobPMyBKyL-S59DtA"32}
Get an account invitation link by ID
GET /api/v1/accounts/invitation_links/{id}
Airwallex invitation link unique identifier
Invite Airwallex account Id.
Time the account link was created.
Time the account link will expire.
Airwallex account link unique identifier.
The identifier that the platform uses to identify a merchant, usually a unique merchant identifier. In oauth2 mode, identifier will be included in the query parameter when redirecting a user back to the client's redirect_uri. Max length is 1000 characters.
A set of key-value pairs that you can attach to an Account object. This can be useful for storing additional information about the account in a structured format. You can specify up to 5 keys, with key names up to 20 characters long and values up to 150 characters long.
Invitation link mode.
OAuth parameters, if invitation link mode is oauth2
The platform callback URL redirected to after auth.
This tells the Airwallex authorization server that the platform is initiating a Scale Invitation Link flow with OAuth mode. One of code.
The permissions the platform is requesting from the user.
The platform generates a random string and includes it in the request. It should then check that the same value is returned after the user authorizes the app. Max length is 100 characters.
Data pre-filled by platform during new user signup.
the field name of pre filled form data
email, first_name, last_name, mobile_number, business_name, country, contact_name
The field value of pre-filled form data.
Whether the platform has verified the value.
Whether the user can edit the value.
Scale connect parameters, if invitation link mode is scale_connect
The platform callback URL redirected to after scale connect.
URL provided by Airwallex for the end user to use in order to complete their OAuth 2.0 authorization.
| Error status | Description |
|---|---|
| 400 | Possible errors: |
| 401 | Possible errors: |
| 429 | Too many requests |
| 500 | Service unavailable |
$curl --request GET \> --url 'https://api-demo.airwallex.com/api/v1/accounts/invitation_links/invitation_link_id' \> --header 'Authorization: Bearer {{ACCESS_TOKEN}}' \> --header 'Content-Type: application/json'
1{2 "account_id": "acct_hm-QFRVYO4-InXeIsCPKOg",3 "created_at": "2021-07-13T15:56:57.006071Z",4 "expire_at": "2021-08-12T15:56:57.006071Z",5 "id": "link_V8CoOYobPMyBKyL-S59DtA",6 "identifier": "2fe425fd",7 "metadata": {8 "id": "1"9 },10 "mode": "oauth2",11 "oauth2": {12 "redirect_uri": "https://oauth.pstmn.io/v1/callback",13 "response_type": "code",14 "scope": [15 "r:awx_action:balances_view",16 "r:awx_action:settings.account_details_view"17 ],18 "state": "xcoiv98y2kd22vusuye3kch"19 },20 "prefilled_formdata": [21 {22 "field": "email",23 "value": "[email protected]",24 "verified": true,25 "editable": false26 }27 ],28 "scale_connect": {29 "redirect_uri": "https://www.pstmn.io/v1/callback"30 },31 "url": "https://demo.airwallex.com/connect/scale?invitationId=link_V8CoOYobPMyBKyL-S59DtA"32}