Get the checkout link
start_checkoutOnly after check_order came back allowed and the customer confirmed the lines and subtotal: checks the same order again and returns the link the customer pays on. Same day: the bakery's order page with the tray loaded and a Pay with Toast button (good for 3 hours). Catering: the Pinoyshki cart with the date, time and pickup or delivery filled in. No payment happens here. If a rule is broken it returns the problems instead of a link.
Input Schema
| Name | Required | Description | Default |
|---|---|---|---|
| zip | No | Delivery ZIP code (delivery is within 15 miles). | |
| date | No | The date as YYYY-MM-DD ('today' also works). Work it out from the customer's words using today's date in Seattle (Pacific time). If their words could mean two dates, like 'next Friday' said earlier in the same week, ask them which before calling. Needed for catering. | |
| time | No | 12-hour time like '1:00 pm'. Needed for catering. | |
| items | Yes | What to order. Use item names exactly as get_menu or search_menu gave them. | |
| notes | No | Optional note for the bakery. | |
| channel | No | Optional. 'today' = same day from the counter menu, paid on Toast; 'catering' = ordered ahead, paid on Shopify. Left out, the basket decides. | |
| utensils | No | Catering: include utensils. Default true. | |
| fulfillment | No | Default pickup. Delivery is catering, week-ahead only. | |
| customer_name | No | Optional: the name the order is for. | |
| customer_email | No | Optional: an email for the bakery. | |
| customer_phone | No | Optional: a phone number for the bakery. |
Output Schema
| Name | Required | Description | Default |
|---|---|---|---|
| ok | Yes | True when the order is allowed as asked. | |
| url | Yes | The link the customer opens to pay. Give it to them as-is. | |
| view | Yes | ||
| when | No | ||
| lines | Yes | ||
| title | No | ||
| today | No | Today's date in Seattle, like 'Thursday, September 24'. | |
| button | No | ||
| channel | No | ||
| pays_on | No | ||
| problems | No | ||
| lane_label | No | ||
| date_choices | No | Present when the date asked for could mean either of these; ask the customer which. | |
| allowed_dates | No | ||
| allowed_times | No | ||
| earliest_date | No | ||
| subtotal_cents | Yes | Before tax; the checkout page shows the final total. | |
| delivery_allowed | No | ||
| allowed_date_labels | No | allowed_dates with weekdays, like 'Fri Oct 2'. |