Overview
Push notifications are messages automatically sent to your POS client when events occur. Unlike actions where you send a request and receive a response, notifications are initiated by the server when:- Terminals connect, disconnect, or enter reconnecting state
- Payments complete (success or failure)
- Payments are automatically voided due to late terminal reconnection
terminalStatusUpdate
Sent when a terminal connects, disconnects, or enters the reconnecting state.Terminal Connected
Terminal Reconnecting
Sent when a terminal with adeviceId disconnects but may reconnect within the 60-second grace period:
Terminal Disconnected
Sent when a terminal is fully offline (either nodeviceId configured or grace period expired):
Status Values
Response Fields
Handling Terminal Status Updates
paymentComplete
Sent when a terminal finishes processing a payment, regardless of success or failure.Successful Payment
Failed Payment
Response Fields
paymentResponse Fields
Payment Status Definitions
Handling Payment Completions
paymentVoided
Sent when a payment is automatically voided because the terminal reconnected after the 60-second grace period with a successful payment result.Why This Happens
If a terminal disconnects during payment processing and reconnects after the 60-second grace period:- Your POS system has already given up waiting for the result
- The terminal may have actually processed the payment successfully
- To prevent the customer being charged without your knowledge, the payment is automatically voided
- You receive a
paymentVoidednotification with the original payment details
Message Format
Response Fields
Handling Voided Payments
Complete Message Handler
Here’s a complete example that handles all notification types:Best Practices
Handle All Notifications
Implement handlers for all notification types to avoid missing important events
Idempotency
Design handlers to be idempotent. The same notification may arrive multiple times due to network issues.
Logging
Log all notifications with timestamps for debugging and audit trails
UI Updates
Update your UI immediately when notifications arrive for a responsive user experience
Error Handling
Wrap notification handlers in try/catch to prevent a single bad message from crashing your app
State Management
Maintain local state (terminal list, pending payments) that updates based on notifications
Next Steps
Data Types Reference
Complete schema documentation for all data types
Actions Reference
Send commands to terminals
Quickstart
Review connection and authentication
Introduction
Return to Terminal Gateway overview