# Virtual Account Webhook

You can configure webhook endpoints via the API to be notified about events that happen in your 1app account or connected accounts.

To receive webhook requests, you have to set up your webhook URL on your account dashboard.

Once the webhook registration for an event is completed, you will receive webhook requests at the destination URL you provided each time a transaction occurs on your account.

When your webhook URL receives an event, it needs to parse and acknowledge the event. Acknowledging an event means returning an <mark style="background-color:green;">`200 OK`</mark> in the HTTP header. Without a `200 OK` in the response header, we flagged it as a failed attempt, we’ll keep sending events for the next 48 hours at 30-minute interval upon the first failure to acknowledge the event with <mark style="background-color:green;">`200 OK.`</mark>

Creating a Webhook endpoint can be easily done on your dashboard by following these steps.

* [ ] Log in to the 1app Dashboard and click on the **Settings** page, then the **Developers** tab.
* [ ] Click on the **Developers** tab.
* [ ] Fill in the required details for your webhook.
* [ ] Once complete, click the save changes to save the setup.
* [ ] Test your webhook to ensure you’re getting the JSON body and returning a `200 OK` HTTP response

### **Transaction Type**

In order to know the transaction type you are getting notification for, check the <mark style="color:red;">**paid\_through**</mark> field on the webhook notification response as stated below.&#x20;

* [ ] **dedicatedAccount**: Notification for virtual account/dedicated account transaction
* [ ] **paylink**: Notification for payment through our checkout/payment link

### Sample Request&#x20;

```json
{
    "event_type": "transactions",
    "event_status": "success",
    "AccountNo": "0123456789",
    "paid_through": "dedicatedAccount",
    "trans_status": "01",
    "transmode": "live",
    "Reference": "957421812B73017",
    "SourceName": "Jogh PETER",
    "AmountPaid": "50000",
    "SettledAmount": 4975,
    "Charged": 25,
    "TrackingID": "0150240",
    "TrackingRef": "0150240",
    "AccountRef": "50240",
    "ClientID": "019",
    "transactionType": "Credit",
    "Narration": "FROM UBA Jogh PETER UNOGWU-USSD-NIPTo 1APPDARAD-john U 23470XXXX3031000004240815123139004464292797",
    "CustomerDetails": {
        "AccountName": "",
        "AccountNo": "0123456789",
        "BankName": "Providus Bank",
        "TrackingId": "0150240"
    },
    "SourceDetails": {
        "SourceName": "Jogh PETER",
        "SourceAcct": "0219110003",
        "SourceBank": "UNITED BANK FOR AFRICA",
        "Narration": "FROM UBA Jogh PETER-USSD-NIPTo 1APPDARAD-PETER U 23470XXXX3031000004240815123139004464292797"
    },
    "transerror": "0"
}
```


---

# 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.1app.online/virtual-accounts/virtual-account-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.
