WooCommerce Plugin Integration

WordPress plugin for selling ROOPON packages on your WooCommerce checkout. Affiliate merchants — not discount-directory partners.

Who this is for

Affiliate merchants on WordPress + WooCommerce. Connect with ROOPON (no API key paste). Earn ~40% commission on qualifying checkout sales.

Install the plugin

  1. 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. 2

    Activate

    Enable the plugin, then open WooCommerce → ROOPON Giveaways.
  3. 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. 1

    Click Connect with ROOPON in WP admin

    Opens /woocommerce/connect with store metadata and return URL.
  2. 2

    Sign in as affiliate merchant

    Creates or enables is_affiliate_enabled on your ROOPON profile.
  3. 3

    Return to WordPress

    Plugin calls POST /api/woocommerce/connect/exchange and saves store_id + webhook_secret.
POST
/api/woocommerce/connect/authorize· ROOPON user session
POST
/api/woocommerce/connect/exchange· One-time connect code

Sync giveaways

Pulls active giveaway manifest and registers WooCommerce product/variation IDs after sync.

GET
/api/woocommerce/giveaways/sync· Store id + HMAC
POST
/api/woocommerce/products/register· Store id + HMAC

Order 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.

POST
/api/woocommerce/webhooks/orders· X-Roopon-Store-Id + HMAC
GET
/api/woocommerce/status· Store id + HMAC

Authentication (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).