Add a one-click upsell
add_upsellAdd a one-click upsell buyers see after paying to one of the seller's checkouts, draft or live. On a checkout with no offer after payment yet, it's the first. Otherwise say where it goes in the chain: after (an offer id from get_product's offerChain) and when ("yes" or "no"): it's shown when the buyer answers that offer that way, and leads on to wherever that answer went before. A downsell is an offer after the upsell, when "no". Up to 5 offers in a chain, on every plan. Optionally pass html for a custom upsell page. On a draft this applies straight away. On a LIVE checkout nothing changes yet: it creates an approval request (status pending_approval) that the seller approves in Swipefast; tell them, give them the approvalUrl, and check later with approval_status. Never invent a price or a link.
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": {
"product": "<product>",
"headline": "<headline>",
"price": "<price>",
"deliveryUrl": "<deliveryUrl>"
},
"name": "add_upsell"
}
}Input Schema
| Name | Required | Description | Default |
|---|---|---|---|
| html | No | Optional HTML for the upsell page. Omit for the built-in layout. | |
| when | No | Shown when the buyer says yes or no to the after offer. | |
| after | No | The offer (from get_product's offerChain) this one comes after. Needed when the checkout already has one. | |
| price | Yes | Price in the checkout's currency, in major units (27 = $27.00). | |
| account | No | Only to work in a client's account: its id from list_accounts. Leave it out for your own account. | |
| product | Yes | The checkout's id or slug. | |
| headline | Yes | The offer's title, e.g. "Add the swipe file". | |
| deliveryUrl | Yes | https:// link where buyers get this after purchase. Required. | |
| description | No | One or two sentences on why it's worth it. |