# Event Notification

## Usage

* This is the API that the Platform should create to receive notifications of events that occur from NeoX.&#x20;
* Sequence Diagram

  * Notifies about balance amount

  <figure><img src="https://content.gitbook.com/content/uIGO9I55gtHjY6deHGwV/blobs/gYiWwwVkmtL4RmC4LJfk/Picture1_7.png" alt=""><figcaption></figcaption></figure>

  * Notifies about disbursement transaction

  <figure><img src="https://content.gitbook.com/content/uIGO9I55gtHjY6deHGwV/blobs/wYD0JD7UeLGUueAafIEG/Picture1_9.png" alt=""><figcaption></figcaption></figure>

## API

* Path: the URL(*https\://<\<yourdomain.com/api/notifi>>*) Webhook is created and configured by Platform on Merchant Portal, in the “Disbursement service” menu&#x20;
* Method: POST&#x20;
* Request: Body&#x20;

## Notification type

### **Notifies about balance amount**

<table><thead><tr><th width="144.33333333333334">Parameter</th><th width="126">Data Type </th><th>Description</th></tr></thead><tbody><tr><td>service </td><td>String </td><td>“<em>DISBURSEMENT</em>” </td></tr><tr><td>type </td><td>String </td><td>“<em>BALANCE</em>” </td></tr><tr><td>value </td><td>Number </td><td>The current amount. </td></tr><tr><td>time </td><td>String </td><td>The time of the event. </td></tr><tr><td>secureHash </td><td><p>String </p><p>(Base64) </p></td><td>Use SHA256 to hash the above parameters (sort the key by Alphabet order) + Secret Key (configured on Merchant Portal, in the “Disbursement service” menu) </td></tr></tbody></table>

### **Notifies about disbursement transaction happened**

<table><thead><tr><th width="144">Parameter</th><th width="108.33333333333334">Data Type </th><th>Description</th></tr></thead><tbody><tr><td>service </td><td>String </td><td>“<em>DISBURSEMENT</em>” </td></tr><tr><td>type </td><td>String </td><td>“<em>TRANSACTION</em>” </td></tr><tr><td>data </td><td>Object </td><td>Data response, refer to  <a href="response-data-structure">DisbursementTransactionItem</a> </td></tr><tr><td>time </td><td>String </td><td>The time of the event. </td></tr><tr><td>secureHash </td><td><p>String </p><p>(Base64) </p></td><td>Use SHA256 to hash the above parameters (sort the key by Alphabet order) + Secret Key (configured on Merchant Portal, in the “Disbursement service” menu) </td></tr></tbody></table>

### **Notifies about currency exchanged**

<table><thead><tr><th width="144">Parameter</th><th width="108.33333333333334">Data Type </th><th>Description</th></tr></thead><tbody><tr><td>service </td><td>String </td><td>“<em>DISBURSEMENT</em>” </td></tr><tr><td>type </td><td>String </td><td>“<em>EXCHANGE</em>” </td></tr><tr><td>data </td><td>Object </td><td>Data response, refer to  <a href="../response-data-structure#exchangetransactionitem">ExchangeTransactionItem</a></td></tr><tr><td>time </td><td>String </td><td>The time of the event. </td></tr><tr><td>secureHash </td><td><p>String </p><p>(Base64) </p></td><td>Use SHA256 to hash the above parameters (sort the key by Alphabet order) + Secret Key (configured on Merchant Portal, in the “Disbursement service” menu) </td></tr></tbody></table>
