Merchants
Payment links and QR codes
Take a payment without building a page — a link or QR the customer opens, with a fixed or open amount.
Sometimes there is no checkout to build: an order sent by WhatsApp, a donation, a counter with a printed QR. A payment link is a KulPay page the customer opens to pay you; its QR code opens the same page from a phone's camera.
A link has a fixed amount, or leaves the amount to the customer. It can take one payment or many (usage_limit), and expire. Its payments are yours, with the usual payment.* webhooks.
In the KulPay app, a business also has links without code: payment requests (with their OR- reference, link and QR), its business QR code, and a link on every bill.
Before you start
Your application's key with links:write and links:read (secret keys have them; list them on a restricted key), and a webhook endpoint for payment.*.
The flow at a glance
| # | Who | What happens |
|---|---|---|
| 1 | Your system | Creates the link, with a fixed amount or an open one. |
| 2 | You | Share its url, as a link or as a QR code drawn from it. |
| 3 | Customer | Opens it and pays on KulPay's page. |
| 4 | KulPay | Sends the payment's result to your webhook. |
| 5 | Your system | Deactivates the link when it should stop taking payments. |
1. Create the link
Your system.
POST /v1/links · API reference
Leave amount out for an amount the customer chooses. usage_limit 1 makes a link for one order; 0 takes any number of payments. reference (3 to 128 characters) is yours, carried on every payment through the link.
Request
{
"amount": "1500.00",
"currency": "MZN",
"description": "Order 981",
"usage_limit": 1,
"expires_at": "2026-11-22T00:00:00Z",
"reference": "ORD-981"
}
Response
{
"id": "3L4aB1cD2eF3gH4iJ5kL6mN7oP8",
"slug": "k7Q2xM9p",
"url": "https://gateway.kulpay.pavulla.com/pay/k7Q2xM9p",
"account_id": "3KUXPz8rTq1Lm2Nb4Vc6Xs7Za9e",
"mode": "live",
"amount": "1500.00",
"currency": "MZN",
"description": "Order 981",
"reference": "ORD-981",
"active": true,
"usage_limit": 1,
"used_count": 0,
"expires_at": "2026-11-22T00:00:00Z",
"created_at": "2026-10-22T09:30:00Z"
}
2. Share it
You.
Send the url in a message or an email, or print a QR code of it: any phone camera opens it. The customer chooses how to pay on the page (as in the hosted checkout).
3. Follow the payments
Your system.
GET /v1/links/{id} · API reference
Each payment arrives at your webhook as payment.succeeded or payment.failed. The link's used_count says how many it took; GET /v1/links lists your links, newest first.
4. Deactivate it
Your system, when the order is paid elsewhere or cancelled.
DELETE /v1/links/{id} · API reference
The link stops taking payments. It is kept, so a customer who opens it is told it no longer works rather than seeing an error. A link of another account is never found to your key.
States
| State | What it means |
|---|---|
active | Takes payments until its usage limit or expiry. |
inactive | Deactivated, used up or expired. Opening it says so. |
When the money moves
Every payment through a link is a payment to you, like any other: see Getting paid.
Events
| Event | What it tells you |
|---|---|
payment.succeeded | Paid through the link. |
payment.failed | A payment through the link failed. |
Errors that matter here
Every error is application/problem+json with a stable code; branch on the code, not the message. The full list is in the error catalogue.
| Error | When | What to do |
|---|---|---|
400 invalid_link | An amount that is not a positive decimal, a bad expiry, or a reference shorter than 3 or longer than 128 characters; the | Fix the field. |
400 invalid_request | The link was refused, for example the account cannot take payments now; the | Read the |
403 insufficient_scope | The key lacks | Add the scope to a restricted key. |
404 not_found | No such link for this key (another account's, or the other mode's). | Check the ID and the key's mode. |
Testing it
Create a test link with usage_limit 1, open it and pay with a test number; open it again to see it used up. Create an open-amount link and pay two different amounts.