On this page
Two tracks: trying and approval
Test mode works as soon as you have an account, while accepting real money waits until our team has reviewed your application by hand. Neither has to wait for the other. Build and test everything during the review and swap the key on the day of approval. The “Get set up” list on the dashboard overview follows the basic steps.
Keys
- One per integration: give each its own
hp_live_key. If one leaks, you revoke only that one. - Narrow scopes: a shop plugin needs
invoicesandread. Leave out withdrawals unless you use them. - IP allowlist: restrict the key to your servers, with up to 20 addresses or CIDR ranges.
- Storage: a key is shown once. Keep it in an environment variable or a secrets manager, never in a repository, browser code or a mobile app.
- End date: if you set one, put it in your calendar. We e-mail you 14 and 3 days before.
Creating a live key asks for your password and second step, and for an authenticator app or a passkey on the account. Doing the security section below first saves a detour.
Webhooks: signature, repeats, mode
Add your endpoint under Developers → Webhooks in the dashboard and check four behaviours:
- Signature: it is verified over the raw body, and a request with a bad one is refused.
- Repeats: when the same event arrives twice, the order is processed once.
- Mode: endpoints receive test and live events. Production never applies
livemode: falseto an order. - Time: a 2xx comes back within 10 seconds and heavy work goes to a queue. An event that gets no answer is tried ten times in all, over about two days.
app.post('/webhooks/hisarpay', express.raw({ type: 'application/json' }), async (req, res) => {
let event;
try {
event = HisarPay.webhooks.constructEvent(req.body, req.headers['x-hisarpay-signature'], secret);
} catch {
return res.sendStatus(400); // signature does not match
}
if (!event.livemode) return res.sendStatus(200); // production skips test events
await queue.addOnce(event.id, event); // the same id is never added twice
res.sendStatus(200);
});Details are in webhook signatures. Send an order_id with each invoice too: a second request with the same one returns the existing invoice instead of opening another.
Scenarios to try in test mode
| Scenario | How to try it | Expect |
|---|---|---|
| Full payment | paid | The order completes once |
| Short, then complete | partial, then paid | The rest is announced, then it completes |
| Overpayment | overpaid | The order completes, the difference is recorded |
| Never paid | expired | Stock is released |
| Late payment | expired, then paid | late shows and your rule applies |
| Repeated event | Resend from the dashboard | Nothing happens twice |
Simulate through the API, on the invoice page in the dashboard or with the buttons below a test payment page. The steps are in our guide to test mode, the field names in the documentation.
Account and money
- Authenticator app: withdrawals require it. Download the 10 recovery codes it comes with and keep them away from your phone. Each works once.
- Saved address: save the TRON address you will withdraw to and compare every character. It can become trusted after at least 7 days and 3 completed withdrawals; if you want automatic withdrawals, start that clock now.
- Withdrawal restriction: turn on withdrawing to saved addresses only. Addresses added later wait 24 hours, and that includes the ones you refund to.
- E-mail: protect the mailbox you sign in with by two-step verification as well. Codes go there.
All of this is covered in account security.
How the payment page looks
- Store name: the one customers know, not the legal entity.
- Logo: SVG, up to 500 KB. A separate one for dark mode is optional.
- Colour: used for the buttons on the payment page.
- Contact for payers: an e-mail address or a page, shown when an invoice has expired or was overpaid. Left empty, the customer does not know whom to write to.
- Lifetime, tolerance, commission: choose the default invoice lifetime, the underpayment tolerance and who pays the fee on purpose.
Notifications, and who to ask
Turn on payment and withdrawal e-mails and link the Telegram bot if you want it. Decide today who watches payment alerts and who sends refunds, and keep the refund steps at hand. When you are stuck, open a support ticket from the dashboard. Pick the invoice it concerns and, for API problems, add the X-Request-Id of the response. We aim to answer within 24 hours. If you suspect an outage, look at the status page first.
Launch day and the first week
- Put the live key on the server, restart, and search your configuration for any test key left behind.
- Send a
test.pingto the endpoint with Send test and see a 2xx in the delivery history. - Switch the payment option on at a quiet hour first.
- Every morning of the first week, look at three things: failed webhook deliveries, partly paid invoices and late payments.
Know how to switch it off as well. Disabling the method in the plugin or pausing a payment link takes seconds; open invoices are not affected, and payments that arrive are still credited.
One small, real payment
Make the first live payment yourself. Open a $15 invoice and send 16 USDT; 14.94 USDT is credited. Watch the order move and the e-mail arrive, then withdraw 13.94 USDT to your own wallet, with the remaining 1 USDT covering the fee. Do not test with $10: 9.96 USDT would be credited, below the $10 minimum for a withdrawal.
Frequently asked questions
Can I start integrating while I wait for approval?
Does my test data move to live?
What changes in the code?
- #Going live
- #Test mode
- #Webhooks
- #Security
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.