WooCommerce
Connect a WooCommerce store to AffiHQ without adding affiliate code to your application.
Updated August 15, 2026
The AffiHQ plugin handles referral capture, paid orders and refunds inside WooCommerce. You do not need to expose an API key in WordPress, forward Stripe webhooks or modify your checkout code.
V1 supports one AffiHQ product per WordPress site and one-time WooCommerce orders. Subscriptions, chargebacks and disputes are not sent by the plugin yet.
Before you connect
Your site needs:
- WordPress 6.4 or newer;
- WooCommerce 8.5 or newer;
- PHP 8.3 or newer;
- HTTPS outside local development.
Set the AffiHQ product destination to the page where affiliate visitors should enter your WooCommerce site. AffiHQ adds an opaque affihq_ref parameter to that destination.
Install and pair the plugin
- Install and activate AffiHQ for WooCommerce in WordPress.
- In AffiHQ, open Products, edit the product, then find WooCommerce connection.
- Select Generate pairing code. The code is shown once and expires after ten minutes.
- In WordPress, open WooCommerce > AffiHQ, paste the code and select Connect.
- Check that WordPress reports the connection as verified and that the store appears in the product drawer in AffiHQ.
The code is exchanged server to server, used once and never saved by the plugin. Pairing also moves that product out of Stripe Payment Link routing and into API mode. The connected Stripe account itself is not revoked.
What happens after a referral
- The affiliate link records a click and redirects the visitor to your product destination with
affihq_ref. - The plugin stores that opaque reference in a first-party cookie for up to 90 days, then copies it to private WooCommerce order metadata.
- A paid order creates an attribution and one payment event in AffiHQ.
- A full or partial WooCommerce refund creates the matching correction.
Checkout never waits for AffiHQ. The plugin writes a local outbox record and Action Scheduler delivers it in the background. Duplicate WooCommerce hooks keep the same business key, so they do not create duplicate payments or refunds.
The plugin supports classic checkout, Cart and Checkout Blocks, legacy order storage and High-Performance Order Storage (HPOS).
Delivery status and retries
Open WooCommerce > AffiHQ to see pending and failed deliveries, the last successful request and its request ID. Temporary network failures, timeouts, rate limits and server errors are retried with bounded backoff. A permanently failed row can be retried manually after you correct its cause.
The queue contains event coordinates and delivery status, not customer emails, API secrets or payment details.
Disconnect or revoke
Use Disconnect locally in WordPress to remove the encrypted local credentials from that site. Use Revoke in the AffiHQ product drawer when you need to invalidate that specific site's credential immediately.
Revoking a WooCommerce connection does not erase clicks, payments, refunds or commissions already recorded in AffiHQ.
Troubleshooting
- The pairing code is rejected: generate a new code and use it within ten minutes. A code cannot be reused.
- The site does not verify: confirm that WordPress can make outbound HTTPS requests to
https://affihq.com. - A paid order is missing: check the delivery queue and confirm that the order contains a referral reference. Orders without an affiliate reference are intentionally ignored.
- Affiliate links open the wrong page: update the product destination in AffiHQ. Pairing disables a previously selected Stripe Payment Link for that product.
- A connection was revoked: generate a new pairing code. The previous credential cannot be restored.