Webhook
Create an event destination to receive events at an HTTPS webhook endpoint. After you register a webhook endpoint,
Wonder backend can push real-time event data to your application’s webhook endpoint when events happen in your Wonder business account.
Wonder uses HTTPS to send webhook events to your app as a JSON payload.
Each webhook request included headers:
| Header Name | Comment |
|---|---|
| Credential | Same as API request signature, refer to Authentication |
| Nonce | Same as API request signature, refer to Authentication |
| Signature | Same as API request signature, but use the Wonder owner RSA private key to signature the request, and your should get the public key from wonder portal when When creating an AppID, refer to Verify webhook signature |
| X-Action | A event name of this webhook. |
Workflow
To start receiving webhook events in your app:
- Create a
HTTPSpublic webhook endpoint handler to receive event dataPOSTrequests. - When creating an AppID, you will obtain a Webhook signature public key in the Wonder Portal.
- Return HTTP status code
200if your successful received the webhook, otherwise, you will receive duplicated webhook request.
Response handling rules
The judgment is based on the final HTTP response status code returned by the receiver. If a redirect occurs and is followed, the status code after following the redirect is used for the judgment.
| Receiver response | System determination | Retry |
|---|---|---|
200 – 299 | Delivery succeeded | No, the process ends |
300 – 399, 400 – 499 | Treated as this delivery not accepted | No, terminate immediately |
500 – 599 | Treated as the receiver system error | Yes, continue at the retry interval; terminate after at most 15 retries |
| Connection timeout, connection failure, DNS resolution failure, unable to establish secure connection | Treated as network or connection failure | Yes, continue at the retry interval; terminate after at most 15 retries |
Retry logics
The system will retry up to 15 times, with a maximum of 6 hours between retries.
The minimum interval between retries is 15 seconds.
15 retries will be sent within 24 hours.
Security
If you have firewall requirements and need to allow specific IP addresses to access your production environment,
please add the following IP addresses to your firewall whitelist: 119.8.39.23/32 and 119.8.232.135/32