Open a payment link (buyer)
What the checkout calls when a buyer opens a link. One-time kinds return an ordinary intent (pay it as any intent); subscriptions return an ordinary 15-minute setup token; after finalize, the buyer's page joins the link with /v1/links/subscribe, which charges the first period. With payer, when that wallet already has a subscription through this link, the answer carries existing (with cancel and restore sessions) INSTEAD of a setup token - one subscription per wallet per link. This answer is given even after the link expired or the kind was switched off, so a subscriber can always cancel through the link.
Refused with LINK_UNAVAILABLE (reason: CONTRACT_CHANGED) when the contract a one-time link was made for has been replaced: re-minting it on another contract could let an invoice be paid twice.
Request
- Base URL: https://api.p2flux.com
- URL: https://api.p2flux.com/v1/links/open
- Auth: none required
Request body
Example request
{
"payer": "0xb4e43f3fBa5Add75395adAD366627E7d74141Fa9"
}Response
An intent or a setup token, plus the link's terms.
Example response
{
"recipient": "0xb4e43f3fBa5Add75395adAD366627E7d74141Fa9",
"amount": "10.00",
"amount_units": "2500000",
"reference": "0x2d6bbc112885a6976289e599f71003f7d310e7152ebd662c6221dffd3e0da708",
"existing": {
"subscription_id": "0x2d6bbc112885a6976289e599f71003f7d310e7152ebd662c6221dffd3e0da708"
}
}Changes
No recorded changes to this operation across all 1 revision of this API.