# Webhook

**Event data**

<table><thead><tr><th width="245">Parameter</th><th width="142.33333333333331">Data Type</th><th>Description</th></tr></thead><tbody><tr><td>merchantCode</td><td>String</td><td>Merchant Code</td></tr><tr><td>requestId</td><td>String</td><td>The requestId when creating refund request.</td></tr><tr><td>type</td><td>String</td><td>Webhook type:<br>Default value "REFUND"</td></tr><tr><td>collectionTransId</td><td>String</td><td>Collection's TransactionId of current refund request</td></tr><tr><td>approvalStatus</td><td>String</td><td>Refund request status, Include:<br>PENDING: Refund request is waiting for approval.<br>APPROVED: Refund request was approved.<br>REJECTED: Refund request was rejected.</td></tr><tr><td>status</td><td>String</td><td>Refund transaction status, Include:<br>SUCCESS: Refund transaction was successful<br>FAILED: Refund transaction was failed</td></tr><tr><td>bankSwiftCode</td><td>String</td><td>Refund/Remitout bank swift code.</td></tr><tr><td>bankAccountNumber</td><td>String</td><td>Refund to bank acount number</td></tr><tr><td>bankAccountName</td><td>String</td><td>Refund to bank acount name.</td></tr><tr><td>amount</td><td>Number</td><td>Amount of refund request in VND</td></tr><tr><td>note</td><td>String</td><td>Note for refund request</td></tr><tr><td>failedReason</td><td>String</td><td>Return failed reason from banking system if refund transaction was failed</td></tr><tr><td>createdAt</td><td>Datetime String (ISO 8601)</td><td>Record created time</td></tr><tr><td>secureHash</td><td><p>String</p><p>(Base64)</p></td><td>Use SHA256 to hash the above parameters (Not include optional params) (sort the key by Alphabet order) + Secret Key (configured on Merchant Portal, in the Collection service menu)</td></tr></tbody></table>

### Sample data

```json
{
  "merchantCode": "FVPLLB",
  "requestId": "REFUND-629570097321",
  "collectionTransId": "FT193341033222",
  "amount": 123456,
  "bankSwiftCode": "MCOBVNVX",
  "bankAccountNumber": "9698890000",
  "bankAccountName": "SUMTING WONG",
  "status": "PROCESSING",
  "approvalStatus": "PENDING",
  "createdAt": "2025-05-26T02:43:45.689Z",
  "note": "Test create refund request",
  "secureHash": "vNWPuLtvgzXpB5GKqQPyZEpM+Dbohf2wGjN2/8ho6e4="
}
```

With the secretKey "SumtingWong\@123", the string used to create secureHash will be:

```
123456PENDINGSUMTING WONG9698890000MCOBVNVXFT193341033222FVPLLBTest create refund requestREFUND-629570097321PROCESSINGREFUNDSumtingWong@123
```
