Airwallex logo
Airwallex logo

Native Payment Enablement RFI API

Learn how to use Airwallex's RFI API endpoints to build your own tailored experience for users to handle requests for information (RFI). These endpoints can be used directly for RFIs related to your own account, or RFIs related to your connected accounts (using the x-on-behalf-of header).

Before you begin

Step 1: Get notified of an information request (RFI)

You can receive RFI notifications via the following two methods:

Option 1: RFI webhook notification

Subscribe to our RFI webhook through the Airwallex web app to be notified when your account or one of your connected accounts receives a request for information.

Payload

JSON
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 "type": "PAYMENT_ENABLEMENT"
8 },
9 "created_at": "2023-04-11T07:29:36+0000",
10 "version": "2023-03-31"
11}

Option 2: Query the RFI status via API

Call List all RFIs API to get a list of all open Payment Enablement RFIs across your accounts, your own account and connected accounts.

Example request

Shell
1curl --request GET
2--url
3https://api-demo.airwallex.com/api/v1/rfis?statuses=ACTION_REQUIRED&types=PAYMENT_ENABLEMENT&end_created_at=2023-07-01T01:20:33+0000&from_created_at=2023-06-01T01:20:33+0000
4--header 'Authorization: Bearer <your_bearer_token>'
5

Example response

JSON
1{
2 "items": [
3 {
4 "account_id": "acct_vSeN8KfzOHqCIJYb0xDApw",
5 "active_request": {
6 "created_at": "2024-02-18T03:19:47+0000",
7 "questions": [
8 {
9 "answer": {
10 "type": "TEXT"
11 },
12 "comment": "follow-up",
13 "description": {
14 "en": "Please share a description of your business model, product offering and how you intend to use Airwallex’s online payments functionality (such as invoices, customer links, or in-person products)."
15 },
16 "id": "83aa7ca7-09ae-482a-977a-43217927e6b7",
17 "title": {
18 "en": "Clarify business model"
19 }
20 }
21 ],
22 "updated_at": "2024-02-18T03:19:48+0000"
23 },
24 "answered_requests": [
25 {
26 "created_at": "2024-02-18T03:18:52+0000",
27 "questions": [
28 {
29 "answer": {
30 "text": "business model",
31 "type": "TEXT"
32 },
33 "description": {
34 "en": "Please share a description of your business model, product offering and how you intend to use Airwallex’s online payments functionality (such as invoices, customer links, or in-person products)."
35 },
36 "id": "83aa7ca7-09ae-482a-977a-43217927e6b7",
37 "title": {
38 "en": "Clarify business model"
39 }
40 }
41 ],
42 "updated_at": "2024-02-18T03:19:14+0000"
43 }
44 ],
45 "created_at": "2024-02-18T03:18:52+0000",
46 "id": "2cfb7517-4723-4460-a19e-9b14d571bf38",
47 "status": "ACTION_REQUIRED",
48 "type": "PAYMENT_ENABLEMENT",
49 "updated_at": "2024-02-18T03:19:48+0000"
50 }
51 ],
52 "page_after": "YWZ0ZXI9MTdiYTVhYzktM2FiMC00NmIzLWE4ODctMTNjNmU5NTg2N2Qy",
53 "page_before": "YmVmb3JlPTg0NDg0ODIwLTU0N2UtNDc5YS1iMTY3LTgzYjQwMzcwODQ2ZQ=="
54}

Step 2: Retrieve the RFI details

Call Retrieve an RFI API using the RFI ID returned in Step 1, to retrieve the details of the RFI.

Example request

Shell
1curl --request GET
2--url 'https://api-demo.airwallex.com/api/v1/rfis/2cfb7517-4723-4460-a19e-9b14d571bf38'
3--header 'Authorization: Bearer <your_bearer_token>'
4

Example response

JSON
1{
2 "account_id": "acct_vSeN8KfzOHqCIJYb0xDApw",
3 "active_request": {
4 "created_at": "2024-02-18T03:19:47+0000",
5 "questions": [
6 {
7 "answer": {
8 "type": "TEXT"
9 },
10 "comment": "follow-up",
11 "description": {
12 "en": "Please share a description of your business model, product offering and how you intend to use Airwallex’s online payments functionality (such as invoices, customer links, or in-person products)."
13 },
14 "id": "83aa7ca7-09ae-482a-977a-43217927e6b7",
15 "title": {
16 "en": "Clarify business model"
17 }
18 }
19 ],
20 "updated_at": "2024-02-18T03:19:48+0000"
21 },
22 "answered_requests": [
23 {
24 "created_at": "2024-02-18T03:18:52+0000",
25 "questions": [
26 {
27 "answer": {
28 "text": "business model",
29 "type": "TEXT"
30 },
31 "description": {
32 "en": "Please share a description of your business model, product offering and how you intend to use Airwallex’s online payments functionality (such as invoices, customer links, or in-person products)."
33 },
34 "id": "83aa7ca7-09ae-482a-977a-43217927e6b7",
35 "title": {
36 "en": "Clarify business model"
37 }
38 }
39 ],
40 "updated_at": "2024-02-18T03:19:14+0000"
41 }
42 ],
43 "created_at": "2024-02-18T03:18:52+0000",
44 "id": "2cfb7517-4723-4460-a19e-9b14d571bf38",
45 "status": "ACTION_REQUIRED",
46 "type": "PAYMENT_ENABLEMENT",
47 "updated_at": "2024-02-18T03:19:48+0000"
48}

Step 3: Respond to the RFI

Call Respond to an RFI API to provide the information requested by Airwallex.

Example request

Shell
1curl --request POST
2--url 'https://api-demo.airwallex.com/api/v1/rfis/2cfb7517-4723-4460-a19e-9b14d571bf38/respond'
3--header 'Content-Type: application/json'
4--header 'Authorization: Bearer <your_bearer_token>'
5--data '{
6 "questions": [
7 {
8 "answer": {
9 "text": "text answer is "
10 },
11 "id": "83aa7ca7-09ae-482a-977a-43217927e6b7"
12 }
13 ]
14}'

Step 5: Handle the response

Listen for status changes to the RFI via webhooks. See RFI events.

Error handling

Error codeMessageNext 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_argumentPlease 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
Was this page helpful?