Webhooks

Please complete this form to obtain your API Keys. Please submit your desired webhook URL on the API request form above.

Status
Description

new

when /onramp/transaction is called via a POST request.

processing

the fiat gateway provider is processing the transaction.

success

user has successfully received asset.

failed

fiat-gateway has encountered an error processing the transaction. The user will not be charged.

invalid

unable to continue with DeFi route.

Signature

To verify the authenticity of the webhook payload, you can hash (sha256 hex) the payload's body using the webhook's secret key. Once you've generated this hash, compare it with the value provided in the x-signature header. If the two values match, it confirms that the payload is genuine and hasn't been tampered with.

For verification, consider using this sha256 hash generator as a reference: https://www.freeformatter.com/hmac-generator.html

Example payload

Headers

'x-signature': 'xxxx'

Body

{
  "id": "0261ca05-731e-4cc6-9cbd-69bcd828b721",
  "type": "onramp_cefi_transaction",
  "data": {
    "transactionId": "ed8d321f-e507-4ff9-b12f-59ff6de71f0c",
    "status": "processing",
    "gateway": "transak",
    "fiat": "sgd",
    "fiatAmount": "2000000",
    "fiatDecimal": 2,
    "payment": "paynow",
    "chain": "eth",
    "cryptoAmount": "103956047383166400",
    "cryptoDecimal": 18,
    "wallet": "0x000000000000000000000000000000000000dead",
    "partnerContext": {
      "yourContext": "xxx"
    }
  },
  "timestamp": 1691413686
}

Last updated