Alya Books

    Help centre

    Guides for Alya Books and UAE e-invoicing

    Webhooks

    Get a signed HTTPS call when an invoice, payment or received document changes, and how Alya Books retries and pauses deliveries.

    A webhook sends a signed JSON POST to your HTTPS endpoint when something happens in Alya Books, so your ERP or shop can react without polling.

    Set up a webhook

    1. Go to API access (Setup group in the sidebar) → Webhooks tab → New webhook.
    2. Enter the Target URL (a public https host), and optionally a name, a description and custom headers, one per line as Name: value.
    3. Tick the Events you want, or All events.
    4. Click Create webhook and copy the signing secret. It is shown only once; Rotate secret in the row menu issues a new one.

    The row menu also has Deliveries, Send test (a webhook.test event, tried once) and Pause / Resume.

    Events

    There are 34 events:

    GroupEvents
    Invoicesinvoice.created, invoice.sent, invoice.submitted, invoice.delivered, invoice.reported, invoice.rejected, invoice.paid, invoice.overdue, invoice.deleted, validation.completed
    Incoming invoicesincoming.created, incoming.validated, incoming.accepted, incoming.rejected, incoming.paid
    Documentsquote.created, quote.sent, order_confirmation.created, proforma.sent, reminder.created, reminder.sent, document.sent
    Cataloguecustomer.created, product.created, project.created
    Recurring invoicesrecurring_invoice.generated, recurring_invoice.failed
    Paymentspayment_link.paid, bank.transaction_matched
    Accountorganization.ownership_transferred
    VATvat_return.filed, vat_return.reopened, lock_date.changed
    Integrationsconnector.synced
    Reportsreport.delivered (a scheduled report ran and was delivered; see Scheduled reports)

    The body has id (the event id), event, createdAt, organizationId and data.

    Headers and signature

    Every delivery carries X-Webhook-Event, X-Webhook-Event-Id, X-Webhook-Delivery, X-Webhook-Attempt and X-Webhook-Signature, with user agent Webhook-Delivery/1.0. The signature reads t=<unix time>,v1=<hex>, where the hex is the HMAC-SHA256 of <t>.<body> with your signing secret.

    A deployment that still accepts the identifiers of the product's previous name also sends each of these headers a second time under that name's older prefix, with the same values. Verify with the X-Webhook- headers. Custom headers may not start with either prefix.

    Retries and pausing

    • A delivery succeeds on any 2xx answer within 10 seconds; redirects are not followed.
    • A failed delivery is tried up to 6 times in all, after at least 1 min, 5 min, 30 min, 2 h and 12 h. A job sends due retries every 5 minutes. Retry in the deliveries dialog sends one again by hand.
    • After 25 deliveries in a row have used up all their attempts, the webhook pauses itself. Resume turns it back on and resets the count.

    Good to know

    • Owners and admins manage webhooks; other members need the "Manage webhooks" permission under Settings → Team → Permissions. API keys need the webhooks:manage scope.

    Still stuck? Contact support