Simulate RFI sessions
You can conduct end-to-end testing of your RFI integration by simulating RFI sessions on your Airwallex account in the demo environment. To learn about RFI APIs, see Request for Information.
Key simulation scenarios include:
- Creating an RFI session with predefined or customized questions.
- Adding follow-up questions to an RFI session and/or re-opening existing questions.
- Closing an RFI session.
Create an RFI session
Call Create an RFI API to simulate an RFI session with questions and answers.
Provide the following fields:
type
: The RFI type, for example,KYC
,KYC_ONGOING
,CARDHOLDER
,TRANSACTION
andPAYMENT_ENABLEMENT
.questions
: This field is optional. If omitted, the API initializes the RFI session with system-defined default questions. If provided, only the specified questions are used in the RFI session.answer.type
: The expected response type for the question. Allowed values include:TEXT
,ATTACHMENT
,IDENTITY_DOCUMENT
,CONFIRMATION
,LIVENESS
,ADDRESS
.
Create an RFI with default questions
Create an RFI with specified questions
Follow up on an existing RFI
Create a follow-up on an existing RFI session to test the complete RFI review flow. Raise a follow-up RFI only after all existing questions in the original RFI have been answered, but the answers don't provide sufficient detail, and additional information is still needed. The questions array can contain:
- References to existing questions using their question
id
. These questions will be reopened by this follow-up request. You can find the question ids in the response of any RFI related APIs, for example,GET /api/v1/rfis/{id}
. - New questions with their
answer.type
specified. These questions will be appended to the current RFI.
The API distinguishes between referenced and new questions automatically.
Raise follow-up RFI with new questions
Raise follow-up RFI with existing and new questions
Close an RFI session
Call Close an RFI API endpoint to simulate that the RFI is ready to be resolved because sufficient information has been provided. A successful response returns status as CLOSED
.
Troubleshooting
You might encounter the following errors when simulating RFIs.
Error | Error response | Next steps | |
---|---|---|---|
Create an RFI API | |||
Ongoing RFI case exists | {
|
Close the existing RFI session using Close an RFI API. | |
Invalid RFI Type | {
|
Choose from allowed RFI types: KYC , KYC_ONGOING , CARDHOLDER , TRANSACTION , PAYMENT_ENABLEMENT . |
|
Invalid Answer Type | {
|
Choose from allowed answer types: ADDRESS , ATTACHMENT , CONFIRMATION , IDENTITY_DOCUMENT , LIVENESS , TEXT . |
|
Follow-up RFI API | |||
Invalid status | {
|
Answer all active questions in the given RFI before raising a follow-up RFI. | |
Question not found | {
|
Make sure the question id exists in the RFI. |