Create a payment session for a shipping label
create_checkout_linkTurns a decided shipment into a payment session: the amount and a handoff URL to prefilled SMKlog checkout. Pass quote_id from get_parcel_quote: its price is reused, no second carrier call. Keep the returned session_id for get_checkout_status. It never charges: the human confirms contents and consents, then pays on the page.
Side effects: writes a 30-day session record; not idempotent, two calls make two sessions. No session for a non-parcel, several boxes, or an installed lithium battery crossing a border.
Parameter rules:
A valid quote_id overrides product, from_zip, to_zip, to_country and quantity; service still applies.
An expired quote_id reprices from the fields, or fails with missing_required_fields without them.
service is a case-insensitive fragment of the display name; no match anchors the quote's first rate, not always the cheapest.
from_zip: 5-digit US ZIP; to_zip follows to_country (US, CA, GB, DE, AU).
International: customs on the page; the recipient pays duty.
Tool call template
This tool declares no required parameters. Add optional parameters from the input schema as needed.
{
"id": 1,
"jsonrpc": "2.0",
"method": "tools/call",
"params": {
"arguments": {},
"name": "create_checkout_link"
}
}Input Schema
| Name | Required | Description | Default |
|---|---|---|---|
| to_zip | No | Destination postal code: a 5-digit ZIP for the US, or the destination country's own postal code. Required unless quote_id is given. | |
| product | No | Plain-words item description. Required unless quote_id is given. | |
| service | No | Service to anchor the amount to, e.g. "USPS Ground Advantage". Omitted or unmatched, the amount anchors the quote's first rate, top of the best-value ranking rather than the cheapest; the human can still pick any service on the page. | |
| from_zip | No | Origin US ZIP code, 5 digits. Required unless quote_id is given. | |
| quantity | No | How many of the item ship together. Default 1. | |
| quote_id | No | The quote_id returned by a previous get_parcel_quote call. Valid for 15 minutes. | |
| to_country | No | Two-letter destination country: US (default), CA, GB, DE, AU. | US |
Output Schema
| Name | Required | Description | Default |
|---|---|---|---|
| note | No | Standing caveats: live quote, human confirms consents and pays | |
| amount | Yes | Live-quoted checkout total for the anchored service, USD | |
| intent | Yes | Always "session" — this tool never charges | |
| method | No | Payment rails behind the checkout, e.g. stripe, card | |
| service | No | The service the amount is anchored to | |
| currency | Yes | ISO currency, USD | |
| session_id | No | Handle for get_checkout_status, shaped as_ plus a UUID, good for 30 days. Null only when the session record could not be stored. | |
| handoff_url | Yes | Opens the SMKlog checkout prefilled with this shipment | |
| quote_reused | No | True when the amount came from a quote_id you supplied, so no carrier call was spent. False when this tool priced the shipment live -- either because no quote_id was given, or because the one given had expired. | |
| identified_product_title | No | What the estimator understood the item to be |