Additional Resources

App Notifications

The app notification infrastructure allows you to send a message to either a single instance or all instances of an app running on a merchant’s devices.

NOTE

Our notification service is not guaranteed when or if it’ll be received by the device. If you require something more robust, you’ll need to implement your own or use an existing reliable message delivery service.

Sending a notification

Clover allows for two different types of notifications, app-level and device-level. Both notifications may only be received by your app, but device-level notifications are directed specifically to a single device.

NOTE

Replace your Auth Token with the App Secret as the `Authorization Bearer` for this endpoint. You can find the app secret in the settings tab of your app’s dashboard.

The two POST endpoints are:

App – /v3/apps/{aId}/merchants/{mId}/notifications

Device – /v3/apps/{aId}/devices/{dId}/notifications

The POSTed JSON object has the following fields:

event (string, required): App-specific name of the notification, useful as a key to allow for multiple types of notifications.

timeToLive (long, optional): The time to live of the notification in seconds. By default this is 5 days.

data (string, optional): Payload of the notification. This is at most 4000 characters.

Please reference V3 Notifications.
You will have to fill out the API Token and mID on top of the page with the app’s App Secret (not API Token) and merchant’s mID.

Receiving a notification

The Clover Service handles the POST and pushes the message to the Clover Android Service running on each device that’s currently online. Clover Android Service processes the message and sends the following Intent to the app:com.clover.sdk.app.intent.action.APP_NOTIFICATION