> For the complete documentation index, see [llms.txt](https://docs.onramp.money/onramp-whitelabel-unlisted/llms.txt). Markdown versions of documentation pages are available by appending `.md` to page URLs; this page is available as [Markdown](https://docs.onramp.money/onramp-whitelabel-unlisted/whitelabel-webhook-integration/onramp-webhook.md).

# ONRAMP Webhook

ONRAMP webhook example

`referenceId`:  unique ID of an onramp transaction.

`Onramp Webhook Events`

* `FIAT_DEPOSIT_RECEIVED`  -> 2, 10 (deposit secured)
* `TRADE_COMPLETED`-> 3, 12
* `ON_CHAIN_INITIATED`-> 14 (withdrawal initiated)
* `ON_CHAIN_COMPLETED`-> 4, 15 (withdrawal complete)
* `ON_CHAIN_COMPLETED`-> 5, 16 (ON\_CHAIN\_COPMLETED and webhook sent to client)
* `FAILED`-> -1 (transaction timed out), -2 (transaction abandoned), -3 (bank and kyc name mismatch), -4 (amount mismatch)

```javascript
{
   "referenceId":23,
   "eventType":"ONRAMP",
   "status":"FAILED",
   "metadata":{
     "eventId": 22,
     "eventCreatedAt": "2023-11-17T13:33:14.000Z"
     "failure_reasons": "Transaction timed out"
   }
}
```
