Plugins & Snippets

Drop-in HTML form

Copy snippets/qoopay-form.html (repo) — a complete page with a server-side hash example. The form:

<form action="https://<your-qoopay-domain>/checkout/initiate" method="POST">
  <input type="hidden" name="amount"            value="50000.00" />
  <input type="hidden" name="site_redirect_url" value="https://yoursite.com/qoopay/callback" />
  <input type="hidden" name="txn_ref"           value="5D56AEE1D9E37_16045" />
  <input type="hidden" name="cust_name"         value="Babatunde Adeleke" />
  <input type="hidden" name="partner_id"        value="slotsystems" />
  <input type="hidden" name="live_api_key"      value="<live api key>" />
  <input type="hidden" name="order_id"          value="ORD-99824-Q" />
  <input type="hidden" name="hash"              value="<computed HMAC>" />
  <button type="submit">Pay with QOOP-Pay</button>
</form>

Compute the hash on your SERVER (never ship the API key to the browser) — algorithm in Posting a Transaction.

WooCommerce plugin skeleton

snippets/woocommerce-qoopay.php is a minimal gateway plugin skeleton: settings for the API key, redirect URL and webhook secret; checkout redirect via the form POST; redirect validation; gettransaction confirmation before marking the WooCommerce order paid; webhook handler stub.

Order settlement lifecycle for merchants

  • Payment success → order is held (ESCROW_HOLD; funds not yet in your settlement balance).
  • Ship the order; when delivery is confirmed the state advances DISPATCHED → DELIVERED_CONFIRMED → ESCROW_RELEASED (ops/driven flow in this release).
  • Settled orders land in your MerchantHub settlement balance (amount − commission); request payouts there.