On this page
Before you start
Make sure your store meets these requirements:
- WordPress 6 or later, WooCommerce 8 or later and PHP 7.4 or later.
- The site is live on a valid HTTPS certificate. Webhooks should only ever be delivered to secure URLs.
- A HisarPay account and a test key created under Developers → API keys in the dashboard (it starts with
hp_test_).
1. Install the plugin
- Download the plugin from the integrations page.
- In WordPress admin, go to Plugins → Add New → Upload Plugin and choose the ZIP file.
- Click Activate once the upload finishes.
Always download the plugin from the official source. Payment plugins control money flowing through your site, and modified copies from third-party sites are a serious risk.
2. Configure the payment method
Find HisarPay under WooCommerce → Settings → Payments and enable it. Then fill in these fields:
- Title and description: what customers see at checkout. Prefer wording that names the network, such as “Pay with crypto (USDT or TRX on TRON)”.
- API key: paste your test key for now.
- Webhook signing secret: the
whsec_secret you will create in the next step.
3. Connect the webhook
Webhooks let HisarPay tell your store the moment a payment is final. The plugin settings screen shows a notification URL unique to your store. Copy it, add it as a new endpoint under Developers → Webhooks in the HisarPay dashboard, then paste the generated signing secret into the plugin and save.
The plugin verifies every notification using the X-HisarPay-Signature header and rejects requests with a bad signature or a timestamp older than five minutes. Our webhook signature guide explains how that check works.
4. Understand order statuses
The plugin maps HisarPay invoice statuses to WooCommerce order statuses like this:
| Invoice status | WooCommerce order status | What to do |
|---|---|---|
| paid | Processing | Fulfil the order as usual. |
| overpaid | Processing | The extra is credited to your balance; refund it if you wish. |
| partial | On hold | Wait for the customer to send the rest. |
| expired | Pending payment | Cancelled once your hold-stock time runs out. |
Match hold stock to the invoice lifetime
WooCommerce reserves stock for unpaid orders for the “Hold stock” period under WooCommerce → Settings → Products → Inventory, then cancels the order. HisarPay invoices are valid for 60 minutes by default, which you can change in the dashboard. If hold stock is shorter than the invoice lifetime, an order can be cancelled while the customer is still able to pay. Keep both the same, or hold stock slightly longer.
Partial and late payments
After a partial payment the customer can send the rest to the same address, and the invoice is extended by at least 30 minutes. Payments that arrive after expiry are never lost: they are always credited to your balance and flagged as late. In that case you may need to review and reopen the order by hand. See how underpayments, overpayments and late payments are handled.
5. Test end to end in test mode
- Add a product to the cart and choose HisarPay at checkout.
- Confirm you land on the hosted checkout. Test invoices show simulation buttons at the bottom of the page.
- Run the “Paid” simulation and check that the order moves to Processing within seconds.
- Place new orders to try the “Partial” and “Expired” scenarios as well.
- Review the delivery log under Developers → Webhooks and make sure every notification got a 2xx response.
Test invoices never move real money or send anything on-chain. Our test mode guide explains how simulations work behind the scenes.
Troubleshooting
| Symptom | Likely cause | Fix |
|---|---|---|
| Orders stay in “Pending payment” | Webhooks are not reaching the store | Check the delivery log in the dashboard; review security plugins and CDN rules |
| Deliveries get 401 or 400 responses | Wrong or outdated signing secret | Copy the secret from the dashboard and paste it into the plugin again |
| Deliveries get 301 or 302 responses | The URL redirects | Enter the endpoint with HTTPS and the correct domain, with no redirect |
| The payment method does not appear at checkout | The method is disabled or the API key is missing | Enable it under Payments settings and save the key |
6. Go-live checklist
- Replace the test key with a live key that starts with
hp_live_. - Test and live events can reach the same endpoint; the
livemodefield in every event body tells them apart. Make sure the plugin, once on a live key, never applies test events to orders. - Set your underpayment tolerance under Settings → Store. Accepting small exchange-fee shortfalls cuts down on support.
- Run one more real order with a small amount.
- If you use a caching plugin, make sure the webhook URL is excluded from the cache.
Frequently asked questions
Does the plugin work with the block-based checkout?
What happens to the order if a webhook never arrives?
Which coins can my customers pay with?
Where does the customer go after paying?
- #WooCommerce
- #WordPress
- #E-commerce
- #Plugins
Try crypto payments in test mode
No setup or monthly fees. Experiment as much as you like in test mode and go live when you are ready.