Native onboarding verification RFI API
Learn how to use Airwallex's RFI API endpoints to build your own tailored experience for users to handle additional requests for information (RFI).
Before you begin
- Contact your Airwallex Account Manager to enable onboarding verification (RFI) for Connected Accounts using the Native API.
- Obtain your access token by authenticating to Airwallex using your unique Client ID and API key. You will need the access token to make API calls.
- You must be integrated to use Airwallex native API for all other funds flow and payments control.
Step 1: Get notified of the information request (RFI)
You can receive RFI notification via the following two methods:
Option 1: RFI webhook notification
Subscribe to our RFI webhook to be notified when your account or one of your connected accounts receives a request for information.
Payload
1{2 "id": "0a963b8c-c292-48b0-bc96-a424a3cfea6f",3 "name": "rfi.action_required",4 "account_id": "acct_e_2wbiZ3Mx-ynlX-7Qidbg",5 "data": {6 "id": "a72f3483-d600-4d9a-a051-bcbe5126a4b4"7 },8 "created_at": "2023-04-11T07:29:36+0000",9 "version": "2023-03-31"10}
Option 2: Query the RFI status via API
Call List all RFIsAPI to get a list of all open RFIs across your accounts.
Example request
1curl -G https://api.sandbox.airwallex.com/api/v1/rfis \2 -H 'Authorization: Bearer {{ACCESS_TOKEN}}' \3 --data-urlencode 'statuses=ACTION_REQUIRED' \4 --data-urlencode 'types=KYC' \5 --data-urlencode 'end_created_at=2023-07-01T01:20:33 0000' \6 --data-urlencode 'from_created_at=2023-06-01T01:20:33 0000'
Example response
1{2 "items": [3 {4 "account_id": "acct_e_2wbiZ3Mx-ynlX-7Qidbg",5 "active_request": {6 "created_at": "2023-04-12T07:29:36+0000",7 "questions": [8 {9 "answer": {10 "type": "TEXT"11 },12 "comment": "Please provide more information",13 "description": {14 "en": "Information confirmation",15 "zh": "信息确认"16 },17 "id": "ba7bfb51-77bc-4991-b651-0969ece1d263",18 "title": {19 "en": "Information confirmation",20 "zh": "信息确认"21 }22 }23 ],24 "updated_at": "2023-04-14T07:29:36+0000"25 },26 "answered_requests": [27 {28 "created_at": "2023-04-12T07:29:36+0000",29 "questions": [30 {31 "answer": {32 "text": "first answer",33 "type": "TEXT"34 },35 "comment": "Please provide more information",36 "description": {37 "en": "Information confirmation",38 "zh": "信息确认"39 },40 "id": "ba7bfb51-77bc-4991-b651-0969ece1d263",41 "title": {42 "en": "Information confirmation",43 "zh": "信息确认"44 }45 }46 ],47 "updated_at": "2023-04-14T07:29:36+0000"48 }49 ],50 "created_at": "2023-04-11T07:29:36+0000",51 "id": "a72f3483-d600-4d9a-a051-bcbe5126a4b4",52 "status": "ACTION_REQUIRED",53 "type": "KYC",54 "updated_at": "2023-04-12T07:29:36+0000"55 }56 ],57 "page_after": "YWZ0ZXI9MTdiYTVhYzktM2FiMC00NmIzLWE4ODctMTNjNmU5NTg2N2Qy",58 "page_before": "YmVmb3JlPTg0NDg0ODIwLTU0N2UtNDc5YS1iMTY3LTgzYjQwMzcwODQ2ZQ=="59}
Step 2: Retrieve the RFI details
Call Retrieve an RFIAPI to retrieve the details of an RFI using the given RFI ID.
Example request
1curl -G https://api.sandbox.airwallex.com/api/v1/rfis/a72f3483-d600-4d9a-a051-bcbe5126a4b4 \2 -H 'Authorization: Bearer {{ACCESS_TOKEN}}'
Example response
1{2 "account_id": "acct_e_2wbiZ3Mx-ynlX-7Qidbg",3 "active_request": {4 "created_at": "2023-04-12T07:29:36+0000",5 "questions": [6 {7 "answer": {8 "type": "TEXT"9 },10 "comment": "Please provide more information",11 "description": {12 "en": "Information confirmation",13 "zh": "信息确认"14 },15 "id": "ba7bfb51-77bc-4991-b651-0969ece1d263",16 "title": {17 "en": "Information confirmation",18 "zh": "信息确认"19 }20 }21 ],22 "updated_at": "2023-04-14T07:29:36+0000"23 },24 "answered_requests": [25 {26 "created_at": "2023-04-12T07:29:36+0000",27 "questions": [28 {29 "answer": {30 "text": "first answer",31 "type": "TEXT"32 },33 "comment": "Please provide more information",34 "description": {35 "en": "Information confirmation",36 "zh": "信息确认"37 },38 "id": "ba7bfb51-77bc-4991-b651-0969ece1d263",39 "title": {40 "en": "Information confirmation",41 "zh": "信息确认"42 }43 }44 ],45 "updated_at": "2023-04-14T07:29:36+0000"46 }47 ],48 "created_at": "2023-04-11T07:29:36+0000",49 "id": "a72f3483-d600-4d9a-a051-bcbe5126a4b4",50 "status": "ACTION_REQUIRED",51 "type": "KYC",52 "updated_at": "2023-04-12T07:29:36+0000"53}
Step 3: Respond to the RFI
Call Respond to an RFIAPI to provide the additional information requested by Airwallex.
Example request
1curl -X POST https://api.sandbox.airwallex.com/api/v1/rfis/a72f3483-d600-4d9a-a051-bcbe5126a4b4/respond \2 -H 'Content-Type: application/json' \3 -H 'Authorization: Bearer {{ACCESS_TOKEN}}' \4 -d '{5 "questions": [6 {7 "answer": {8 "text": "text answer is "9 },10 "id": "ba7bfb51-77bc-4991-b651-0969ece1d263"11 }12 ]13 }'
Step 4: Handle response
Listen for status changes to the connected account and RFI via webhooks. See connected account events and RFI events.
Error handling
| Error code | Message | Next steps |
|---|---|---|
invalid_state_for_operation | - | Make sure the RFI status is ACTION_REQUIRED |
account_not_authorised_for_operation | - | Make sure the RFI is linked to the correct account |
resource_not_found | - | Make sure you are using the correct RFI ID when querying |
invalid_argument | Please answer all questions in the request/ Please provide your answers in the right format (TEXT vs ATTACHMENT) | Make sure all the RFI questions are answered / and in the right format |