A webhook is set up under Settings → Integrations → Webhook. It applies to one shop.
With a webhook, we send an event to your own system each time something happens on a return or a claim. Your system can be an ERP, a CRM, Make, Zapier or an endpoint of your own. It needs an HTTPS address that accepts POST requests with a JSON body.
Add a webhook
Select Install on Webhook.
Enter the address of your system as Webhook URL.
Enter a Secret Key.
Choose the events you want under Events to Notify.
If you want, set Retry limit and Retry delay, or add custom headers on the Advanced Settings tab.
Save the webhook.
We sign every event with HMAC SHA256 and your secret key. The signature is in the header X-Webhook-Signature, as hex over the raw payload.
Your system has to answer with a 2xx status. If it doesn't, then we send the event again, up to the retry limit.
Events
Choose the events your system needs. The name is the value of event in the payload. Copy it as written, as return.canceled has one l and claim.cancelled has two.
We send these events on a return.
Event | When it is sent |
| Your customer starts a return |
| The return is created, the emails are sent and the label is generated |
| A label is generated for the return |
| The return is edited, on its lines or its exchange items |
| You pause the return for review |
| You resume a paused return |
| The return is reset to its initial state |
| The return is cancelled |
| The return package is set to in transit, and Instant Exchange is on |
| The hold on the exchange item is released |
| The exchange item is fulfilled in Shopify |
| Auto Close is scheduled for the return |
| A scheduled Auto Close is cancelled |
| Auto Close has closed the return |
| The return is closed and every return action is carried out |
| The gift card code is sent to your customer |
We send these events on a claim.
Event | When it is sent |
| Your customer starts a claim |
| Your customer has completed the claim, and it is ready for your review |
| You have reviewed the claim |
| A label is generated for the claim |
| The hold on the replacement is released |
| The gift card code is sent to your customer |
| The claim is closed and every resolution is carried out |
| You cancel the claim |
We send these events on the return package of a return or a claim.
Event | When it is sent |
| A tracking event shows that the return package is in transit |
| A tracking event shows that the return package is delivered |
The two shipment events depend on tracking events from the carrier. Learn more in Tracking.
Payloads
The payload is the JSON body of the request we send. Every payload has these fields.
Field | What it holds |
| The name of the event |
| When the event happened, as an ISO 8601 date and time |
| The myshopify domain of your shop |
| The details of the return or the claim |
data holds the core details, not the full return or claim. A test event has test set to true in data.
The return reason is only in return.completed, as returnReasonId and returnReasonNote on each returned line. GET /return-reasons in the API gives the text of each id.
Every return event carries returnOrderId and shopifyOrderId, with these exceptions. return.created and return.giftcard_code_sent carry neither, only the order name. return.paused and return.resumed carry returnOrderId without shopifyOrderId.
The claim events carry the claim id as id. claim.cancelled carries it as claimId, and claim.label_generated as claimOrderId. claim.giftcard_code_sent carries the order name only.
The two shipment events carry entityType, which is RETURN or CLAIM, and entityId, which is the id of that return or claim.
return.closed carries who closed the return, the return actions, and each line with its SKU, its barcode and its quantity. The two gift card events carry the gift card code itself.
If you need more than the payload holds, then fetch the full return from the API with returnOrderId. Learn more in Custom Integrations and API.
The fields of every payload are listed as schemas at the bottom of the API docs.
Logs and retries
Select View Logs on the Webhook integration to see every event we sent and how your system answered. You can send a single event again from the log. The log keeps events for about 30 days.
Good to know
If you have more than one shop, then add a webhook in each.
Slack, Shopify Flow, Klaviyo and Drip receive events as well, and work alongside a webhook.


