On this page
Which package for which version?
OpenCart 3 and 4 load extensions differently, so there are two packages and neither works on the other version. Their settings and behaviour are the same. Your version number is at the bottom of the admin panel, and both files are on the OpenCart integration page.
| Item | OpenCart 3 | OpenCart 4 |
|---|---|---|
| Package | hisarpay-oc3.ocmod.zip | hisarpay.ocmod.zip |
| Version | 3.0.x (tested on 3.0.3.3 to 3.0.5.1) | 4.0.x and 4.1.x |
| PHP | 7.1 or later | 8.0 or later |
| Regular re-check | A cron URL the extension gives you | OpenCart’s own scheduled task |
If your OpenCart release asks for a newer PHP, that requirement wins. The server needs the curl and json extensions, and the shop needs a valid HTTPS certificate.
Install it
- Download the zip and keep its name. OpenCart 4 names the extension folder after the file you upload.
- Upload it under Extensions → Installer. On OpenCart 4, also press Install on the row of the uploaded package.
- Under Extensions → Extensions, choose Payments as the type, then press Install and Edit on the HisarPay row.
Enter the key and the checkout settings
In the dashboard, create a key for this shop alone under Developers → API keys. The invoices scope is required. Add read as well and the connection test can also confirm that your webhook is registered. Start with a key that begins with hp_test_.
- Coins offered: USDT, TRX or both.
- Invoice lifetime: 5 to 1440 minutes. A payment that arrives later is still credited to you.
- HisarPay commission: account default, you or the customer. We compare the options in who should pay the fee. The 1 USDT network fee on USDT invoices is always part of what the customer sends.
- Minimum order: the smallest invoice is $10, so do not set this below 10.
- Order reference prefix: random for each installation. Two shops on one HisarPay account must not share a prefix.
If your prices are not in dollars
Invoices are priced in US dollars. For a USD order the exact total is charged; for other currencies the extension uses OpenCart’s own rate. Under System → Localisation → Currencies, USD has to exist, be enabled and carry a current rate. If it is off, the payment method is hidden and the settings page says why. No rate is ever guessed.
Connect the webhook
Copy the Callback URL from the settings page, add it as an endpoint under Developers → Webhooks in the dashboard, and paste the whsec_ secret you get into the extension. The address depends on the version:
# OpenCart 4
https://yourstore.com/index.php?route=extension/hisarpay/payment/hisarpay.callback
# OpenCart 3
https://yourstore.com/index.php?route=extension/payment/hisarpay/callbackOn OpenCart 4.0.0 and 4.0.1 it ends in hisarpay|callback, so copy it from the screen rather than from this page. Then press Test connection. It checks that the key works, whether it is test or live, that the secret has the right shape and that the endpoint is registered. It never creates an invoice.
The extension does not trust what a callback says. It checks the signature, reads the invoice from the API again and acts on that answer; how signatures work has its own article. If a callback goes missing, open invoices from the last three days are re-checked every 10 minutes. On OpenCart 4, point your server’s cron at cron.php. On OpenCart 3, schedule the cron URL shown under Advanced. With no cron at all, storefront visits trigger the check.
What the customer sees
The customer picks HisarPay and sees the dollar total. On Confirm the order becomes Pending and the HisarPay page opens. Choosing a coin there locks the rate and shows the exact amount with a QR code. After 20 block confirmations, about a minute, the invoice counts as paid and the customer returns to your store. If the old invoice expired or the total changed, the next attempt gets a fresh one with -2 at the end of its reference.
Map the order statuses
| Invoice | Default status | What happens |
|---|---|---|
| Pending | Pending | The order e-mail carries the payment link |
| Partly paid | Pending | Received and missing amounts go into the history |
| Paid | Processing | Ready to prepare |
| Overpaid | Processing | The extra is noted in the history |
| Expired | Canceled | A late payment re-opens the order with a note |
| Cancelled | Canceled | The invoice was cancelled in the dashboard or API |
Every row can point at any status in your store; a shop that sells downloads may send paid orders straight to Complete. Once you have moved an order on yourself, to Shipped for example, the extension only adds notes. The same goes for an order whose total you edited after the invoice was created: the status stays put and a note explains the difference.
Place a test order
- Order something with the test key saved and choose HisarPay.
- On the payment page, press Paid among the simulation buttons. The order should become Processing.
- On a second order try Partial and then Paid, on a third Expire.
- Open the order in the admin panel and try Check payment status.
- When all of that works, swap in the live key. Our go-live list covers the rest.
The usual mistakes
- A renamed file: download the same zip twice and the browser adds “(1)” to the name. Restore the original name before uploading.
- Someone else’s secret: each endpoint has its own signing secret. With the wrong one, every callback is rejected.
- A firewall: if the delivery log in the dashboard shows 403 or timeouts, allow requests to the callback URL.
Frequently asked questions
Can I install the OpenCart 4 package on OpenCart 3?
Does an order get stuck if a callback never arrives?
Why is the payment method not showing?
Can I refund from the extension?
- #OpenCart
- #E-commerce
- #Extension
- #Webhooks
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.