Skip to main content

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 NameComment
CredentialSame as API request signature, refer to Authentication
NonceSame as API request signature, refer to Authentication
SignatureSame 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-ActionA event name of this webhook.

Workflow​

To start receiving webhook events in your app:

  • Create a HTTPS public webhook endpoint handler to receive event data POST requests.
  • When creating an AppID, you will obtain a Webhook signature public key in the Wonder Portal.
  • Return HTTP status code 200 if 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 responseSystem determinationRetry
200 – 299Delivery succeededNo, the process ends
300 – 399, 400 – 499Treated as this delivery not acceptedNo, terminate immediately
500 – 599Treated as the receiver system errorYes, continue at the retry interval; terminate after at most 15 retries
Connection timeout, connection failure, DNS resolution failure, unable to establish secure connectionTreated as network or connection failureYes, 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