# Event Notification

This is the API that should be created by platform to receive notifications from NeoX including created virtual accounts and transaction events.

## Configuration

<figure><img src="https://content.gitbook.com/content/uIGO9I55gtHjY6deHGwV/blobs/xse9fH356b4VYrU8BHYe/Screen%20Shot%202023-11-14%20at%2017.14.55.png" alt=""><figcaption><p>Webhook configuration</p></figcaption></figure>

#### Config to receive notification about created accounts and successful transaction events.

<figure><img src="https://content.gitbook.com/content/uIGO9I55gtHjY6deHGwV/blobs/NMSO8ldDZs7VqqORYx5l/Screen%20Shot%202023-11-14%20at%2017.16.24.png" alt=""><figcaption><p>Create new configuration</p></figcaption></figure>

#### Parameters description

* URL: Webhook URL
* Secret key: Use to verify data from NeoX
* Authorization type: No Auth or Basic Auth
* Type: ACCOUNT | TRANSACTION | TRANSACTION\_STATUS
* Code: Optional, mapping to "serviceInfomation.code" in creating a [*virtual account*](https://github.com/neopayvn/neox-gitbook-documents-v2/blob/main/collections/integration/api-create-list-of-virtual-accounts.md) request. If you fill in the "Code", the URL will be received transaction notifications of that virtual accounts having the same "Code".
* Group id: Optional, mapping to "serviceInfomation.groupId" in creating a [*virtual account*](https://github.com/neopayvn/neox-gitbook-documents-v2/blob/main/collections/integration/api-create-list-of-virtual-accounts.md) request. If you fill in the "Group id", the URL will be received transaction notifications of that virtual accounts having the same "Group id".

> "Code" and "Group id" are $and conditions

For example, merchant create a [*virtual account*](https://github.com/neopayvn/neox-gitbook-documents-v2/blob/main/collections/integration/api-create-list-of-virtual-accounts.md) with "serviceInfomation.code" = "001" and "serviceInfomation.groupId" = "GR01". There are four configuration ways to receive the transaction notifications:

<table><thead><tr><th width="121" data-type="number">No</th><th>Code</th><th>Group id</th></tr></thead><tbody><tr><td>1</td><td>001</td><td>GR01</td></tr><tr><td>2</td><td>001</td><td><em>empty</em></td></tr><tr><td>3</td><td><em>empty</em></td><td>GR01</td></tr><tr><td>4</td><td><em>empty</em></td><td><em>empty</em></td></tr></tbody></table>

## Notification

NeoX will send a POST request to configured URL whenever there is an event happen.

1. **Notification of collection transaction happened**

View event object data of type "TRANSACTION". [***Click here***](https://docs.neox.vn/docs/v2/collections/transaction-management/webhook)***.***

2. **Notification of virtual accounts created**

View event object data of type "ACCOUNT". [***Click here***](https://docs.neox.vn/docs/v2/collections/integration/broken-reference)***.***

3. **Notification when transaction (reconcile) status changed**

View event object data of type "TRANSACTION\_STATUS". [***Click here***](https://docs.neox.vn/docs/collections/transaction-status-management/webhook)***.***

4. **Notification when refund request status changed**

View event object data of type "REFUND". [***Click here***](https://docs.neox.vn/docs/collections/refund-request-management/webhook)***.***

5. **Notification when withdraw request status changed**

View event object data of type "PAYOUT". [***Click here***](https://docs.neox.vn/docs/collections/withdraw-request-management/webhook)***.***
