Skip to content
QaydTech Beta launch

Getting started

Webhooks

We tell your system what happens as it happens.

Add an https address in Settings → Developer API → Webhooks and choose the events. We POST a JSON message for every event, signed with a signing secret shown to you once.

  • invoice.issuedInvoice issued
  • credit_note.issuedCredit note (return) issued
  • debit_note.issuedDebit note issued
  • invoice.einvoicingFatoora platform answer (accepted or rejected)
  • invoice.paidInvoice fully paid
  • invoice.voidedInvoice voided
  • payment.receivedPayment received from a customer
  • customer.createdCustomer added
  • customer.updatedCustomer changed
  • item.stock_lowItem stock reached its reorder level

What data holds: for invoice and note events, the document as GET /invoices/{id} gives it; for customer events, the customer as GET /customers/{id} gives it; for payment.received, the receipt and the invoices it settled. item.stock_low is told once, when what all the item’s warehouses hold falls from above its reorder level to it or under it: the item, how much is left, its reorder level, and the warehouse it went out of.

The message

POST https://example.com/webhooks/qayd
X-Qayd-Event: invoice.einvoicing
X-Qayd-Delivery: 3f6d0c1e-…
X-Qayd-Signature: t=1731230000,v1=5b1c…

{
  "id": "3f6d0c1e-…",
  "event": "invoice.einvoicing",
  "created_at": "2026-11-10T12:00:00+03:00",
  "data": { "id": 318, "number": "INV-2026-00318", … }
}

Verifying the signature

Compute HMAC-SHA256 of “t.raw body” with the signing secret, compare it with v1, and reject anything older than 5 minutes. Use X-Qayd-Delivery to ignore a message that arrives twice.

// PHP
$raw = file_get_contents('php://input');
parse_str(str_replace(',', '&', $_SERVER['HTTP_X_QAYD_SIGNATURE']), $sig);
$expected = hash_hmac('sha256', $sig['t'].'.'.$raw, $secret);
$valid = hash_equals($expected, $sig['v1']) && abs(time() - (int) $sig['t']) < 300;
// Node.js
const [t, v1] = req.get('X-Qayd-Signature').split(',').map(p => p.split('=')[1]);
const expected = crypto.createHmac('sha256', secret).update(`${t}.${rawBody}`).digest('hex');
const valid = crypto.timingSafeEqual(Buffer.from(expected), Buffer.from(v1)) && Math.abs(Date.now() / 1000 - t) < 300;

Retries

If the address does not answer 2xx within 10 seconds we retry after 1, 5 and 30 minutes, then 2 and 6 hours. If it keeps failing, the address is paused; resume it once fixed. We only send to an https address on port 443 out on the internet.