Added in MplusKASSA v16.2.0
Explanation of the event
When enabled, the
backgroundPoll event occurs continously as long as the software is running. Whenever you reply to the event, your response is processed and a new request is started immediately thereafter. This event is always
blocking and
polling.
Because of the backgrounded and long-polling nature of this event, you do not receive information about the current
session in the event payload, since the user may be changing the current session while the event’s long-polling request is running. In fact, the
backgroundPoll call is even running in the main menu, while the POS screen is closed.
There is a also a limited selection of possible responses you may reply with. The following replies are currently supported:
Example of the event
request
Endpoint |
|
POST https://www.example.com/webhooks/backgroundPoll |
|
Headers |
|
X-Mplus-Subscription-Id: example_subscription X-Mplus-Signature: ... Content-Type: application/json Accept: application/json |
|
Payload |
|
{ "event": { "eventBlocking": true, "eventPolling": true, "eventCounter": 1, "eventTimestamp": "2019-05-09T14:25:24.123+02:00" }, "sender": { "branchNumber": 1, "workplaceNumber": 1, "instanceId": "1cce9957-708a-48d8-a2c2-ee84f02a59dc", } } |
|
response
In this example, the POS is notified of an external card scan. When applicable, this triggers the information to be displayed in the POS and on the customer display.
Headers |
|
Payload |
|
{ "externalCardScan": { "cardIdentifier": "A_SERIAL_NUMBER_OR_UUID_OR_WHATEVER", "cardDescription": "Card of Mr. Jones", "cardBalance": 24.90, "cardExpiration": "2019-10-31", "cardBlocked": false } } |
|