Webhook Integration Guide

Webhooks allow your application to receive real-time event notifications from our system. Instead of polling for updates, you can configure a URL endpoint where we will send event payloads as POST requests.

You can explore available webhooks in this portal.

Quick Start

Subscribe to an event you chose:

POST
1curl -X POST https://api.npretail.app/01234567-89ab-cdef-0123-456789abcdef/production/CRONUS%20International%20Ltd./webhook \
2 -H "Authorization: Bearer <apiKey>" \
3 -H "Content-Type: application/json" \
4 -d '{
5 "notificationUrl": "https://webhook.site/7bb075d4-62ff-4bd9-8832-502c9ed94ab7",
6 "eventName": "pos_sale_completed",
7 "clientState": "HVA0Y6B84KBNISG45W6CA4TNE38CHSBASD"
8}'

When a webhooks is triggered, you’ll receive a POST request:

1{
2 "value": [
3 {
4 "appId": "992c2309-cca4-43cb-9e41-911f482ec088",
5 "clientState": "HVA0Y6B84KBNISG45W6CA4TNE38CHSBASD",
6 "eventName": "pos_sale_completed",
7 "eventVersion": "1.0",
8 "timestamp": "2024-01-15T10:30:00Z",
9 "companyName": "CRONUS International Ltd.",
10 "payload": {
11 "saleId": "e20d09ad-ab74-4f31-912f-ea58d3c9e653",
12 "posUnit": "POS-031",
13 "receiptNo": "D12345678",
14 "fiscalDocumentNo": "FS12345678",
15 "customerNo": "C12345678"
16 }
17 }
18 ]
19}
ActionEndpoint
List all webhook subscriptionsGET /webhooks
Get a webhook subscriptionGET /webhook/{id}
Create a webhook subscriptionPOST /webhook
Delete a webhook subscriptionDELETE /webhook/{id}

For complete webhook endpoint references, navigate here.