Get webhook

The method allows you to get the original body of the webhook.

Get webhook

POSThttps://ocp.onchainpay.io/api-gateway/webhooks/get
Header parameters
Body
webhookId*string

Webhook ID

Example: "8d7db145-80cc-4c43-9cfb-9cde10f8ef40"
Response
Body
success*boolean

Request success indicator

response*object

Body of the webhook

Request
const response = await fetch('https://ocp.onchainpay.io/api-gateway/webhooks/get', {
    method: 'POST',
    headers: {
      "Content-Type": "application/json"
    },
    body: JSON.stringify({
      "webhookId": "8d7db145-80cc-4c43-9cfb-9cde10f8ef40"
    }),
});
const data = await response.json();
Response
{
  "success": false,
  "response": {
    "id": "b26e6931-1fed-46e1-b680-12ea179a959f",
    "advancedBalanceId": "316a59ea-be39-4eaa-9392-6fda708f24d8",
    "currency": "USDT",
    "network": "tron",
    "status": "processed",
    "order": "1",
    "description": "<p>1</p>",
    "address": "TUdtD3UDTD",
    "__$markdownParsed": true
  }
}

Last updated