# Webhook

<figure><img src="/files/zztXBkqfiwE4O5lT0cd6" alt=""><figcaption></figcaption></figure>

Below are the types of notifications we currently send out.

**NOTE**: The webhook URL should respond with a **200** status-code once notified successfully.

| EventType                       | Description                                                                                                                                       |
| ------------------------------- | ------------------------------------------------------------------------------------------------------------------------------------------------- |
| **Withdrawal Approval**         | When a customer requests a withdrawal from their investment account, a notification is sent once the withdrawal is approved.                      |
| **Disbursement Approval**       | A notification is sent when a loan application is either approved or rejected after the final review.                                             |
| **Loan Repayment**              | A webhook notification is triggered whenever a payment is made towards a loan, indicating that a repayment transaction has occurred for the loan. |
| **Payout Outward Transaction**  | Webhook notification for payout outward transfer.                                                                                                 |
| Virtual Account Inflow (Credit) | Webhook notification when there is an inflow into a virtual account.                                                                              |

<details>

<summary><strong>Disbursement Approval Notification Format</strong></summary>

```json
{
    "Event": "DisbursementApproval",
    "Status": "Approved", // Active, Rejected, Submitted_and_awaiting_approval
    "Environment": "Development", // "Production"
    "AggregatorId": 29,
    "EventId": 2,
    "WebhookData": {
        "Amount": 2940,
        "LoanReferenceNumber": "31B7DEA42A",
        "LoanEffectiveDate": "2024-01-26T00:00:00",
        "LoanStatus": "Approved", // Active, Rejected, Submitted_and_awaiting_approval
        "CustomerId": 1127,
        "CustomerDisbursementAccount": {
            "CustomerBankName": "Keystone Bank",
            "CustomerAccountName": "Femi Zack",
            "CustomerAccountNumber": "1111111103"
        },
        "CustomerRepaymentAccount": {
            "CustomerBankName": "VFD",
            "CustomerAccountName": "Advancly -Busquets Hanma",
            "CustomerAccountNumber": "1001603400"
        }
    }
}
```

</details>

<details>

<summary><strong>Loan Repayment Notification Format</strong></summary>

```json
{
    "Event": "LoanRepayment",
    "Status": "Active", // Closed, WrittenOff, Rescheduled
    "Environment": "Staging", // "Production"
    "AggregatorId": 29,
    "EventId": 2,
    "Data": {
        "Amount": 2940,
        "LoanReferenceNumber": "31B7DEA42A",
        "LoanEffectiveDate": "2024-01-26T00:00:00",
        "LoanStatus": "Active", // Closed, WrittenOff, Rescheduled
        "CustomerId": 1127
    }
}
```

</details>

<details>

<summary><strong>Payout Outward Transaction Notification Format</strong></summary>

```json
{
    "Event": "PayoutOutwardTransaction",
    "Status": "Completed", // Processing, Completed, Failed
    "Environment": "Staging", // "Production"
    "AggregatorId": 11,
    "EventId": 4,
    "WebhookData": {
        "Currency": "NGN",
        "TransactionReference": "Advancly-HAUUSIKSNJWUWJSN617288292814A",
        "SessionId": null,
        "Narration": "Glorious test battle/Advancly-HAUUSIKSNJWUWJSN617288292814A",
        "TransactionStatus": "Completed",
        "Amount": 1200,
        "TransactionCharge": 0,
        "TransactionDate": "2025-05-07T06:15:50.2642157+00:00"
    },
}
```

</details>

<details>

<summary><strong>Virtual Account Inflow (Credit) Notification Format</strong></summary>

```json
{
    "WebhookData": {
        "SenderAccountName": "S and G catering and events",
        "SenderAccountNumber": "9781926613",
        "SenderBankName": "Advancly MFB",
        "SenderBankCode": "999461",
        "RecipientAccountNumber": "0012101032",
        "RecipientAccountName": "Nini - Emeka Smith",
        "TransactionReference": "Onj-311ytweuyy24",
        "SessionId": null,
        "Narration": "Test/Onj-311ytweuyy24",
        "Amount": 10205,
        "TransactionDate": "2026-02-24T17:30:28.8066174+00:00"
    },
    "Event": "VirtualAccountInflow",
    "Status": "Success",
    "ResponseCode": "00",
    "ResponseMessage": "Successful",
    "Environment": "Staging",
    "AggregatorId": 707,
    "EventId": 5
}
```

</details>


---

# Agent Instructions: Querying This Documentation

If you need additional information that is not directly available in this page, you can query the documentation dynamically by asking a question.

Perform an HTTP GET request on the current page URL with the `ask` query parameter:

```
GET https://docs.advancly.com/webhook.md?ask=<question>
```

The question should be specific, self-contained, and written in natural language.
The response will contain a direct answer to the question and relevant excerpts and sources from the documentation.

Use this mechanism when the answer is not explicitly present in the current page, you need clarification or additional context, or you want to retrieve related documentation sections.
