Webhook Setup

Part 1: Creating a Webhook Subscriber

const express = require('express');
const app = express();
const port = 3000;

app.post('/webhook', (req, res) => {
  const requestPayload = req.body;
  console.log('Received webhook payload:', requestPayload);
  // Process the webhook payload here
  res.status(200).send('Webhook Received');
});

app.listen(port, () => {
  console.log(`Webhook subscriber listening at http://localhost:${port}/webhook`);
});

Part 2: Setting Up Webhook in the Dashboard

  1. Navigate to Webhook Section

  2. Head over to the Your Webhook section:

    • Paste your Webhook Subscriber URL in the input field

    • Click on "Confirm or Update Webhook" button to save the webhook URL

  3. Test Your Webhook:

    • Your webhook subscriber should receive a test notification from the ticketing system.

    • This test notification confirms that your webhook is correctly set up and able to receive data

  4. View Notifications in Webhook Dashboard:

    • All the notifications that are being sent to your webhook subscriber are also visible on your ticketing dashboard.

Sample Transaction Payload:

{
  "eventId": "259373",
  "ticketId": "701643",
  "transactionId": "e170704f-1347-44f9-9c51-60d60e148133",
  "txHash": "0x6a1a6dc25bb584dab66086771c58b9ae4a54de6c5057950a23ad8d603d18b1ea",
  "amount": 10,
  "status": "complete"
}

Last updated