What is a Webhook?
A webhook allows you to receive real-time updates from the SalesPlay POS system whenever specific events occur.
Instead of repeatedly checking for updates (polling), webhooks automatically send data to your system the moment something changes.
For example, your system can instantly receive notifications when:
- A receipt is created or updated
- Inventory levels change
- A product is added or modified
- A customer record is updated
- A credit note or cash refund is issued
This makes it easy for developers to integrate SalesPlay POS with external systems such as ERP, accounting platforms, inventory management tools, and other third-party applications.
Benefits of Using Webhooks
- Receive instant updates from SalesPlay POS
- Seamlessly integrate with external systems
- Reduce manual data syncing
- Automate workflows efficiently
- Improve operational accuracy
What Can Webhooks Do?
SalesPlay webhooks send real-time notifications for key POS events. When subscribed, your system will automatically receive event-based updates.
| Event | Description |
|---|---|
| inventory_levels.update | Triggered when product stock levels are updated |
| products.update | Triggered when a product is created, edited, or deleted |
| customers.update | Triggered when a customer is created, edited, or deleted |
| receipts.update | Triggered when a receipt is created or updated |
| credit_note.update | Triggered when a credit note or cash refund is created or updated |
How to Add a Webhook
You can configure webhooks in two ways:
1. Using the API
Use the /webhook endpoint to create a webhook via API.
For developer documentation, visit:
SalesPlay Developer Portal
2. Using the Web Interface
Go to:
https://cloud.salesplaypos.com/webhooks_setup
Webhook Configuration Guidelines
- Each webhook should subscribe to only one event type (recommended).
- Use a unique webhook URL for each event (recommended).
- The URL must begin with http:// or https://.
- The URL must be publicly accessible via the internet.
- Ensure the URL format is valid.
Webhook Payload Example
When an event occurs, SalesPlay sends a POST request to your webhook URL containing event data in JSON format.
Example: inventory_levels.update Event
{
"merchant_id": "WFpYWmQwMkJGVWtDT3RHY1NHYjdBT0YzZE5xOD0=",
"type": "inventory_levels.update",
"created_at": "2025-06-30 12:54:31",
"inventory_levels": [
{
"product_id": "QWhxek54UkQ3eTArdml2d1NkSDVnUT09",
"shop_id": "bHF2M2pMakkzTVZ0NFh2SE1WNnNoUT09",
"product_code": "10003",
"in_stock": 10
}
]
}
Test Your Webhook
You can test your webhook during setup using:
- Your own server endpoint
- Testing tools such as Beeceptor
SalesPlay will send a sample POST request to verify that your webhook URL is working correctly.
Timeouts and Retry Rules
- Your server must respond with a 2xx HTTP status code (e.g., 200 OK).
- If the response is not a 2xx status, the delivery is considered failed.
- SalesPlay will retry delivery up to 200 times within 48 hours.
- If delivery continues to fail, the webhook will be automatically disabled.
Ensure your server is properly configured to handle webhook requests reliably and respond promptly.