Payment links

A payment link is a reusable payment URL with a fixed price: create it once, share it anywhere, and any number of buyers can pay it. It opens the same checkout widget as a regular payment - if you need a one-time invoice for a specific order instead, see Widget integration.

Creating a link

Create one on the Payment Links page: amount, currency, optional description, redirect URLs, callback URL and params, fee payer, and a test toggle. You get a URL like:

https://pay.cryptunnel.io/link/e0f5a1c2-...

Share it anywhere. Opening the page never creates anything - chat preview bots can fetch it safely. A payment appears only when a buyer presses Pay; each press creates an independent payment that continues through the normal checkout flow.

The list page shows every link with its payments count and total collected, a copy button and a QR code. Deleting a link stops its URL from accepting new payments; payments already made are untouched.

Tagging link payments with your own order id

Append ?external_id=<your order id> to the link URL:

https://pay.cryptunnel.io/link/e0f5a1c2-...?external_id=425325

The payment is created with that external_id, and the webhook carries it back - so a bot can substitute its order variable into the URL and match the paid order without any API call. As soon as the page opens, the widget removes the parameter from the address bar and keeps it in the tab's memory - so a URL the buyer copies and re-shares never carries their order id, while a page refresh keeps it. Pressing Pay again with the same external_id returns the same payment instead of creating a duplicate; an external_id already used by another payment of your merchant is rejected with 400.

❗️

The buyer can edit the URL, so treat the incoming external_id as untrusted: match the order by it, but verify link_id (and the amount) before marking the order paid.

Callbacks for link payments

Every payment born from a link fires its own webhook with its own identity:

  • id - the payment id (new for every payment)
  • external_id - your id from the URL, or generated per payment
  • link_id - the link's public id, the same for every payment of that link

So your system credits orders by link_id (which product was bought) while id / external_id deduplicate individual payments. Payments not born from a link have no link_id field.

The link's callback params are included in every webhook of that link, with system fields winning on key collisions. Verify the delivery as described in Webhook verification.


Did this page help you?