Skip to content

WooCommerce ​

For WordPress sellers with their own WooCommerce shop, e.g. the paid "Pro" version of a plugin.

Setup ​

  1. SunLicense: Integrations → WooCommerce → Connect. Map WooCommerce product IDs to policies, or *. SunLicense creates a webhook secret.
  2. WooCommerce Settings → Advanced → Webhooks → Add webhook: status Active, topic Order updated (add a second one for Order created if you like), delivery URL = the hook URL, secret = the one on the integration page, API version WP REST API v3.
  3. Link the integration's redeem page in your order emails. Buyers enter the order number and their billing email.

Check it in your plugin with the PHP SDK (see SDKs).

Behaviour ​

Order statusSunLicense does
processing, completedOne license per product line (once, however many updates follow)
refunded, cancelledRevokes
anything elseLogged

X-WC-Webhook-Signature (base64 HMAC-SHA256 of the body) is checked. The unsigned ping WooCommerce sends when you save the webhook is acknowledged.