Payment links
A payment link is a URL to our payment window, where the payer pays for one order. It can be paid once, for its whole amount, until it expires; when it is, it becomes a transaction.
Requests
| Request | What it does |
|---|---|
POST {shopid}:pay/new |
Create a link for an order. |
DELETE {shopid}:pay:{payid} |
Delete a link before it expires. |
From link to transaction
- When the payer clicks Pay in your checkout, your server
creates a link, with your
"orderid"and the items. - You redirect the payer to the link's
"url". - The payer pays in the payment window, with 3-D Secure if their bank asks for it. A declined payment stays in the window, where the payer can try again.
- When the bank has authorized the payment, we create a transaction,
and the window sends the payer to your
"successurl". - We ping you, and seq returns the
transaction, with your
"orderid". This, not the redirect, is when the order is paid. - You capture the transaction when you deliver, unless the
link had
"autocapture".
What the payer sees, from the payment methods to 3-D Secure, is in the knowledge base's The payment window.
A link's states
| State | What it means | Opening the link |
|---|---|---|
| Open | Created, not yet paid, and not expired. | Shows the payment window. |
| Paid | The bank authorized a payment, and there is a transaction. | Shows a confirmation for 10 minutes, then 404. |
| Expired | Its "lifetime" ran out unpaid. |
404, with a page that says it expired. |
| Deleted | You deleted it. | As for an expired link. |
A link can't be changed: to change the order, delete its link and create a new one. Only a paid link leaves a trace in seq, as a transaction; a decline, an expiry, or a delete does not.
Rules
- A link is paid once, for the sum of its items. A second payment of it is not possible, from the same window or another.
- It can be open in several windows or devices at once, and keeps its state on our servers, so the payer can reload, go back, or switch device. While one window is paying, another that tries gets an error, and can try again once the first is done.
- It expires after its
"lifetime": 1 hour by default, and from 5 minutes to 30 days. The payer must be done before then, 3-D Secure included, so use long lifetimes only for links sent by email or SMS. - Its ID is random, and longer the longer it lives, so that a link can't be guessed while it can be paid. See The link's ID.
- Anyone with the URL can pay the link, and see your shop's name and the amount, but nothing of the payer.
Subscribers
Create subscriber and Renew subscriber answer with links of the same kind, which open the same window, where the payer saves their card rather than only pays. They follow the same rules, and are deleted the same way.
See also
Create payment link, Delete payment link, and the implementation notes Orders and payment links and Websites and apps. In the knowledge base: The payment window, 3-D Secure, and PCI DSS.