Supported Webhook Events
You can subscribe to the following event types. When an event occurs, fabric sends a real-time HTTP request to your configured webhook endpoint.Orders
| Event | Description |
|---|---|
| Order Created | Triggered when a new order is placed. |
| Order Canceled | Triggered when an order is canceled. |
| Order Returned | Triggered when a return is initiated for an order. |
| Order Ship To Address Updated | Triggered when a retailer updates the shipping address for an order. |
Connections
| Event | Description |
|---|---|
| Connection Created | Triggered when a supplier-retailer connection is created. |
| Connection Established | Triggered when a connection becomes active and ready for order flow. |
Proposals
| Event | Description |
|---|---|
| Proposal Approved | Triggered when a product proposal is approved by a merchant. |
| Proposal Completed | Triggered when a proposal is marked as complete. |
| Proposal Declined | Triggered when a proposal is declined by a merchant. |
| Proposal Revised | Triggered when a proposal is updated by the supplier. |
| Proposal Collaborator Added | Triggered when a collaborator is added to a proposal. |
| Proposal Owner Reassigned | Triggered when ownership of a proposal is reassigned. |
| Proposal Pricing Approved | Triggered when proposed pricing is approved. |
| Proposal Product Approved | Triggered when a product within a proposal is approved. |
| Proposal Product Rejected | Triggered when a product within a proposal is rejected. |
| Proposal Variant Approved | Triggered when a product variant is approved. |
| Proposal Variant Rejected | Triggered when a product variant is rejected. |
| Proposal Variant Removed | Triggered when a product variant is removed from a proposal. |
Returns (RMAs)
| Event | Description |
|---|---|
| RMA Approved | Triggered when a return merchandise authorization (RMA) is approved. |
| RMA Rejected | Triggered when an RMA request is rejected. |
| RMA Completed | Triggered when an RMA is marked as completed. |
| RMA Return Approved | Triggered when the return items within an RMA are approved. |
| RMA Return Received | Triggered when returned items are physically received. |
| RMA Return Rejected | Triggered when returned items are rejected during processing. |
Adding a webhook
- Click your business name in the menu at the top of the page in Dropship and click Supplier Settings. The Supplier Settings page is displayed.
- Click Webhooks (Advanced). The Webhooks page is displayed.
- On the Webhooks page, click Add Webhook. The Add Webhook window is displayed.
- In the Topic field, select the event you want to subscribe to.
- In the Method field, select the HTTP method to use, whether POST, PUT, or PATCH. This determines how the event payload is sent to your server.
- In the URL field, enter the publicly accessible endpoint where you want to receive the webhook.
- In the Status field, select whether the webhook should be Enabled or Disabled.
- Click Add Webhook to save the configuration.
Your endpoint must respond with a 2xx HTTP status code to confirm successful delivery. If a webhook fails, fabric may attempt retries based on a backoff strategy.
Viewing webhook history
After configuration, you can monitor recent deliveries and failures on the Webhooks page in the Webhook History section. This helps confirm that events are triggering correctly and that your system is responding as expected.Webhook automatic retry timing
Retries do not occur at fixed intervals. Instead, fabric uses an exponential backoff strategy combined with a small random jitter to help prevent the “thundering herd” problem—where many clients retry at the same time. A typical retry schedule looks like this:- 30 seconds after the first failure
- 1 minute later
- 2 minutes later
- 4 minutes later
- 8 minutes later
- 16 minutes later
- 32 minutes later
- 64 minutes later
- 2 hours later
- 2 hours later (maximum delay)
Webhook Verification Process
fabric Dropship signs all webhook requests using an HMAC-SHA256 signature to verify authenticity and protect against tampering. Treat your webhook secret as confidential information and store it securely. Unauthorized access to the secret would allow malicious actors to forge webhooks that appear authentic to your application.
Generating a webhook secret
You must generate a webhook secret before verifying signatures.- Go to Supplier Settings > Webhooks.
- Click Generate Secret.
- Reveal the secret and copy it for use in your integration.
If the secret is ever compromised, click Generate New Secret and confirm to replace it.
Using the API
- To generate a new secret, send a POST request to:
- (Optional) to replace an existing secret, include the following payload in your request:
- A new webhook secret will be generated and returned in the response:
Verifying a webhook
After you generate a webhook secret, fabric Dropship signs every webhook request using that secret. The signature is included in the fabric-dropship-signature header. To verify that a webhook is authentic, follow these steps:- Retrieve the raw webhook body. Use the exact body received from the request, without modifying whitespace, formatting, or character encoding.
- Generate the HMAC. Create an HMAC-SHA256 hash using: Create an HMAC-SHA256 hash using your webhook secret and the raw request body.
- Compare the signatures. Compare your computed hash to the value in the fabric-dropship-signature header. If the values match, the webhook is authentic. If they do not match, the webhook may be unverified and should be rejected.
Example Python Implementation
Example Python Implementation
