WooCommerce Plugin Integration
WordPress plugin for selling ROOPON packages on your WooCommerce checkout. Affiliate merchants — not discount-directory partners.
Who this is for
Install the plugin
- 1
Get the plugin zip
Source lives in integrations/roopon-woocommerce/ in the ROOPON repo. Zip and upload via WordPress → Plugins → Add New → Upload Plugin. - 2
Activate
Enable the plugin, then open WooCommerce → ROOPON Giveaways. - 3
Set ROOPON site URL
Default:https://www.roopon.com— change only for staging.
cd integrations/roopon-woocommerce
zip -r roopon-woocommerce.zip . -x "*.DS_Store"Connect with ROOPON
OAuth-style flow — no developer API key. Merchant signs in on ROOPON; plugin exchanges a one-time code for store credentials.
- 1
Click Connect with ROOPON in WP admin
Opens /woocommerce/connect with store metadata and return URL. - 2
Sign in as affiliate merchant
Creates or enables is_affiliate_enabled on your ROOPON profile. - 3
Return to WordPress
Plugin calls POST /api/woocommerce/connect/exchange and saves store_id + webhook_secret.
/api/woocommerce/connect/authorize· ROOPON user session/api/woocommerce/connect/exchange· One-time connect codeSync giveaways
Pulls active giveaway manifest and registers WooCommerce product/variation IDs after sync.
/api/woocommerce/giveaways/sync· Store id + HMAC/api/woocommerce/products/register· Store id + HMACOrder webhooks
On order processing/completed, the plugin forwards ROOPON line items with an HMAC signature. ROOPON creates the package's bonus entries and records commission in woocommerce_orders.
/api/woocommerce/webhooks/orders· X-Roopon-Store-Id + HMAC/api/woocommerce/status· Store id + HMACAuthentication (plugin → ROOPON)
After connect, all plugin API calls use:
- Header
X-Roopon-Store-Id— store UUID from connect - Header
X-Roopon-Signature—HMAC-SHA256(body, webhook_secret) - GET requests sign an empty string as the body
Ended giveaways
A 2-minute WP cron (same cadence as the Shopify end-giveaways safety job) calls /api/woocommerce/status. ROOPON returns live products_to_draft for ended giveaways; the plugin sets those products to draft.
Database (operators)
Run in Supabase SQL editor (dev then prod):
- supabase/migrations/20260606_woocommerce_integration.sql
- supabase/migrations/20260607_woocommerce_connect_codes.sql
Then yarn types:supabase
Merchant marketing page — overview, FAQ, and install CTA for store owners (not technical reference).
