Skip to content

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"  }'
  1. Payment link (one url, reused) → Payment (with the link_id)
  2. Payment (with the link_id) → succeeded (paid in full)
  3. Payment (with the link_id) → failed (canceled, final)
  4. Payment (with the link_id) → expired (the quote ran out)
  5. expired (the quote ran out) → Payment link (one url, reused): the next visit starts a new payment
Every visit to a link makes its own payment, so one link can be paid any number of times.
  • 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, so GET /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 failed and you receive payment.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.
UseWhen
A payment linkOne price for many customers, shared without code, such as a product or a donation.
An API paymentOne order for one customer, with your own reference and metadata, created by your server.