Setup
#
OverviewYou can use Sunbit's webhooks to notify you when an event happens to get real time insights for your reporting, customer outreach, and remarketing strategies. The following events are currently available:
#
SetupThe first step to adding webhooks to your Sunbit integration is to build your own custom endpoint. Creating a webhook endpoint on your server is no different from creating any other endpoint on your server.
The second step is updating your endpoint in the developers portal under "Webhook URL" in the Webhooks page
The webhook event will be sent as an HTTP POST request with the header named "Sunbit-Signature" and will contain a token that should be used to validate the request from Sunbit. The Sunbit signature is automatically generated when configuring the end point in the Webhooks page.
#
TestIf you would like to test the webhook functionality before setting up your system, you can do the following:
#
Step 1Use a service like webhook.site or ngrok as the webhook receiver.
#
Step 2Configure the webhook URI in Sunbit's Dev Portal to the service's URI, you can find the configuration page under the Webhooks tab in the dev portal
#
Step 3You can trigger a webhook using the test button in the dev portal or by initiating a call for pre-qualification link or merchant onboarding
#
Step 4On receiving the webhook in the service site, copy the "sunbit-signature" and payload
#
Step 5To validate the signature, follow the instruction in the Verify Webhook Signature