Create a payment link
Makes a payment link: an invoice for an amount, with no buyer on it. payUrl in the answer is the link. Whoever opens it gives their email address and pays, and the order is theirs. It is an invoice in every other way: it is listed with them, has a number and a PDF, and is cancelled if it is not paid in seven days.
A link is paid once unless uses says more. A link for more than one payment is never the order that is paid: each person who presses Pay on it is given an order and an invoice of their own, which names the link in linkOf, and the link’s uses says how many times it has been paid and how many are left. The count is asked when Pay is pressed, so two people who press it for the last use at the same moment can both pay.
It may be paid with whichever payment methods the store has switched on when it is made. It counts toward the 2,000 unpaid invoices a store may hold at once. To email it to somebody, send it (Send an invoice) with their address.
With currency, the amount is in that currency and the buyer is charged exactly it, where the store may charge in it: its own currency always, and the others only while adaptive pricing is on. The order is then for the amount’s worth in the store’s currency at the rate of the moment.
With items, the link sells products in place of an amount: it is for what they cost, in the store’s own currency, and whoever pays is sent them as any buyer is. amount and description are then left out. What it sells has to be in stock when the link is made, and again each time somebody pays through a link for several payments (out_of_stock).
It may be paid with every payment method the store has switched on, or with the ones named in gateways. It is open for seven days, or until expiresAt, or for dueDays days, up to 365.
Needs the invoices.write permission (Raise Invoices). It makes an order, and is counted against a budget of its own: 60 a minute for each key.
Authorizations
A secret API key, made under Developers in the dashboard: Authorization: Bearer shoply_sk_...
Headers
A word of your own for this one change, up to 180 letters, digits, dots, dashes, underscores and colons. Sent again with the same key, the request is not carried out twice: the first answer comes back, with Idempotent-Replay: true.
Path Parameters
The store's ID. A key reaches the store it was made in: GET /key answers which.
Body
How much to ask for, above zero. Left out when items is sent.
100
What it is for, up to 255 characters. The buyer sees it as the order's one line. Left out, the line is called Payment.
"Logo design deposit"
The currency the amount is in and the buyer is charged in, as a three-letter code. Left out, the store's own.
"USD"
How many times the link can be paid: 1 to 1,000.
Products the link sells, in place of an amount: up to 50 lines.
The payment methods it may be paid with, by their names in the payment methods list. Left out, every method the store has switched on.
When it stops being payable, as a date and time, or a day (YYYY-MM-DD) for the end of that day. At least an hour from now and at most 365 days.
"2026-11-30T23:59:59Z"
In place of expiresAt: how many days it is open, 1 to 365.

