Payment links
Reusable hosted checkouts with a fixed price that you can share anywhere.
Payment link
No code- Code needed
- None
- Time
- Minutes
- Customization
- The link's name, price and currency, plus your checkout settings
- Best for
- One price for many customers, such as a product, a donation or a fixed invoice
A link is a reusable hosted checkout with a fixed price. Create one in the dashboard or with POST /links, then share its url anywhere: your site, an invoice, a chat or a QR code.
Create a link
curl -X POST "https://dash.402pay.co/api/v1/links" \ -H "Authorization: Bearer $PAY402_SECRET_KEY" \ -H "Content-Type: application/json" \ -d '{ "name": "Team plan, monthly", "amount": 19900, "currency": "USD" }'How links work
- Payment link (one url, reused) → Payment (with the link_id)
- Payment (with the link_id) → succeeded (paid in full)
- Payment (with the link_id) → failed (canceled, final)
- Payment (with the link_id) → expired (the quote ran out)
- expired (the quote ran out) → Payment link (one url, reused): the next visit starts a new payment
- Price it in USD, EUR, GBP, CAD and AUD. Customers pay the equivalent in the coin they choose.
- Every payment made through a link carries its
link_id, soGET /payments?link_id=…lists them. - Archive a link to stop taking payments without losing its history. A checkout a customer already opened keeps working, so they can still finish paying or send the rest.
- A link's payment lasts as long as its quote. If the quote expires before anything arrives, the payment is
expired, and the customer's next visit starts a new one. - If the customer cancels at checkout, the link's payment is
failedand you receivepayment.failed. Unlike a payment you create through the API, it can't be paid again. - A link's payments can have their remainder requested when a customer sends too little.
Links or payments
| Use | When |
|---|---|
| A payment link | One price for many customers, shared without code, such as a product or a donation. |
| An API payment | One order for one customer, with your own reference and metadata, created by your server. |