checkout_start
InactiveTool of ComOS Federation Gateway
Start a new checkout process from the user's cart. **DIGITAL vs PHYSICAL PRODUCTS:** - **Digital products** (e-books, software, downloads): NO shipping address needed - **Physical/material products**: Shipping address REQUIRED - **Mixed orders** (some digital, some physical): Shipping address REQUIRED The system automatically determines shipping requirements based on the `productType` field in cart items. **Required Information:** 1. **Email** - Required for order confirmation and digital delivery 2. **Customer Name** - For order records 3. **Shipping Address** - ONLY required if cart contains physical/material products **Checkout Flow (REAL Payments):** 1. Collect email and name from user 2. If cart has physical products, collect shipping address 3. Call this tool WITHOUT paymentMethodId (creates a pending checkout, returns a sagaId) 4. For physical products: optionally call `checkout_shipping_options` → `checkout_select_shipping` 5. Call `checkout_create_payment_session` with the sagaId → returns a **Stripe payment URL** 6. **Present the Stripe URL to the user** - they click it to enter card details on Stripe's secure page 7. After payment, call `checkout_status` to confirm order completion **Example Stripe URL:** `https://checkout.stripe.com/c/pay/cs_live_...` **Testing Only:** - Pass paymentMethodId: "pm_test_visa" to skip real payment and process immediately **Guest Checkout:** - Just provide email - system creates a guest customer automatically The checkout runs asynchronously. Use `checkout_status` with the sagaId to track progress. (Federated: requires tenant_id. For cart/orders, pass auth_token from POST /v1/auth/login. Product IDs are MongoDB ObjectIds from catalog_search.)
Parameters schema
{
"type": "object",
"$schema": "http://json-schema.org/draft-07/schema#",
"required": [
"tenant_id",
"userId",
"cartId"
],
"properties": {
"email": {
"type": "string",
"description": "Customer email (required for guest checkout and order confirmation)"
},
"items": {
"type": "array",
"items": {},
"description": "Cart items with productType. Digital items don't require shipping."
},
"total": {
"type": "number",
"description": "Cart total (if known)"
},
"cartId": {
"type": "string",
"description": "Cart ID to checkout"
},
"userId": {
"type": "string",
"description": "User/Customer ID"
},
"subtotal": {
"type": "number",
"description": "Cart subtotal (if known)"
},
"tenant_id": {
"type": "string",
"description": "Tenant ID (required for multi-tenant checkout)"
},
"auth_token": {
"type": "string",
"description": "JWT auth token for authenticated operations (cart, orders). Get from api_call POST /v1/auth/login."
},
"customerName": {
"type": "string",
"description": "Customer name for the order"
},
"paymentMethodId": {
"type": "string",
"description": "Payment method ID. Use 'pm_test_visa' for testing. Ask user for payment method if not provided."
},
"shippingAddress": {
"type": "object",
"description": "Shipping address for delivery. Required for physical/material products, not needed for digital-only orders.",
"additionalProperties": {}
}
},
"additionalProperties": false
}Parent server
ComOS Federation Gateway
https://github.com/ronrey/comos-federation
2/7 registries