EventNotification and, if applicable, a Terminal API asynchronous SaleToPOIResponse. You can use the received information to show a message in your POS app.
Set up event notifications in the Customer Area
To get event notifications and, if applicable, asynchronous Terminal API responses, you need to make sure you can receive HTTP callbacks (webhooks) on a specific endpoint. Then you need to provide the URL to that endpoint in your Customer Area. Make sure to acknowledge that your POS system successfully received an event notification from the terminal.-
Prepare your system. It needs to have:
- An endpoint that can receive JSON messages.
- For the test environment: an open TCP port for HTTP traffic (80, 8080, or 8888) or HTTPS traffic (443, 8443, or 8843) with TLSv1.2.
- For the live environment: an open TCP port for HTTPS traffic (443, 8443, or 8843) with TLSv1.2.
- Log in to your test Customer Area.
- Switch to the merchant account, store, or terminal that you want to set up notifications for.
- Go to In-person payments > Terminal settings > Integrations.
- In the Terminal API section, select Decrypted.
- Under Event URLs, select Add new.
-
Select the pencil icon **next to the field that appears.
The Add URL dialog opens. -
Enter the details:
- URL: the URL of the endpoint where you want to receive event notifications.
- Username and Password (optional): the basic authentication credentials you set up on your server. We include these details in the header of the notification to authenticate with your server.
- Public: select this option if the specified URL is on a public network.
- Local: select this option if the specified URL is on a Local Area Network.
- Enable encryption: select this if you want the message sent to this URL to be encrypted.
- Select Add URL.
- Select Save.
Set up event notifications using API calls
Instead of using your Customer Area, you can use our Management API to automate setting up display notifications. To get display notifications, make sure you can receive HTTP callbacks (webhooks) on a specific endpoint. You then need to provide the URL to that endpoint in the PATCH request. Make sure to acknowledge that your POS system successfully received an event notification from the terminal. To set up event notifications, you need to have the following role:- Management API—Terminal Advanced settings read and write
-
Prepare your system. It needs to have:
- An endpoint that can receive JSON messages.
- For the test environment: an open TCP port for HTTP traffic (80, 8080, or 8888) or HTTPS traffic (443, 8443, or 8843) with TLSv1.2.
- For the live environment: an open TCP port for HTTPS traffic (443, 8443, or 8843) with TLSv1.2.
-
Optional. To see what display notification settings have already been configured, make a GET request to the
/terminalSettingsendpoint for the company account, merchant account, store or terminal, and check thenexo.eventUrlsobject. When removing settings, you need to know the settings that will be inherited from the next higher level. -
Make a PATCH request to the
/terminalSettingsendpoint on the company account, merchant account, store or terminal level.
In the request body, inside the nexo object, specify:eventLocalUrls: an array with one or more local URLs. Use this if the specified URL is on a Local Area Network. This includes:
Set up a local URL on a terminal level -
When you receive the response, note that this returns the entire configuration at the level where you made the request.
Response with the entire configuration on a terminal level
Accept event notifications
We require you to acknowledge that your POS system successfully received an event notification from the terminal with a successful HTTP response status code, for example 202. This prevents the terminal or our backend from repeatedly re-sending the same notification. When your POS system receives an event notification:- Store the event notification in your database.
- Acknowledge the event notification with a successful HTTP response status code, for example 202.
- Apply your business logic.
Make sure that you acknowledge the event notification before you apply any business logic, because an error in your business logic can prevent event notifications with important updates from reaching your system.
Event notification types
Each notification contains a uniqueDeviceID and a EventToNotify value. You can use EventToNotify to show a message in your POS app informing your staff of the terminal’s state.
Event notification examples
Shutdown
ShutdownBeginMaintenance
Example notificationEndMaintenance
Example notificationOutOfOrder
Example notificationInitialised
Example notificationNetworkConnected
Example notificationNetworkDisconnected
Example notificationReject
Example notificationSaleWakeUp
Example notificationUseAnotherCardForPreauth
Example notificationAsynchronous Terminal API responses
If you use cloud communications and send your Terminal API requests to an asynchronous endpoint, we send the Terminal API responses to your event notifications endpoint (provided you have set that up). These responses are exactly the same as the responses you’d receive in a Terminal API integration using local communications, or using cloud communications with a synchronous endpoint. The example below is a payment response.Next steps
Terminal API fundamentals
Required. Learn about our Terminal API.
Display notifications
Keep your staff informed of the progress of the transaction.
Platform-generated webhooks
Receive standard webhooks generated by our platform.