Getting started
Set up a tenant, install the DHRU plugin, send your first test payment.
Getting started
Quick checklist for returning users. First-time setup walkthrough lives in Installation.
- Register at
/registerwith username, email, password (12+ characters). - Verify your email by clicking the link.
- Wait for an admin to activate your tenant. You will be notified by email.
- Sign in. Open Integration in the sidebar.
- Set the Webhook URL pointing at your DHRU callback endpoint, e.g.
https://yourdhru.com/modules/gateways/callback/triapay.php. - Rotate the API key and Webhook secret. Both are shown only once — copy them immediately.
- Download the two plugin files from the same Integration page:
triapay.php→ drop intomodules/gateways/on your DHRU servertriapay-callback.php→ rename totriapay.phpand drop intomodules/gateways/callback/on your DHRU server
- In DHRU admin, enable the TriaPay gateway and paste your TriaPay API URL, API key, and webhook secret.
- Configure receive methods (master wallet addresses for TRC20/BEP20, Pay ID for Binance Pay) under Crypto and Binance Pay tabs.
- Send a
$1test deposit from a DHRU customer account. Confirm the order goespending → matched → creditedwithin seconds (typical detection latency 3–7 s plus chain confirmation).
Detection latency
End-to-end credit usually takes well under a minute. The dominant variables are chain confirmation and the polling tick that scans for matches.
| Chain | Polling tick | Typical end-to-end |
|---|---|---|
| TRC20 | 3 s | 3–7 s |
| BEP20 | 3 s | 3–7 s |
| Binance Pay | 5 s | 5–10 s |
These numbers exclude wallet broadcast time on the customer side. The polling cadence above is the listener's own scan rate; matched orders move to credited as soon as the webhook acknowledges. BSC eth_subscribe push and Binance Pay merchant-webhooks are on the roadmap for sub-second detection but are not shipped.
Login security
Sign-in flows through /auth/login with the following OTP options:
- Email OTP (default).
- WhatsApp OTP, available when a phone number is set on the profile.
- TOTP step-up bypass when 2FA is enrolled.
A "remember this device" cookie (7-day expiry, bound to the browser fingerprint and the /24 IP class) skips OTP on subsequent logins from the same network class. Revoke individual devices anytime from /me/devices.
Testing with sandbox mode
Sandbox mode lets you exercise the full order → webhook → DHRU round-trip without touching real chains, real funds, or your real DHRU invoices. Use it whenever you change the plugin config, rotate a key, or move DHRU to a new host.
One-time setup
- Dashboard → Integration tab → API Key card → switch to the Sandbox tab → click Generate sandbox key. Copy the
tpk_test_...value. - Same card, Webhook Secret subsection → Sandbox tab → Generate sandbox secret. Copy the value.
- In DHRU admin → Setup → Payment Gateways → TriaPay, paste the sandbox key into API Key (Sandbox) and the sandbox secret into Webhook Secret (Sandbox).
- Tick the Sandbox Mode checkbox in the same form. Save.
Trigger a test payment
- Dashboard → API Playground → switch the mode toggle to Sandbox (banner appears confirming sandbox is active).
- Run Create order with any chain/asset combination. Copy the returned
idempotencyKey. - Run Force credit with that idempotency key. The simulator dispatches the webhook through the same crediter path used in production.
- Verify your DHRU server receives the POST with
X-Payment-Mode: sandbox(checkerror_log).
Your DHRU plugin's callback handler short-circuits sandbox webhooks automatically — it logs the event, returns 200 OK, and never calls addPayment. No live invoice is credited, no tblUsers.credit_left row changes.
When you are ready to switch to real traffic, untick Sandbox Mode in the DHRU admin form. The live API key and live webhook secret stay where they were; nothing else needs to change.