# 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://1419689564-files.gitbook.io/~/files/v0/b/gitbook-x-prod.appspot.com/o/spaces%2FFdTKNedABvGBtqJRHWA0%2Fuploads%2FTEikQJ56hLZXIarBl0z0%2FScreen%20Shot%202023-11-14%20at%2017.14.55.png?alt=media&#x26;token=45828335-1506-4fc7-a242-5fd4f29d2e1a" alt=""><figcaption><p>Webhook configuration</p></figcaption></figure>

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

<figure><img src="https://1419689564-files.gitbook.io/~/files/v0/b/gitbook-x-prod.appspot.com/o/spaces%2FFdTKNedABvGBtqJRHWA0%2Fuploads%2FitkatgwZZGxvqnGXXZSp%2FScreen%20Shot%202023-11-14%20at%2017.16.24.png?alt=media&#x26;token=cb126cab-a699-411c-a2e0-d712d58b1e5e" 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-v1/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-v1/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-v1/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/collections/transaction-management/webhook)***.***

2. **Notification of virtual accounts created**

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

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)***.***
