Real-time payment event

Webhook API for SMS based payment automation

ZiniPay te kono payment SMS receive hole system automatically process kore apnar webhook URL e payment information pathabe. ISP business, chatbot, Telegram bot, CRM, and custom billing automation er jonno eta fast and practical.

Secure mobile payment automation

Event

payment

Method

POST

Format

JSON

ISP billing

Customer reference diye bill match korun, payment receive hole line active ba invoice paid kore din.

Chatbot flow

Messenger, WhatsApp, or website chatbot e payment confirmation instantly pathate parben.

Telegram bot

Bot group, admin channel, ba customer inbox e successful payment alert send kora easy.

Custom CRM

Sales, support, subscription, wallet top-up, and order fulfillment workflow automate korun.

How it works

Payment SMS theke webhook event

Apnar backend ke bar bar payment check korte hobe na. ZiniPay SMS receive korar sathe sathe apnar endpoint e event pathabe.

  1. 1

    Customer sends payment to your connected number.

  2. 2

    ZiniPay receives and processes the payment SMS.

  3. 3

    Reference, amount, sender, provider, and TrxID are extracted.

  4. 4

    ZiniPay calls your webhook URL with a JSON payload.

  5. 5

    Your system verifies the signature and marks the invoice as paid.

Example payload

Your webhook URL will receive data like this

ZiniPay webhook request er body te parsed SMS information thakbe: amount, reference, sender number, provider, transaction ID, and original message. Headers e event name and signature thakbe.

Verify before fulfillment

Always verify x-zinipay-signature with your webhook secret before updating invoice, activating service, or sending delivery confirmation.

POST /your-webhook-url

billing.payment_received

{
  "event": "billing.payment_received",
  "amount": 500,
  "smsRef": "CUS512",
  "brandId": "ef1a1819-5a52-4dc9-b8df-959dca6f4422",
  "message": "You have received Tk 500.00 from 01877778917. Ref CUS512. Fee Tk 0.00. Balance Tk 10,912.78. TrxID DFR5QMLP41 at 27/06/2026 12:18",
  "provider": "bKash",
  "createdAt": "2026-06-27T07:51:03.263Z",
  "reference": "CUS512",
  "receivedAt": "2026-06-27T12:18:00.000Z",
  "senderNumber": "01877778917",
  "transactionId": "DFR5QMLP41",
  "localPaymentId": 247694
}

Payload fields

FieldMeaning
eventEvent name, for example billing.payment_received.
amountReceived payment amount.
reference / smsRefCustomer, invoice, or order reference from SMS.
providerPayment provider such as bKash, Nagad, Rocket, or Upay.
senderNumberCustomer mobile number detected from the SMS.
transactionIdProvider transaction ID from the payment SMS.
receivedAtPayment time parsed from the SMS.
messageOriginal payment SMS text for audit and support.

Node.js example

Verify signature and mark payment

import crypto from "crypto";
import express from "express";

const app = express();

app.use(
  express.json({
    verify: (req, res, buf) => {
      req.rawBody = buf.toString("utf8");
    },
  })
);

app.post("/api/zinipay/webhook", async (req, res) => {
  const signature = req.header("x-zinipay-signature");
  const expected = crypto
    .createHmac("sha256", process.env.ZINIPAY_WEBHOOK_SECRET)
    .update(req.rawBody)
    .digest("hex");

  if (signature !== expected) {
    return res.status(401).json({ ok: false });
  }

  const payment = req.body;

  if (payment.event === "billing.payment_received") {
    await markInvoicePaid({
      reference: payment.reference,
      transactionId: payment.transactionId,
      amount: payment.amount,
      provider: payment.provider,
      senderNumber: payment.senderNumber,
    });
  }

  return res.json({ ok: true });
});

Integration pattern

One endpoint, many automations

Return HTTP 200 after your system accepts the event.

Store transactionId to prevent duplicate fulfillment.

Match reference with your invoice, customer ID, or subscription ID.

Keep webhook secret in environment variables only.

Ready for automation

Connect your webhook URL and let ZiniPay notify your system.

ISP bill collection, chatbot order confirmation, Telegram alerts, and custom software payment updates can all run from the same webhook event.

Talk to support