API reference

Webhooks provide a mechanism for pushing data back to systems that are outside the Glider domain.
These calls are set up within the Glider backend and are configured individually for each client.
Simply let your Glider on-boarding rep know that you’d like to use them and provide the URLs that you would like to use.

Glider supports both basic and bearer token authentication. By indicating your preference during the sign up process all of the calls made to your API will be accompanied by the correct authentication header.
Additional headers can also be added upon request.

The webhook calling code will attempt to deliver the message multiple times over a 24-hour period with an exponential back-off if it fails to get a 2xx response code.
If the webhook surpasses the number of attempts that are allowed by its config then the webhook will be placed into an errored state and will not automatically attempt re-delivery.

Example of a webhook configuration

{
  "Headers": {
    "Authorization": "Bearer xxx...",
    "Content-Type": "application/json"
  },
  "failureThreshold": 10,
  "batchingIntervalInMinutes": 2
  "callbackUrl": "https://backend.auswater.com/webhook"
}

Webhook Events

The webhook is invoked whenever an invoice status is updated within Glider.
The webhook will be triggered on these 4 events:

EventDescription
sentan invoice has been sent to the recipient preferred contact
openeda user clicked on the invoice link and visited the payment portal
paida user successfully paid an invoice
transaction-declineda user attempt to pay an invoice but the transaction failed

Example of a Webhook request

POST _/your-callback-endpoint_

Body

{
   "event": "opened",
   "ts": "2020-10-10 03:00:00",
   "invoice_id": 321,
   "status": "paid",
   "account_number": "3243242",
   "amount": 400,
   "contact": "[email protected]",
   "custom1_label": "Creditor",
   "custom1_value": "BankOne",
   "custom2_label": "SKU",
   "custom2_value": "HK0004578",
   "custom3_label": "Due Date",
   "custom3_value": "10/10/2020",
   "created": "2020-10-10 00:00:00",
   "transactions": [
        {
            "created": "2020-10-10 01:00:00"
            "status": "declined",
            "error": "Something went wrong during the payment processing: [152] Account not set up to accept credit card transactions for the supplied credit card type",
            "amount": 200,
            "receipt": "pKRLbdkvZ1"
        },
        {
            "created": "2020-10-10 02:00:00"
            "status": "succeed",
            "error": null,
            "amount": 300,
            "receipt": "3XKDAV0La4"
        },
   ]
}