Payment links
Create a payment link
Signs a link - nothing is stored. Send link to buyers as <checkout>/#/link/<link> (the SDKs build it: checkoutLink('link', link)); keep manage for yourself and open it as <checkout>/#/links/<manage>.
- once: an invoice. Every open mints an intent with the same reference, so the contract itself refuses a second payment. Expires in at most 30 days (default 7).
- reusable: a fixed price, payable any number of times until it expires (at most a year).
- subscription: a recurring payment. Each buyer signs once and pays the first period at once (/v1/links/subscribe); P2Flux keeps the subscription and collects every later period. When the buyer cannot pay, it retries after 1 hour, 6 hours and then daily, within the first quarter of the period (at most 3 days), then skips the period; three periods in a row the buyer could not pay end it. Periods missed because of trouble on P2Flux's side never count against the buyer. Period at least one day.
Which kinds a deployment offers is its choice; a kind not offered answers LINK_UNAVAILABLE.
LINK_UNAVAILABLE carries a reason: KIND_NOT_OFFERED (this deployment does not offer that kind), CONTRACT_CHANGED (the settlement contract a one-time link was made for was replaced), SUBSCRIPTIONS_FULL (the list of subscriptions P2Flux collects is at its capacity).
post/v1/links
Request
- Base URL: https://api.p2flux.com
- URL: https://api.p2flux.com/v1/links
- Auth: none required
Request body
Example request
{
"recipient": "0xb4e43f3fBa5Add75395adAD366627E7d74141Fa9",
"amount": "10.00"
}Response
The signed link, its private manage token and its terms.
Example response
{
"recipient": "0xb4e43f3fBa5Add75395adAD366627E7d74141Fa9",
"amount": "10.00",
"amount_units": "2500000"
}Changes
No recorded changes to this operation across all 1 revision of this API.