Webhooks
Webhooks allow you to build or set up GitHub Apps which subscribe to certain events on the launchpad. When one of those events is triggered, we'll send a HTTP POST payload to the webhook's configured URL.
Events
Subscriptions to webhook is automatic when a business grant the scopes for your app, below are the details for the webhook events:
Event Type |
Scope |
Description |
tab.create |
tab:read |
When creating a new tab for the customer |
tab.update |
tab:read |
When a modification happens on a tab for the business |
item.create |
catalog:items:read |
When creating a new catalog item |
item.update |
catalog:items:read |
When updating a catalog item |
item.delete |
catalog:items:read |
When deleting a catalog item |
sale.create |
transaction:sale:read |
When a new sale gets created |
refund.create |
transaction:refund:read |
When a refund transaction happens |
customer.create |
customer:read |
When a new customer gets created |
customer. update |
customer:read |
When updating an existing customer |
customer. delete |
customer:read |
When deleting an existing customer |
Payload
The payload for the webhook post request that you will receive on your endpoint will be in a json format and will contain the following fields:
- business_id: the business id that the action happened on.
- event: the webhook event type.
- Issue_date: the time that the event happened on (ISO format).
- Body: usually contains the record info related to the event.
Webhook Headers
The payload for the webhook post request that you will receive on your endpoint will be in a json format and will contain the following extra headers:
- X-Hook-Event: Name of the event name that was triggered.
- X-Hook-Id: A GUID to identify the hook.
- X-Hook-Signature: The HMAC hex digest of the response body. The HMAC hex digest is generated using the sha1 hash function and the app secret as the HMAC key.