HotVoucher Pay· integration sampleYour buyers pay with their HotVoucher wallet, a HotVoucher voucher code, or any crypto on the networks HotVoucher supports. Every payment lands in your HotVoucher account in the coin the buyer paid (or in the settle coin set for your account), minus the gateway fee. Copy the files below, set two environment variables and you are live.
In the HotVoucher app: Voucher → API token for your site. Allow your server IP, set the callback URL, save the callback secret.
Your server calls POST /api/v1/invoices with the customer id and the amount (USD or IRR, or none for a top-up).
Redirect to the invoice's payUrl; when the payment is done the page brings the buyer back to your returnUrl.
invoice.paid / payment.received arrive signed with your callback secret. Mark the order paid there.
hvk_…) in the browser. Only your server talks to /api/v1/*; the page only receives the invoice id.A HotVoucher payment page with the amount, a countdown and three ways to pay:
Anything that arrives — full, partial, more, or after the invoice expired — is yours and is reported by payment.received. Credit your customer on your side (for example top up their balance).
GET /api/v1/fees).networkFeeUsd in /api/v1/fees and in every payment.received webhook). Wallet and voucher payments have no network fee.List the addresses created for your customers with GET /api/v1/addresses?customer=&network=, and check any address with GET /api/v1/addresses/validate?address=…&network=TRC20 → {valid, mine, customer} (valid format / one of your customers' addresses).
| Field | Required | Meaning |
|---|---|---|
customer | yes | Your user id / username (max 64). Decides the customer's permanent deposit addresses. |
amount + currency | no | "USD" or "IRR". Without an amount the invoice is an open top-up: any amount is accepted. |
orderId, description | no | Shown to the buyer and returned in webhooks. |
returnUrl | no | https URL for the "Back to shop" button. |
expiresInMin, lang | no | Minutes until the invoice expires (5…10080); page language "en" / "fa". |
Full reference: /api/v1/docs
Use Payment links in the HotVoucher app (More → Payment link): create a link with a fixed or open amount, send it anywhere or show its QR code — every payment to it goes straight to your account. No coding, no domain.