Payment links
Create a link on a ready instance, set amount and usage rules, publish it, and share the URL to start collecting payments.
A payment link is a shareable URL that charges customers. It is the fastest way to start collecting — no checkout to build. This is your "start working" moment: once a link is published, its URL can be paid by anyone you share it with.
A link is created under a payment instance that is ready,
and can optionally use a published form.
How a link charges
Two settings define a link's behaviour. Both have full value lists in Statuses & enums.
amount_mode — how much the customer pays:
| Mode | Behaviour |
|---|---|
fixed | A single set amount. |
open | Payer chooses, optionally bounded by min_amount / max_amount. |
usage_mode — how many times / how long it can be paid:
| Mode | Behaviour |
|---|---|
one_shot | One payment, then exhausted. |
limited | Up to max_uses payments, then exhausted. |
reusable | Unlimited until you archive it. |
capped_amount | Closes when total_collected reaches target_amount. |
time_window | Payable only between starts_at and ends_at. |
whitelist | Only the allowed_payers you list can pay. |
Lifecycle
A link starts as draft and only accepts payments once active. exhausted, expired, and
archived are terminal.
Create and publish
Create the link (draft)
curl -X POST https://api.mytpe.appp/api/ext/links \
-H "X-Api-Key: $MYTPE_API_KEY" \
-H "X-Api-Secret: $MYTPE_API_SECRET" \
-H "Content-Type: application/json" \
-d '{
"payment_instance_id": "3e4f5a6b-7c8d-9e0f-1a2b-3c4d5e6f7a8b",
"title": "Order #10428",
"amount_mode": "fixed",
"amount": 4500,
"currency": "DZD",
"usage_mode": "one_shot",
"form_id": "4f5a6b7c-8d9e-0f1a-2b3c-4d5e6f7a8b9c",
"metadata": { "order_id": "10428" }
}'{
"data": {
"id": "5a6b7c8d-9e0f-1a2b-3c4d-5e6f7a8b9c0d",
"slug": "ord-10428-x9f2",
"title": "Order #10428",
"amount_mode": "fixed",
"amount": "4500.00",
"currency": "DZD",
"usage_mode": "one_shot",
"status": "draft",
"paid_count": 0,
"total_collected": "0.00",
"metadata": { "order_id": "10428" }
}
}Publish it
curl -X POST https://api.mytpe.appp/api/ext/links/5a6b.../publish \
-H "X-Api-Key: $MYTPE_API_KEY" \
-H "X-Api-Secret: $MYTPE_API_SECRET"The link's status becomes active.
Share the URL
Build the customer URL from the slug and send it. Display it exactly as returned — do not
rebuild or shorten it.
https://pay.mytpe.appp/ord-10428-x9f2Get paid
When a customer pays, a transaction.paid webhook fires and the link's paid_count /
total_collected update. Use the metadata you set to reconcile against your order.
Manage a live link
| Action | Endpoint | Effect |
|---|---|---|
| Pause | POST /links/{id}/pause | Temporarily stop accepting payments (paused). |
| Resume | POST /links/{id}/resume | Re‑activate a paused link. |
| Archive | POST /links/{id}/archive | Permanently close the link (terminal). |
Some fields are immutable once a link has been paid (for example amount_mode and amount). To
change pricing, archive the link and create a new one.
→ API: Payment links