Skip to content
HisarPay

SDKs and plugins

Plugins

If you run an off-the-shelf store or billing platform, you can connect HisarPay without writing code. The plugins turn orders into invoices, send customers to the payment page and update order status when the webhook arrives.

Supported platforms

PlatformWhat it does
WooCommerceAdds a “Pay with TRX / USDT” option at checkout and updates orders automatically.
WordPressPlaces payment buttons and payment links on any page with a shortcode.
OpenCart 4 and 3Adds a payment method and lets you map order statuses.
WHMCSCollects invoices through HisarPay and closes them when the payment arrives.

Downloads and platform-specific screenshots are on the Integrations page.

Setting up

  1. Create a separate key for the plugin in the dashboard under Developers → API keys. The invoices and read scopes are enough.
  2. Upload and activate the plugin from your platform’s plugin manager.
  3. Paste the API key into the plugin settings.
  4. Add the webhook address shown on the plugin’s settings page under Developers → Webhooks in the dashboard, and enter the signing secret you get into the plugin.
  5. Place a test order with an hp_test_ key first, simulate the payment from the dashboard and watch the order status change. Then switch to the live key.

What happens behind the scenes

  • When the customer reaches the payment step, the plugin creates an invoice with an order_id derived from the platform’s order number. Paying again for the same order reuses the open invoice; an expired one is replaced by a new invoice with a -2, -3 suffix.
  • The customer is sent to the HisarPay payment page and returns to your store afterwards.
  • Order status changes through webhooks with a verified signature. The shop plugins (WooCommerce, OpenCart) also check the API every 10 minutes, and WHMCS when the client returns to the invoice; in every case the plugin re-reads the invoice from the API. invoice.paid and invoice.overpaid mark the order paid, invoice.partial keeps it on hold, and invoice.expired cancels it when nothing arrived or keeps it on hold after a partial payment. A payment that arrives after expiry re-opens a cancelled order.

Troubleshooting

  • Orders do not update: check the webhook delivery log in the dashboard. A 400 usually means a wrong signing secret; a 403 or a timeout usually means a firewall or caching plugin.
  • 401 unauthorized: the key was copied incorrectly or has been revoked.
  • Once fixed, resend the event from the dashboard; the plugin never processes the same order twice.