Outcome
Calculates a proposed cart using Store prices without charging or creating a subscription.
Before you start
- Verify the intended environment, authenticated identity and explicitly authorized ownership context.
- Discover the published entitlements:read permission and any required resource grant.
Discover the target
topolo whoami --json
topolo actions get app_topolo_one.checkout.quote --detail --json
Request
POST /api/cart/quote
Input fields
| Field | Required | Meaning | Constraints |
|---|---|---|---|
items | Optional | items | {"type":"array","items":{"type":"object","properties":{"slug":{"type":"string","minLength":1},"seats":{"type":"integer","exclusiveMinimum":0,"maximum":9007199254740991}},"required":["slug"],"additionalProperties":false}} |
appSlugs | Optional | Exact published Store slugs used to price the cart; not arbitrary display names. | {"type":"array","items":{"type":"string","minLength":1}} |
seats | Optional | Reviewed seat count used with Store pricing. | {"type":"integer","exclusiveMinimum":0,"maximum":9007199254740991} |
billing | Optional | Supported billing cadence; inspect chargedTotalCents rather than assuming grandMonthly is the actual charge. | {"type":"string","enum":["monthly","annual"]} |
Interpret the response
Inspect each line, billing interval and chargedTotalCents. grandMonthly is the annual-equivalent monthly subtotal; the current monthly billing calculation adds a 25% premium.
Inspect the declared output schema and captured variants.
Worked examples
Actual exported One Worker with local Miniflare D1/KV. Authentication, application discovery, checkout, billing and remote widget providers are controlled synthetic responses; outbound access is sealed. No live provider outcome is established.
Save the reviewed input below as payload.json; substitute discovered identifiers and bind credential/resource context separately. CLI:
topolo actions validate app_topolo_one.checkout.quote --data @payload.json --json
topolo actions plan app_topolo_one.checkout.quote --data @payload.json --json
topolo actions call app_topolo_one.checkout.quote --data @payload.json --detail --json
MCP planning and execution use the same reviewed input:
{
"tool": "topolo_prepare_action",
"arguments": {
"actionId": "app_topolo_one.checkout.quote",
"input": {
"items": [
{
"slug": "fixture-paid",
"seats": 3
}
],
"billing": "monthly"
}
}
}
{
"tool": "topolo_read_action",
"arguments": {
"actionId": "app_topolo_one.checkout.quote",
"input": {
"items": [
{
"slug": "fixture-paid",
"seats": 3
}
],
"billing": "monthly"
},
"detail": true
}
}
Successful response · HTTP 200
Input · payload.json:
{
"items": [
{
"slug": "fixture-paid",
"seats": 3
}
],
"billing": "monthly"
}
Captured response:
{
"success": true,
"billing": "monthly",
"interval": "month",
"coreAppCount": 0,
"grandMonthly": 27,
"chargedTotalCents": 3375,
"lines": [
{
"slug": "fixture-paid",
"tier": "non_core",
"seats": 3,
"perSeatMonthly": 9,
"lineMonthly": 27
}
]
}
Inspect each line, billing interval and chargedTotalCents. grandMonthly is the annual-equivalent monthly subtotal; the current monthly billing calculation adds a 25% premium.
Refused request · HTTP 401 · auth_error
Input · payload.json:
{
"items": [
{
"slug": "fixture-paid",
"seats": 3
}
],
"billing": "monthly"
}
Captured response:
{
"error": "Token validation failed"
}
Authenticate using the required credential type for this action; service-only actions require the registered Auth service identity.
Verify the result
- Inspect each line, billing interval and chargedTotalCents. grandMonthly is the annual-equivalent monthly subtotal; the current monthly billing calculation adds a 25% premium.
Errors and recovery
auth_error(HTTP 401): Authenticate using the required credential type for this action; service-only actions require the registered Auth service identity.
These are observed local refusals; inspect the raw error body because one SDK code can represent several handler messages. Preserve the request id when available.
Recovery boundary
Re-quote the same reviewed cart if catalog prices change; a quote does not authorize checkout.
Related actions
- Create checkout: Create a checkout session for the cart. Completing it charges the customer and provisions the apps.
Evidence
Actual exported One Worker with local Miniflare D1/KV. Authentication, application discovery, checkout, billing and remote widget providers are controlled synthetic responses; outbound access is sealed. No live provider outcome is established.