Checkout
tinytales_checkout checkout:write
Make a checkout or reprint link, or join the waitlist if ordering is paused. Book owners can also approve a preview. Actions: approve, create, reprint, waitlist. Does not charge a card.
00Actions
approve— needsbook_id. Scope:checkout:write.create— needsbook_id. Scope:checkout:write.reprint— needsbook_id. Scope:checkout:write.waitlist— needsbook_id. Scope:checkout:write.
01Access
The signed-in customer must have approved checkout:write. Calls stay inside that account.
02Annotations
The tool records the owner’s preview approval or creates a pending checkout URL.
No card is charged and no print job is created. The person completes payment in the browser.
This tool only reads or changes the signed-in TinyTales account. It does not post to the public internet or to other people’s services.
Repeating the call can create another record.
03Input
Which action to run: approve, create, reprint, waitlist.
Book id from tinytales_books action list or tinytales_books_write action create.
Number of printed copies. When omitted, uses the curation profile defaultQuantity, or 1 if no profile is set. 1 means one shared copy.
Optional JSON shipping address to echo on the response. When omitted, uses the curation profile shipping address if one was saved. Checkout still collects the paid address in the browser.
json returns structured data. markdown returns the same data as a short readable summary. Defaults to json.
04Output
True when the underlying TinyTales route accepted the call.
One-line result for the model to read.
What to do next, in one sentence. Present when TinyTales knows a clear next action. Follow it before trying anything else.
Present when ok is false. Names the failed state and the next action to call.
Hosted checkout URL where the person pays. Absent when ordering is closed.
Copy count used for this checkout link.
Shipping address echoed for display. Null when none was provided or saved. Checkout still collects the paid address in the browser.
Pre-tax price breakdown from the same config checkout uses. promoActive is true only when the launch discount is configured ($15); otherwise unitPriceCents is $25 list. Includes listPriceCents, additionalCopyPriceCents, shippingIncluded, currency, quantity, and totalCents. totalCents EXCLUDES sales tax/VAT: the hosted checkout adds tax based on the shipping address, so never call it the final total. International orders may also owe import VAT, customs duties, or carrier handling fees on delivery.
05Errors
- Every page must be finished generating before you approve the preview.
- Checkout is blocked until every page is rendered
- Checkout is blocked until the owner approves a full preview (owner checkout only)
- No completed print order exists for this book. Use tinytales_checkout action create for a first print.
- Ordering is not yet open. Use tinytales_checkout action waitlist.
- Book not found
06Example request
{
"action": "create",
"book_id": "7c9e6679-7425-40de-944b-e07fc1f90ae7",
"quantity": 1
}
07Example response
{
"ok": true,
"summary": "Checkout link is ready. The person pays in the browser. No card was charged.",
"checkout_url": "https://checkout.example.com/session/example",
"quantity": 1,
"shipping_address": null,
"pricing": {
"currency": "USD",
"shippingIncluded": true,
"promoActive": false,
"listPriceCents": 2500,
"unitPriceCents": 2500,
"additionalCopyPriceCents": 800,
"quantity": 1,
"totalCents": 2500
}
}