Webhook best practices

The following best practices will enhance your app's ability to handle webhook requests with greater robustness.

Simplying webhook processing

We recommend simplifying the processing of webhooks. This is crucial to avoid overloading your server, especially when processing many webhooks at once. Heavy processing will also result in slower response times, which could exceed the required response time and cause webhook failures.
A viable solution is to process webhooks asynchronously, ensuring a "200 OK" response within the time limit while handling more complex processing separately.

Implement event reconciliation

As webhook notifications are not guaranteed, we recommend implementing reconciliation process for data accuracy. It can be done via a long-polling mechanism to periodically fetch data from the API. This approach mitigates the risk of webhook undelivery or delays. By incorporating both webhook and API long-polling implementations, your app can achieve optimal stability and robustness.

icon-accounticon-add-newicon-add-storeicon-appicon-appleicon-archiveicon-arrowdownicon-ascicon-bookicon-cancelicon-cart-addonicon-checkouticon-cherryicon-collectionicon-comfirmicon-confirmicon-couponicon-creditsicon-currencyicon-dashboardicon-discounticon-disintegrateicon-domainicon-dscicon-duplicateicon-editicon-emailicon-exclamation-triangleicon-exporticon-eyeicon-eye-slashicon-fullscreenicon-fullscreen-closeicon-generalicon-gifticon-gridicon-hddicon-helpicon-importicon-infoicon-integrationicon-invoiceicon-likeicon-listicon-locationicon-logouticon-new-tabicon-not-secureicon-optionicon-ordericon-outline-arrowdownicon-pageicon-paymenticon-plusicon-posicon-pricingicon-printericon-producticon-product-sumicon-product-sum-xicon-redirecticon-reporticon-reseticon-searchicon-secureicon-settingicon-shippingicon-staricon-storeicon-switch-storeicon-tagicon-taxesicon-templateicon-themeicon-tickicon-trashicon-unarchiveicon-uploadicon-user-tagicon-usersicon-weighticon-wholesale