MyStorefront Postback for WooCommerce
MyStorefront Postback connects a WooCommerce store to the MyStorefront affiliate tracking platform. It attributes sales to the affiliate or creator who referred the shopper and keeps discount codes in sync between the two systems.
What it does
- Real-time conversion postback — when an order reaches a paid status, the plugin sends the order details to your MyStorefront webhook, signed with an
Authorization: Bearersecret, so the referring affiliate is credited. - Refund clawbacks — when an order is refunded, a negative-total postback is sent so the commission is reversed.
- click_id capture — reads
?click_id=from the landing URL, stores it in a cookie + localStorage, and attaches it to the resulting order. Works with both classic and Block (Store API) checkout. - Automatic retries — failed postbacks are retried with exponential backoff via WP-Cron (up to 5 attempts).
- Delivery log — the most recent postback attempts are viewable on the settings page.
- Discount code sync — MyStorefront can create, update, and delete WooCommerce coupons through a secure REST endpoint, and the store notifies MyStorefront when a coupon changes, so both stay in sync.
The plugin runs entirely inside your WordPress site. All configuration is stored in the WordPress options table — no .env file or third-party hosting of your settings is required.
External services
This plugin connects your store to MyStorefront (https://mystorefront.io), the affiliate tracking platform operated by HashTopic (Pty) Ltd. The connection is required for the plugin’s core purpose — attributing referred sales and syncing discount codes — and is configured by you on the plugin’s settings page (you enter your MyStorefront webhook URL and secret, and generate an API key). No data is sent until you configure the connection; nothing is transmitted on a site where the webhook URL is left empty.
The plugin contacts MyStorefront in the following cases:
-
When an order reaches a paid status, and when an order is refunded. It sends an HTTP POST to the webhook URL you configure containing: the affiliate
click_id, the order ID, number, status and total, the currency, per-line-item details (product/variant ID, SKU, title, quantity, price), shipping/tax/discount totals, the customer’s billing email and phone number, and your store URL. This is the data used to credit (or, on refund, reverse) the referring affiliate’s commission. -
Discount code sync. MyStorefront calls this site’s REST endpoints to create, update, or delete WooCommerce coupons, and the plugin notifies MyStorefront when a coupon is changed on the store. Coupon data exchanged includes the code, type, amount, minimum spend, expiry date, and usage limit. These requests are authenticated with the API key you generate on the settings page.
By using this plugin you are sending the data described above to MyStorefront. Please review their terms and privacy policy:
- Terms of Service: https://mystorefront.io/terms
- Privacy Policy: https://mystorefront.io/privacy