Create a payment link
order_create_payment_linkCreate a Stripe embedded-checkout link for an existing order, only when the customer asks to pay.
The link locks the order to its design for good, so never create it just because the customer picked or finished a design.
Only for orders created in this session (OrderNotInSessionError
otherwise) — an order someone mentions or that order_lookup found
cannot be paid here, so offer to escalate rather than retrying.
Attaches each item's design to its own item once every item is covered.
Each item needs a design or artwork with a submitted page mapping.
Uses each design's latest snapshot, so the customer gets the version they
last refined. Do NOT call order_attach_design yourself, even on an order
with several items. Attaching is irreversible upstream, and doing it earlier
locks the order onto a draft the customer has since edited. A file uploaded
for an item after its design, before the attach, replaces that design.
Every line must carry artwork before the order can be paid
(ArtworkRequiredError otherwise) — either a design (attached
here, at order_create time, or via order_attach_design) or a
finished artwork file uploaded through order_get_artwork_upload_page. A
multi-item order is one Stripe checkout, so a multi-line cart is payable
once each line is covered. DesignRenderFailedError means an attached
design's print file failed to render. The design on this order cannot be
changed, so no retry here helps; the reason says how to place a new order. NoSnapshotError means the
session's design is not saved yet; a photo book can take a few minutes
after it resolves. Wait a little and call this again. After 5 tries
without a saved design it becomes ArtworkStillRequiredError.
Returns a job — poll until SUCCEEDED for the checkout_url. Put
checkout_url in your reply as a markdown hyperlink (never the raw URL),
and call order_get yourself to confirm payment. When the payment card is
displayed, it shows a "Pay securely" button wired to the link and polls
order_get itself once clicked, so just confirm the payment step is ready
and share the link again only if the customer asks for it.
Tool call template
Replace each placeholder with a value matching the input schema. Only required parameters are included; add optional parameters as needed.
{
"id": 1,
"jsonrpc": "2.0",
"method": "tools/call",
"params": {
"arguments": {
"session_id": "<session_id>",
"order_id": "<order_id>"
},
"name": "order_create_payment_link"
}
}Input Schema
| Name | Required | Description | Default |
|---|---|---|---|
| order_id | Yes | ||
| session_id | Yes |
Output Schema
| Name | Required | Description | Default |
|---|---|---|---|
| result | Yes |