# Withdrawal RFIs ## Workflow | Step | Description | Request | | --- | --- | --- | | 1 | RFI Requested | If Rail requires more information on a withdrawal it will request a document to be uploaded to the withdrawal. | | 2 | RFI Notification (Webhook) | Client can subscribe to the `WITHDRAWAL_CHANGES_REQUESTED` webhook event to receive realtime notifcations when an RFI occurs. This webhook contains the withdrawal id the RFI is related to. | | 3 | Understanding RFI Requirement (Retrieve Withdrawal Status) | Provide information related the relationship between two entities. | | 4 | Repond to RFI (Upload Document to Withdrawal) | Clients can use the Retrive Withdrawal Status endpoint to understand what is required to satisfy the RFI. The response of Retrieve Withdrawal Status will show that the status of the withdrawal is `CHANGES_REQUESTED`. The response will also list the 'errors' that need to be satisfied before the withdrawal can continue processing. For withdrawals, the request will usually require clients to upload a proof of payment (invoice) to the withdrawal in question. The `document_errors` block of the response will contain a `document_id` for clients to upload the invoice to. | | 5 | Finish Processing the Withdrawal | Once the document is uploaded, and Rail is satisfied with the information provided, the status of the withdrawal will be updated to `IN_PROGRESS` and the withdrawal will be processed. Once the withdrawal is processed the withdrawal status will change to `EXECUTED`. | ## Scenarios - Sequence Diagrams ### Scenario 1 - Up Front RFI Scenario where the Rail requires additional information to be provided on the withdrawal BEFORE the withdrawal can be accepted and processed. | Action | Withdrawal Status | | --- | --- | | Request withdrawal | `REQUESTED` | | RFI is required for withdrawal | `CHANGES_REQUESTED` | | Client uploads document to withdrawal. Withdrawal can now be Accepted. | `REQUESTED` | | Accept withdrawal | `ACCEPTED` | | Withdrawal waiting for approval | `AUTHORIZED` | | Withdrawal is approved | `APPROVED` | | Withdrawal begins processing | `IN_PROGRESS` | | Withdrawal successfully sent | `EXECUTED` | Withdrawal Lifecycle - Pre-Accept RFI ### Scenario 2 - In Progress RFI Scenario where the Rail requires additional information to be provided on the withdrawal that is already in progress. | Action | Withdrawal Status | | --- | --- | | Request withdrawal | `REQUESTED` | | Accept withdrawal | `ACCEPTED` | | Withdrawal waiting for approval | `AUTHORIZED` | | Withdrawal is approved | `APPROVED` | | Withdrawal begins processing | `IN_PROGRESS` | | RFI is required for withdrawal | `CHANGES_REQUESTED` | | Client uploads all documents. that is accepted. RFI review begins. | `IN_REVIEW` | | RFI response is accepted. Withdrawal begins processing again. | `IN_PROGRESS` | | Withdrawal successfully sent | `EXECUTED` | Withdrawal Lifecycle - In Progress RFI