A webhook is an HTTP POST request with a JSON body which is sent to a url of your choosing. Once configured, Hover will send all of the information about a transaction to you each time a transaction is created or updated. You can use this to keep your own server database up to date without having to write any extra Android code.
Add your webhook
When you create an app in the Hover dashboard you have the option of adding a webhook. This can be any valid url where you can recieve POST requests and process JSON. You can also add your webhook to an existing app by visiting it's details page. Once added, any new transactions run in the app will trigger the POST request when they are uploaded. Each transaction can cause multiple webhooks to fire as it is updated. For example, you may get one webhook when a transaction is run, then if you have a SMS parser, you will receive another when the SMS is received after a delay.
Since the Hover SDK works offline transactions will not be posted to your webhook until they are uploaded to Hover's server. This can take up to 2 weeks if your user does not go online. The payload includes information about when transactions were actually run.
The json sent in the webhook contains all the data about the transaction, its attributes and relationships. It also contains a secret key which you can use to verify the request is from Hover. The key can be found an regenerated in the App details under the webhook url.
The following is an example transaction payload:Next: Customization