order creation,buyer creation, etc.
You can use these events to build custom integrations or automate your workflows.
Format
- Webhooks are configured separately for sandbox and production environments.
- The URL must be in the standard format of https://domain.com/path and must have a valid SSL certificate.
- Wizcommerce will send a
POSTrequest to the URL with a JSON body and headers. - The request body will contain the event data in JSON format.
- The request headers will contain the
Content-Typeheader with the valueapplication/jsonand theX-Wizcommerce-Signatureheader with the value of the signature. - The signature is a base64 encoded HMAC-SHA256 hash of the request body using the secret key as the key.
Security
- The secret key is used to verify the authenticity of the request.
- The secret key is used to generate the signature.
- The signature is used to verify the authenticity of the request.
- The secret key is not accessible to the external world.
Signature verification
Using the secret from API credentials, you can validate that the webhook is from Wizcommerce. This step is optional but recommended. The secret should never be exposed publicly. TheX-Wizcommerce-Signature header included in each webhook request contains signature in a string.
IP verification
Wizcommerce webhooks are sent from a specific IP range. You can whitelist these IPs to ensure that only Wizcommerce webhooks are processed.Timeouts
Wizcommerce webhooks are sent with a timeout of 30 seconds. If the webhook does not respond within 30 seconds, it will be considered failed.Retry Mechanism
To avoid an event being missed, Wizcommerce follows at-least-once delivery semantics. In this approach, if we do not receive a successful response from your server (non 200 HTTP status) or we get a timeout, we resend the webhook. Success status codes are 200, 201, 202, 204. We use exponential backoff to retry the webhook. One event will be retried at most 5 times. Example retry schedule:- 1st retry: 30 seconds
- 2nd retry: 1 minute
- 3rd retry: 2 minutes
- 4th retry: 4 minutes
- 5th retry: 8 minutes (total 15 minutes)
