Webhooks Overview and Setup
When an appointment or customer changes, Dolyu sends the event to the URL you set up with an HTTP POST request. For events and fields, see Webhook Events and Fields. For signature verification, see Verifying Webhook Signatures. For retry rules, see Webhook Retries and Disabling.
Request format
| Item | Value |
|---|---|
| Method | POST |
Content-Type | application/json |
User-Agent | Dolyu-Webhooks/1.0 |
| Signature headers | webhook-id, webhook-timestamp, webhook-signature. See Verifying Webhook Signatures |
| Body | JSON. See Webhook Events and Fields |
Set up an endpoint
An endpoint is a receiving configuration: a name, a URL, and the events it subscribes to. Each shop can have up to 16 endpoints, and only owners and admins can manage them.
Enter the URL and events
Enter a name and the 1 URL, then choose Selected events or All events under 2 Events. With Selected events, click events to subscribe to under 3 appointment events, 4 customer events, 5 service events, 6 staff events, and 7 payment events, or use Select all next to a group to select or clear the whole group (at least one in total). With All events, event types added later are sent too. Click 8 Create. See URL requirements.
Copy the signing secret
The signing secret appears after you create the endpoint, in the form whsec_ followed by a Base64 string. Your receiver uses it to verify signatures. Click Copy, store it in your system, then click I have copied it. After that, only the last four characters are shown.
Send a test event
Click ⋮ on the endpoint row, then Send test event to send a ping event to the endpoint. Confirm that your receiver gets it and responds with 2xx. Check the result on the Deliveries tab.
Manage endpoints
Click ⋮ on an endpoint row:
- Edit: change the name, URL, or events. It also shows the last four characters of the signing secret and the API version (
api_versionin event content). - Rotate secret: create a new signing secret. The old secret stays valid for 24 more hours, and during that time each request carries two signatures. See Secret rotation.
- Resend failed deliveries: choose a Start time (from 1 hour ago to 30 days ago). Failed deliveries to this endpoint that were created after it are queued again and sent from the first attempt on the retry schedule.
pingtest events are excluded. A disabled endpoint doesn't have this action. - Disable / Enable: events from while the endpoint is disabled are not sent automatically. If you select Send events from the disabled period when enabling, events recorded after it was disabled and within the last 30 days are sent to this endpoint. Events that had not finished sending when it was disabled, and were marked as failed, are not included; resend them with Resend failed deliveries.
- Delete: delete the endpoint together with its delivery history.
You can still disable or delete endpoints after your subscription ends.
Deliveries
Open the Deliveries tab to filter by endpoint, event, and result. Click a row to see each attempt's time, the response, and the content sent. Finished deliveries can be resent with Resend.
After 5 failures in a row, the Owner and Admins are notified. For automatic disabling, see Webhook Retries and Disabling.
URL requirements
httpsonly, on port 443 (you can leave the port out).- The host must be a domain name (at least two labels, such as
hooks.example.com). IP addresses are not accepted. - No username, password, or
#fragment. The whole URL is at most 2048 characters and contains only visible ASCII characters, with no backslash (\). - Saving checks only the URL format. The domain is resolved before every send; if any resolved address falls in a private, loopback, link-local, or other special-purpose range, the event is not sent and the endpoint is disabled. For IPv6, only global unicast addresses are accepted.
Receiver requirements
- A 2xx response counts as delivered. Other status codes, timeouts, and connection failures count as failures and are retried. The total timeout is 15 seconds and the connection timeout is 5 seconds.
- Redirects are not followed; a 3xx response counts as a failure.
- Requests don't come from a fixed set of IP addresses. Use the signature to confirm a request came from Dolyu.
For details, see Webhook Retries and Disabling.
Implementation checklist
- Verify the signature before processing the payload. See Verifying Webhook Signatures.
- Respond with 2xx within 15 seconds.
- The same event can arrive more than once (retries and resends). Deduplicate by
id. - Skip fields you don't recognize. Respond with 2xx to a
typeyou don't handle. - One action can produce two events with the same appointment details, such as the payment and the completion at checkout. Rely on the appointment in the event.
- To catch up on events you missed, call
GET /eventswithcreated_at[gte]set to thecreated_atof the last event you read fromGET /events, and deduplicate byid. See Events.