On this page
Choose your way first: links or the API
Both open the same payment page. What differs is who matches the payment to the student.
| Topic | Payment link | Invoice through the API |
|---|---|---|
| Setting up | A few minutes in the dashboard, no code | A little development on your site |
| Matching the student | By hand, from your form | Automatic, by enrolment number |
| Opening access | You do it | Your system does, on a webhook |
| Suits | A few dozen students a term | Platforms that enrol all year |
A payment through a link tells you which module was sold; if the link asks for a name and an e-mail address, the invoice also says who paid. If you have an enrolment form of your own, the flow below matches the two with a single number.
Enrolment without code
- The student enters a name, an e-mail address and the module in the form on your site.
- The last page of the form has that module’s payment link. Pressing the button opens a fresh invoice, and the student picks a coin and pays.
- Once the payment is final, the “Receipt no” on the PDF receipt is the full invoice number. Ask the student to enter it in a second field or to send it in reply to your e-mail.
- Type the whole number into the dashboard search. If the status is paid, open the module. What counts is the status in the dashboard, not a picture of the receipt.
One link per module
Splitting an eight-week programme makes the student’s risk smaller, and any refund discussion with it. An example:
| Module | Price | When the link is shared |
|---|---|---|
| 1. Reading scopes | $39 | On the course page, public |
| 2. Skin tones | $49 | By e-mail to those who finished module 1 |
| 3. Matching shots | $59 | In the last lesson of module 2 |
| Feedback session | Open amount from $10 | All term, for anybody |
The lowest amount on a link is $10. When enrolment closes, pause the link instead of deleting it; next term you update the price and reopen the same address. Mention the customer’s costs on the course page: the 1 USDT network fee on USDT, and the 0.4% commission if you pass it on.
Price in dollars. The amount locks when the student picks a coin, while TRX you have received moves with the market until you withdraw it. If you pay teachers in dollars, limiting the link to USDT keeps the sums simple; see rate locks.
Opening access when the payment is final
If your site can run code, nobody has to copy a number. Create an invoice when the enrolment is saved and put its number in order_id. The invoice.paid event that follows a final payment carries it back:
// when the enrolment form is submitted
const invoice = await hisarpay.invoices.create({
price_usd: '49.00',
order_id: 'enrol-318-skin-tones',
description: 'Module 2: Skin tones',
success_url: 'https://school.example/welcome',
});
// webhook: the body has to be read raw
app.post('/webhooks/hisarpay', express.raw({ type: 'application/json' }), async (req, res) => {
const event = HisarPay.webhooks.constructEvent(
req.body,
req.headers['x-hisarpay-signature'],
process.env.HISARPAY_WEBHOOK_SECRET!,
);
if (event.livemode && (event.type === 'invoice.paid' || event.type === 'invoice.overpaid')) {
await academy.openAccess(event.data.invoice.order_id);
}
res.sendStatus(200);
});Make openAccess safe to call twice, because events can be repeated. After an invoice expires use a new order_id, for example with an attempt number, since the same one returns the old invoice. And do not treat a visit to the welcome page as proof. Webhook signatures covers errors, test mode a safe rehearsal.
Enrolling with a QR code on a live stream
At the end of an open lesson, show the link’s QR code (PNG) and stay on that scene for at least two minutes. Post the address in the chat and the description as well: somebody watching on a phone cannot scan their own screen. A separate link per stream shows how many enrolments each brought, under Payments. If the recording stays online, pause the link when the offer ends.
Payment buttons in WordPress
With the WordPress payment buttons plugin, one line on the lesson page is enough. Use a link you prepared in the dashboard and the statistics gather under that module:
[hisarpay_button link="pl_7kQm2xPaW4" style="card" label="Join module 2"]Write the refund terms in advance
A crypto payment cannot be reversed; you send refunds from your balance. Your text should answer four questions: until when, how much, in which coin, to which address? A starting point:
The periods are only examples; consumer law may ask more of you, so check with a lawyer. As the smallest withdrawal is worth $10, smaller refunds may have to become credit. The steps are in our article on refunds.
Cover late payments too. Money sent to an expired invoice is credited and flagged as late; if the class is full by then, ask whether the student prefers next term or a refund.
What to have at the end of term
- The enrolment list: name, e-mail, module, invoice number.
- The invoices as CSV or Excel: date, order number, dollar amount, coin, amount paid, description.
- Withdrawals for refunds, with the enrolment number in the note.
HisarPay does not issue tax invoices; ask your accountant which documents you need. Accounting exports explains the files.
Frequently asked questions
Can I sell in instalments?
Does the lesson open if a student sends too little?
How long until a payment is final?
Can a company pay for a group?
- #Online education
- #Payment links
- #Webhooks
- #WordPress
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.