Webhooks

You can keep track of the life of a transaction using the webhooks feature.

This can be done on the oneramp dashboard as shown below:

Step 1:

Add the webhook URL to the dashboard and generate a webhook secret key that Oneramp uses to authenticate the endpoint.

Step 2: Generate the webhook secret key

Structure of a webhook payload

The webhook payloads follow the same basic structure:

  • eventType describes the type of event

  • transferType describes the type of transaction

  • fiatType describes the currency of the order

  • cryptoType describes the type of assets

Here are example of transaction responses:

Initiated Response

{
  "eventType": "TransferStarted",
  "transferType": "TransferIn",
  "fiatType": "UGX",
  "cryptoType": "cUSD",
  "amountProvided": "3500",
  "amountReceived": "0.883178601844161",
  "fee": "0.03679910841017338",
  "transferId": <transfer-id>,
  "transferAddress": <wallet-address>
}

Successful response

{
  "eventType": "TransferComplete",
  "transferType": "TransferOut",
  "fiatType": "KES",
  "cryptoType": "cUSD",
  "amountProvided": "127.5",
  "amountReceived": "0.974",
  "fee": "0.026",
  "transferId": <transfer-id>,
  "transferAddress": <wallet-address>
}

Failed Response

{
  "eventType": "TransferFailed",
  "transferType": "TransferIn",
  "fiatType": "UGX",
  "cryptoType": "cUSD",
  "amountProvided": "1",
  "amountReceived": "0.96",
  "fee": "0.04",
  "transferId": <transfer-id>,
  "transferAddress": <wallet-address>
}

Last updated