Synchronity
Shop connected e-commerce stores: search, compare, cart, and checkout with buyer approval.
사용해야 할까요
품질 및 안전성
도구 정의와 프로토콜 준수에 대한 자동 분석을 기반으로 합니다.
컨텍스트 비용
이는 서버의 도구가 모델의 컨텍스트에 로드될 때마다 소비되는 대략적인 토큰 수입니다. 수치가 높을수록 다른 작업에 사용할 수 있는 주의가 줄어듭니다.
설치
원클릭 설치
`claude_desktop_config.json` 파일에 다음을 추가하세요:
{
"mcpServers": {
"synchronity": {
"command": "npx",
"args": [
"@synchronity/mcp-server"
]
}
}
}실행 가능한 패키지
0.5.21stdio원격 엔드포인트
https://api.synchronity.app/mcpstreamable-http할 수 있는 일
도구 목록
도구 (26)
🟢list_sites
List all registered e-commerce sites. Use this first to find a site by name (e.g. "Pronto Partners") and get its site_id, which is required by all other tools.
입력 스키마
{
"type": "object",
"properties": {},
"required": []
}출력 스키마
{
"type": "object",
"properties": {
"sites": {
"type": "array",
"items": {
"type": "object",
"properties": {
"id": {
"type": "string"
},
"site_id": {
"type": "string"
},
"name": {
"type": "string"
},
"platform": {
"type": "string"
}
}
}
}
},
"required": [
"sites"
]
}🟢search_products(site_id, query, queries, category, min_price, ...)
Find products on a registered store. To BROWSE a store's catalog (open-ended requests like "what do they sell", "show me what's available"), call with NO query — this returns the store's products. To SEARCH, pass `query` (a product name/keyword). Returns paginated products as an interactive card. ALWAYS translate a buyer's budget or price constraint into the price params on THIS call instead of filtering in your reply: "under/below/within X" or "X budget" → `max_price: X`; "over/above/at least X" → `min_price: X`; "between X and Y" → both. Likewise pass `in_stock: true` for "available"/"in stock" and `category` when they name one. The card renders exactly what this call returns, so the filter MUST be applied here — never fetch the full catalog and then narrow it in text. Call once with your best intent (browse OR a single query); if a real search is genuinely empty, ask the user to clarify rather than re-firing reworded queries. The card shows products, prices, IDs, and Add-to-cart controls — keep your text reply to one brief sentence and do not re-list what the card shows.
입력 스키마
{
"type": "object",
"properties": {
"site_id": {
"type": "string",
"description": "Registered site ID (e.g., \"site_abc123\" or \"shopify_store_1\")"
},
"query": {
"type": "string",
"description": "Optional single search term (product name/keyword). OMIT to browse; for several names use `queries`."
},
"queries": {
"type": "array",
"items": {
"type": "string"
},
"description": "Search several product names at once (e.g. when the buyer lists multiple items). Returns all matches in ONE call/card instead of searching one at a time. Use `query` for a single search, `queries` for several, or omit both to browse."
},
"category": {
"type": "string",
"description": "Filter by product category (optional)"
},
"min_price": {
"type": "string",
"description": "Minimum price filter in store currency, format: \"19.99\" (optional)"
},
"max_price": {
"type": "string",
"description": "Maximum price filter in store currency, format: \"199.99\" (optional)"
},
"in_stock": {
"type": "boolean",
"description": "Filter to in-stock items only (default: false)"
},
"page": {
"type": "integer",
"description": "Page number (1-indexed, default: 1)"
},
"per_page": {
"type": "integer",
"description": "Results per page (default: 20, max: 100)",
"minimum": 1,
"maximum": 100
}
},
"required": [
"site_id"
]
}출력 스키마
{
"type": "object",
"properties": {
"kind": {
"const": "productList"
},
"siteId": {
"type": "string"
},
"siteName": {
"type": "string"
},
"products": {
"type": "array",
"items": {
"type": "object",
"properties": {
"productId": {
"type": "string"
},
"title": {
"type": "string"
},
"price": {
"type": "string"
},
"image": {
"type": "string"
},
"url": {
"type": "string"
},
"inStock": {
"type": "boolean"
},
"hasOptions": {
"type": "boolean"
},
"addToCart": {
"type": "object",
"properties": {
"label": {
"type": "string"
},
"toolName": {
"type": "string"
},
"params": {
"type": "object"
}
}
}
},
"required": [
"productId",
"title",
"price",
"inStock"
]
}
}
},
"required": [
"kind",
"siteId",
"products"
]
}🟢get_product(site_id, product_id)
Retrieve detailed information about a specific product including variants, pricing, images, and availability. May also return `addons` — customer-selectable options defined by the store (e.g. engraving, gift wrap, size add-ons). When a product has addons, present them to the buyer and collect every addon with `required: true` before calling add_to_cart; for any option carrying a `price_modifier`, show that surcharge so the buyer knows the added cost. The card already shows the product details to the user, so keep your text reply brief and do not re-describe what the card displays.
입력 스키마
{
"type": "object",
"properties": {
"site_id": {
"type": "string",
"description": "Registered site ID"
},
"product_id": {
"type": "string",
"description": "Product ID from the site (platform-specific format)"
}
},
"required": [
"site_id",
"product_id"
]
}출력 스키마
{
"type": "object",
"properties": {
"kind": {
"const": "product"
},
"siteId": {
"type": "string"
},
"productId": {
"type": "string"
},
"title": {
"type": "string"
},
"description": {
"type": "string"
},
"price": {
"type": "string"
},
"image": {
"type": "string"
},
"images": {
"type": "array",
"items": {
"type": "string"
}
},
"url": {
"type": "string"
},
"inStock": {
"type": "boolean"
},
"addToCart": {
"type": "object",
"properties": {
"label": {
"type": "string"
},
"toolName": {
"type": "string"
},
"params": {
"type": "object"
}
}
}
},
"required": [
"kind",
"siteId",
"productId",
"title",
"price",
"inStock"
]
}🟢get_product_reviews(site_id, product_id, limit, page)
🔍 **RECOMMENDED STEP** — Fetch product reviews and authenticity consensus before making purchase decisions. Returns: average rating, trust score (0.0-1.0), review sentiment analysis, authenticity flags (fake reviews, seller issues, negative trends), and recent reviews with verified purchase status. Always call this for each product before adding to cart to verify quality and detect scams.
입력 스키마
{
"type": "object",
"properties": {
"site_id": {
"type": "string",
"description": "Registered site ID"
},
"product_id": {
"type": "string",
"description": "Product ID"
},
"limit": {
"type": "integer",
"description": "Max reviews to return (default: 10)",
"minimum": 1,
"maximum": 100
},
"page": {
"type": "integer",
"description": "Page number (default: 1)"
}
},
"required": [
"site_id",
"product_id"
]
}출력 스키마
{
"type": "object",
"properties": {
"reviews": {
"type": "array",
"items": {
"type": "object"
}
},
"authenticity_consensus": {
"type": "object",
"properties": {
"average_rating": {
"type": "number"
},
"trust_score": {
"type": "number"
},
"verified_percentage": {
"type": "number"
},
"flags": {
"type": "array",
"items": {
"type": "string"
}
}
}
}
}
}⚪request_back_in_stock(site_id, product_id, variant_id, email, product_title)
Subscribe the buyer to a back-in-stock alert for an out-of-stock product. Use when the buyer asks to be notified/told/pinged when an item restocks ("notify me when X is back", "let me know when it's in stock"). Collect the buyer's email so the alert can reach them (without it only the demand is recorded for the merchant). The buyer is emailed when the product is next seen in stock. Returns whether an email alert was armed.
입력 스키마
{
"type": "object",
"properties": {
"site_id": {
"type": "string",
"description": "Registered site ID"
},
"product_id": {
"type": "string",
"description": "Product ID to watch"
},
"variant_id": {
"type": "string",
"description": "Specific variant to watch (optional)"
},
"email": {
"type": "string",
"description": "Buyer's email for the restock alert (recommended — without it no alert is sent)"
},
"product_title": {
"type": "string",
"description": "Product name, for a clearer alert + merchant view (optional)"
}
},
"required": [
"site_id",
"product_id"
]
}출력 스키마
{
"type": "object"
}🟢compare_products(site_ids, query, category, min_price, max_price, ...)
Compare products across multiple registered e-commerce sites simultaneously. Uses fail-open strategy: partial results from successful sites are returned even if some sites time out.
입력 스키마
{
"type": "object",
"properties": {
"site_ids": {
"type": "array",
"items": {
"type": "string"
},
"description": "List of registered site IDs to compare across"
},
"query": {
"type": "string",
"description": "Search query for product comparison"
},
"category": {
"type": "string",
"description": "Filter by category (optional)"
},
"min_price": {
"type": "string",
"description": "Minimum price filter (optional)"
},
"max_price": {
"type": "string",
"description": "Maximum price filter (optional)"
},
"in_stock": {
"type": "boolean",
"description": "Filter to in-stock items only (optional)"
}
},
"required": [
"site_ids",
"query"
]
}출력 스키마
{
"type": "object",
"properties": {
"results": {
"type": "array",
"items": {
"type": "object",
"properties": {
"site_id": {
"type": "string"
},
"site_name": {
"type": "string"
},
"products": {
"type": "array",
"items": {
"type": "object"
}
}
}
}
}
}
}🟡create_cart(site_id, currency)
Create a new shopping cart for a specific site. Returns a cart_id. IMPORTANT: Reuse the active cart_id across multiple products in the same session. Do NOT call create_cart again if you already have a cart_id for this site in the chat history.
입력 스키마
{
"type": "object",
"properties": {
"site_id": {
"type": "string",
"description": "Registered site ID"
},
"currency": {
"type": "string",
"description": "ISO 4217 currency code (e.g., \"USD\", \"EUR\", \"GBP\"). Defaults to site currency."
}
},
"required": [
"site_id"
]
}출력 스키마
{
"type": "object",
"properties": {
"cart_id": {
"type": "string"
},
"items": {
"type": "array"
}
}
}🟡add_to_cart(site_id, cart_id, product_id, quantity, variant_id, ...)
Add a product variant (or base product) to an existing cart. Reuse the active cart_id from the chat history if one already exists. Only call create_cart first if no cart exists yet.
입력 스키마
{
"type": "object",
"properties": {
"site_id": {
"type": "string",
"description": "Registered site ID"
},
"cart_id": {
"type": "string",
"description": "Cart ID to add the product to"
},
"product_id": {
"type": "string",
"description": "Product ID to add"
},
"quantity": {
"type": "integer",
"description": "Quantity to add (must be >= 1)"
},
"variant_id": {
"type": "string",
"description": "Optional product variant ID (e.g., for size/color selection)"
},
"addons": {
"type": "object",
"description": "Selected product add-ons as a map of addon_id -> chosen value(s). For select/radio/boolean pass a single value; for checkbox/multi pass an array; for text/number pass the value. Values for choice add-ons MUST come from the product's addons[].options[].value. Collect any addon with required:true before checkout."
},
"items": {
"type": "array",
"description": "Add several products in ONE call instead of calling this tool repeatedly. Each entry: { product_id, quantity, variant_id?, addons? }. Out-of-stock items are reported; pass `email` to auto-arm a back-in-stock alert for them.",
"items": {
"type": "object",
"properties": {
"product_id": {
"type": "string"
},
"quantity": {
"type": "integer"
},
"variant_id": {
"type": "string"
},
"addons": {
"type": "object"
}
},
"required": [
"product_id",
"quantity"
]
}
},
"email": {
"type": "string",
"description": "Buyer email; arms a back-in-stock alert for any out-of-stock item in items[]."
}
},
"required": [
"site_id"
]
}출력 스키마
{
"type": "object",
"properties": {
"kind": {
"const": "cart"
},
"siteId": {
"type": "string"
},
"cartId": {
"type": "string"
},
"items": {
"type": "array",
"items": {
"type": "object",
"properties": {
"itemId": {
"type": "string"
},
"title": {
"type": "string"
},
"qty": {
"type": "number"
},
"unitPrice": {
"type": "string"
},
"lineTotal": {
"type": "string"
},
"image": {
"type": "string"
},
"variantTitle": {
"type": "string"
},
"addonsSummary": {
"type": "string"
},
"removeAction": {
"type": "object",
"properties": {
"label": {
"type": "string"
},
"toolName": {
"type": "string"
},
"params": {
"type": "object"
}
}
},
"setQtyAction": {
"type": "object",
"properties": {
"label": {
"type": "string"
},
"toolName": {
"type": "string"
},
"params": {
"type": "object"
}
}
}
}
}
},
"discounts": {
"type": "array",
"items": {
"type": "object",
"properties": {
"code": {
"type": "string"
},
"amount": {
"type": "string"
}
}
}
},
"subtotal": {
"type": "string"
},
"total": {
"type": "string"
}
},
"required": [
"kind",
"siteId",
"cartId",
"items",
"subtotal",
"total"
]
}🟡quick_checkout(items, shipping_address, customer)
Assemble checkout-ready cart(s) in ONE call for a multi-product (and optionally multi-store) request. Creates a cart per store, adds all items, and sets the shipping address — then returns the cart(s) with delivery options to choose. Use this when the buyer lists several products at once (optionally across stores) and/or gives their address up front, instead of calling create_cart/add_to_cart/set_shipping_address separately. Does NOT select delivery, check out, or pay — the buyer picks delivery (select_shipping_option) and approves checkout/payment per store afterward. Out-of-stock items are reported; pass customer.email to auto-arm a back-in-stock alert for them.
입력 스키마
{
"type": "object",
"properties": {
"items": {
"type": "array",
"description": "Products to buy. Each entry: { site_id, product_id, quantity, variant_id?, addons? }. Items may span multiple stores (grouped by site_id).",
"items": {
"type": "object",
"properties": {
"site_id": {
"type": "string"
},
"product_id": {
"type": "string"
},
"quantity": {
"type": "integer"
},
"variant_id": {
"type": "string"
},
"addons": {
"type": "object"
}
},
"required": [
"site_id",
"product_id",
"quantity"
]
}
},
"shipping_address": {
"type": "object",
"description": "Buyer delivery address (applied to every store).",
"properties": {
"country_code": {
"type": "string",
"description": "2-letter ISO country code (required)."
},
"postal_code": {
"type": "string"
},
"state": {
"type": "string"
},
"city": {
"type": "string"
}
},
"required": [
"country_code"
]
},
"customer": {
"type": "object",
"description": "Optional buyer contact carried for checkout; customer.email arms back-in-stock alerts for out-of-stock items.",
"properties": {
"name": {
"type": "string"
},
"email": {
"type": "string"
},
"phone": {
"type": "string"
}
}
}
},
"required": [
"items",
"shipping_address"
]
}출력 스키마
{
"type": "object",
"oneOf": [
{
"type": "object",
"properties": {
"kind": {
"const": "checkout"
},
"siteId": {
"type": "string"
},
"cartId": {
"type": "string"
},
"items": {
"type": "array",
"items": {
"type": "object",
"properties": {
"itemId": {
"type": "string"
},
"title": {
"type": "string"
},
"qty": {
"type": "number"
},
"unitPrice": {
"type": "string"
},
"lineTotal": {
"type": "string"
},
"image": {
"type": "string"
},
"variantTitle": {
"type": "string"
},
"addonsSummary": {
"type": "string"
},
"removeAction": {
"type": "object",
"properties": {
"label": {
"type": "string"
},
"toolName": {
"type": "string"
},
"params": {
"type": "object"
}
}
},
"setQtyAction": {
"type": "object",
"properties": {
"label": {
"type": "string"
},
"toolName": {
"type": "string"
},
"params": {
"type": "object"
}
}
}
}
}
},
"shippingOptions": {
"type": "array",
"items": {
"type": "object",
"properties": {
"optionId": {
"type": "string"
},
"label": {
"type": "string"
},
"description": {
"type": "string"
},
"cost": {
"type": "string"
}
}
}
},
"selectedShippingId": {
"type": "string"
},
"subtotal": {
"type": "string"
},
"shipping": {
"type": "string"
},
"total": {
"type": "string"
}
},
"required": [
"kind",
"siteId",
"cartId",
"items",
"subtotal",
"total"
]
},
{
"type": "object",
"properties": {
"kind": {
"const": "multiCart"
},
"carts": {
"type": "array",
"items": {
"type": "object",
"properties": {
"siteId": {
"type": "string"
},
"storeName": {
"type": "string"
},
"cartId": {
"type": "string"
},
"items": {
"type": "array",
"items": {
"type": "object",
"properties": {
"itemId": {
"type": "string"
},
"title": {
"type": "string"
},
"qty": {
"type": "number"
},
"unitPrice": {
"type": "string"
},
"lineTotal": {
"type": "string"
},
"image": {
"type": "string"
},
"variantTitle": {
"type": "string"
},
"addonsSummary": {
"type": "string"
},
"removeAction": {
"type": "object",
"properties": {
"label": {
"type": "string"
},
"toolName": {
"type": "string"
},
"params": {
"type": "object"
}
}
},
"setQtyAction": {
"type": "object",
"properties": {
"label": {
"type": "string"
},
"toolName": {
"type": "string"
},
"params": {
"type": "object"
}
}
}
}
}
},
"subtotal": {
"type": "string"
},
"shippingOptions": {
"type": "array",
"items": {
"type": "object",
"properties": {
"optionId": {
"type": "string"
},
"label": {
"type": "string"
},
"description": {
"type": "string"
},
"cost": {
"type": "string"
}
}
}
},
"error": {
"type": "string"
}
},
"required": [
"siteId",
"storeName",
"cartId",
"items"
]
}
}
},
"required": [
"kind",
"carts"
]
}
]
}🔴remove_from_cart(site_id, cart_id, item_id)
Remove a line item from the cart. Requires the item_id from the cart contents.
입력 스키마
{
"type": "object",
"properties": {
"site_id": {
"type": "string",
"description": "Registered site ID"
},
"cart_id": {
"type": "string",
"description": "Cart ID"
},
"item_id": {
"type": "string",
"description": "Line item ID from the cart (cart.items[].item_id)"
}
},
"required": [
"site_id",
"cart_id",
"item_id"
]
}출력 스키마
{
"type": "object",
"properties": {
"kind": {
"const": "cart"
},
"siteId": {
"type": "string"
},
"cartId": {
"type": "string"
},
"items": {
"type": "array",
"items": {
"type": "object",
"properties": {
"itemId": {
"type": "string"
},
"title": {
"type": "string"
},
"qty": {
"type": "number"
},
"unitPrice": {
"type": "string"
},
"lineTotal": {
"type": "string"
},
"image": {
"type": "string"
},
"variantTitle": {
"type": "string"
},
"addonsSummary": {
"type": "string"
},
"removeAction": {
"type": "object",
"properties": {
"label": {
"type": "string"
},
"toolName": {
"type": "string"
},
"params": {
"type": "object"
}
}
},
"setQtyAction": {
"type": "object",
"properties": {
"label": {
"type": "string"
},
"toolName": {
"type": "string"
},
"params": {
"type": "object"
}
}
}
}
}
},
"discounts": {
"type": "array",
"items": {
"type": "object",
"properties": {
"code": {
"type": "string"
},
"amount": {
"type": "string"
}
}
}
},
"subtotal": {
"type": "string"
},
"total": {
"type": "string"
}
},
"required": [
"kind",
"siteId",
"cartId",
"items",
"subtotal",
"total"
]
}🔴set_cart_quantity(site_id, cart_id, item_id, quantity)
Set a cart line's quantity (the server cart is the checkout source of truth, so this updates it live). Requires the item_id from the cart contents and the new absolute quantity. A quantity of 0 removes the line. Returns the updated cart card.
입력 스키마
{
"type": "object",
"properties": {
"site_id": {
"type": "string",
"description": "Registered site ID"
},
"cart_id": {
"type": "string",
"description": "Cart ID"
},
"item_id": {
"type": "string",
"description": "Line item ID from the cart (cart.items[].item_id)"
},
"quantity": {
"type": "integer",
"description": "New absolute quantity for the line (>= 0; 0 removes the line)"
}
},
"required": [
"site_id",
"cart_id",
"item_id",
"quantity"
]
}출력 스키마
{
"type": "object",
"properties": {
"kind": {
"const": "cart"
},
"siteId": {
"type": "string"
},
"cartId": {
"type": "string"
},
"items": {
"type": "array",
"items": {
"type": "object",
"properties": {
"itemId": {
"type": "string"
},
"title": {
"type": "string"
},
"qty": {
"type": "number"
},
"unitPrice": {
"type": "string"
},
"lineTotal": {
"type": "string"
},
"image": {
"type": "string"
},
"variantTitle": {
"type": "string"
},
"addonsSummary": {
"type": "string"
},
"removeAction": {
"type": "object",
"properties": {
"label": {
"type": "string"
},
"toolName": {
"type": "string"
},
"params": {
"type": "object"
}
}
},
"setQtyAction": {
"type": "object",
"properties": {
"label": {
"type": "string"
},
"toolName": {
"type": "string"
},
"params": {
"type": "object"
}
}
}
}
}
},
"discounts": {
"type": "array",
"items": {
"type": "object",
"properties": {
"code": {
"type": "string"
},
"amount": {
"type": "string"
}
}
}
},
"subtotal": {
"type": "string"
},
"total": {
"type": "string"
}
},
"required": [
"kind",
"siteId",
"cartId",
"items",
"subtotal",
"total"
]
}⚪apply_coupon(site_id, cart_id, code)
Apply a discount or promotional code to the cart. Returns the updated cart with discount applied.
입력 스키마
{
"type": "object",
"properties": {
"site_id": {
"type": "string",
"description": "Registered site ID"
},
"cart_id": {
"type": "string",
"description": "Cart ID"
},
"code": {
"type": "string",
"description": "Coupon or promotional code string"
}
},
"required": [
"site_id",
"cart_id",
"code"
]
}출력 스키마
{
"type": "object",
"properties": {
"kind": {
"const": "cart"
},
"siteId": {
"type": "string"
},
"cartId": {
"type": "string"
},
"items": {
"type": "array",
"items": {
"type": "object",
"properties": {
"itemId": {
"type": "string"
},
"title": {
"type": "string"
},
"qty": {
"type": "number"
},
"unitPrice": {
"type": "string"
},
"lineTotal": {
"type": "string"
},
"image": {
"type": "string"
},
"variantTitle": {
"type": "string"
},
"addonsSummary": {
"type": "string"
},
"removeAction": {
"type": "object",
"properties": {
"label": {
"type": "string"
},
"toolName": {
"type": "string"
},
"params": {
"type": "object"
}
}
},
"setQtyAction": {
"type": "object",
"properties": {
"label": {
"type": "string"
},
"toolName": {
"type": "string"
},
"params": {
"type": "object"
}
}
}
}
}
},
"discounts": {
"type": "array",
"items": {
"type": "object",
"properties": {
"code": {
"type": "string"
},
"amount": {
"type": "string"
}
}
}
},
"subtotal": {
"type": "string"
},
"total": {
"type": "string"
}
},
"required": [
"kind",
"siteId",
"cartId",
"items",
"subtotal",
"total"
]
}🟢get_cart(site_id, cart_id)
Retrieve current cart contents, including items, pricing, discounts, and totals. The card already shows the line items and totals to the user, so keep your text reply to one brief sentence — do not re-list the cart contents.
입력 스키마
{
"type": "object",
"properties": {
"site_id": {
"type": "string",
"description": "Registered site ID"
},
"cart_id": {
"type": "string",
"description": "Cart ID (optional if an active cart exists for the site)"
}
},
"required": [
"site_id"
]
}출력 스키마
{
"type": "object",
"properties": {
"kind": {
"const": "cart"
},
"siteId": {
"type": "string"
},
"cartId": {
"type": "string"
},
"items": {
"type": "array",
"items": {
"type": "object",
"properties": {
"itemId": {
"type": "string"
},
"title": {
"type": "string"
},
"qty": {
"type": "number"
},
"unitPrice": {
"type": "string"
},
"lineTotal": {
"type": "string"
},
"image": {
"type": "string"
},
"variantTitle": {
"type": "string"
},
"addonsSummary": {
"type": "string"
},
"removeAction": {
"type": "object",
"properties": {
"label": {
"type": "string"
},
"toolName": {
"type": "string"
},
"params": {
"type": "object"
}
}
},
"setQtyAction": {
"type": "object",
"properties": {
"label": {
"type": "string"
},
"toolName": {
"type": "string"
},
"params": {
"type": "object"
}
}
}
}
}
},
"discounts": {
"type": "array",
"items": {
"type": "object",
"properties": {
"code": {
"type": "string"
},
"amount": {
"type": "string"
}
}
}
},
"subtotal": {
"type": "string"
},
"total": {
"type": "string"
}
},
"required": [
"kind",
"siteId",
"cartId",
"items",
"subtotal",
"total"
]
}🟢get_active_cart(site_id)
Retrieve the buyer's in-progress cart for a site (resumes a conversation). Call this before assuming a new cart when a shopping conversation continues or after a cart error. Returns the cart with its items rebuilt if the connector cart expired, or null if no cart exists.
입력 스키마
{
"type": "object",
"properties": {
"site_id": {
"type": "string",
"description": "Registered site ID"
}
},
"required": [
"site_id"
]
}출력 스키마
{
"type": "object",
"properties": {
"kind": {
"const": "cart"
},
"siteId": {
"type": "string"
},
"cartId": {
"type": "string"
},
"items": {
"type": "array",
"items": {
"type": "object",
"properties": {
"itemId": {
"type": "string"
},
"title": {
"type": "string"
},
"qty": {
"type": "number"
},
"unitPrice": {
"type": "string"
},
"lineTotal": {
"type": "string"
},
"image": {
"type": "string"
},
"variantTitle": {
"type": "string"
},
"addonsSummary": {
"type": "string"
},
"removeAction": {
"type": "object",
"properties": {
"label": {
"type": "string"
},
"toolName": {
"type": "string"
},
"params": {
"type": "object"
}
}
},
"setQtyAction": {
"type": "object",
"properties": {
"label": {
"type": "string"
},
"toolName": {
"type": "string"
},
"params": {
"type": "object"
}
}
}
}
}
},
"discounts": {
"type": "array",
"items": {
"type": "object",
"properties": {
"code": {
"type": "string"
},
"amount": {
"type": "string"
}
}
}
},
"subtotal": {
"type": "string"
},
"total": {
"type": "string"
}
},
"required": [
"kind",
"siteId",
"cartId",
"items",
"subtotal",
"total"
]
}🟡set_shipping_address(site_id, cart_id, country_code, postal_code, state, ...)
Set the cart shipping destination (collected from the buyer) and return available shipping options with costs. Call after items are in the cart and before select_shipping_option. country_code is required; include postal_code/state for accurate rates.
입력 스키마
{
"type": "object",
"properties": {
"site_id": {
"type": "string",
"description": "Registered site ID"
},
"cart_id": {
"type": "string",
"description": "Cart ID"
},
"country_code": {
"type": "string",
"enum": [
"AF",
"AX",
"AL",
"DZ",
"AS",
"AD",
"AO",
"AI",
"AQ",
"AG",
"AR",
"AM",
"AW",
"AU",
"AT",
"AZ",
"BS",
"BH",
"BD",
"BB",
"BY",
"BE",
"BZ",
"BJ",
"BM",
"BT",
"BO",
"BQ",
"BA",
"BW",
"BV",
"BR",
"IO",
"BN",
"BG",
"BF",
"BI",
"CV",
"KH",
"CM",
"CA",
"KY",
"CF",
"TD",
"CL",
"CN",
"CX",
"CC",
"CO",
"KM",
"CG",
"CD",
"CK",
"CR",
"CI",
"HR",
"CU",
"CW",
"CY",
"CZ",
"DK",
"DJ",
"DM",
"DO",
"EC",
"EG",
"SV",
"GQ",
"ER",
"EE",
"SZ",
"ET",
"FK",
"FO",
"FJ",
"FI",
"FR",
"GF",
"PF",
"TF",
"GA",
"GM",
"GE",
"DE",
"GH",
"GI",
"GR",
"GL",
"GD",
"GP",
"GU",
"GT",
"GG",
"GN",
"GW",
"GY",
"HT",
"HM",
"VA",
"HN",
"HK",
"HU",
"IS",
"IN",
"ID",
"IR",
"IQ",
"IE",
"IM",
"IL",
"IT",
"JM",
"JP",
"JE",
"JO",
"KZ",
"KE",
"KI",
"KP",
"KR",
"KW",
"KG",
"LA",
"LV",
"LB",
"LS",
"LR",
"LY",
"LI",
"LT",
"LU",
"MO",
"MG",
"MW",
"MY",
"MV",
"ML",
"MT",
"MH",
"MQ",
"MR",
"MU",
"YT",
"MX",
"FM",
"MD",
"MC",
"MN",
"ME",
"MS",
"MA",
"MZ",
"MM",
"NA",
"NR",
"NP",
"NL",
"NC",
"NZ",
"NI",
"NE",
"NG",
"NU",
"NF",
"MK",
"MP",
"NO",
"OM",
"PK",
"PW",
"PS",
"PA",
"PG",
"PY",
"PE",
"PH",
"PN",
"PL",
"PT",
"PR",
"QA",
"RE",
"RO",
"RU",
"RW",
"BL",
"SH",
"KN",
"LC",
"MF",
"PM",
"VC",
"WS",
"SM",
"ST",
"SA",
"SN",
"RS",
"SC",
"SL",
"SG",
"SX",
"SK",
"SI",
"SB",
"SO",
"ZA",
"GS",
"SS",
"ES",
"LK",
"SD",
"SR",
"SJ",
"SE",
"CH",
"SY",
"TW",
"TJ",
"TZ",
"TH",
"TL",
"TG",
"TK",
"TO",
"TT",
"TN",
"TR",
"TM",
"TC",
"TV",
"UG",
"UA",
"AE",
"GB",
"US",
"UM",
"UY",
"UZ",
"VU",
"VE",
"VN",
"VG",
"VI",
"WF",
"EH",
"YE",
"ZM",
"ZW"
],
"description": "ISO-3166 alpha-2 country code (e.g. US)"
},
"postal_code": {
"type": "string",
"description": "Postal/ZIP code for accurate rates"
},
"state": {
"type": "string",
"description": "State/province/region code where carriers need it"
},
"city": {
"type": "string",
"description": "City"
}
},
"required": [
"site_id",
"cart_id",
"country_code"
]
}출력 스키마
{
"type": "object",
"properties": {
"kind": {
"const": "checkout"
},
"siteId": {
"type": "string"
},
"cartId": {
"type": "string"
},
"items": {
"type": "array",
"items": {
"type": "object",
"properties": {
"itemId": {
"type": "string"
},
"title": {
"type": "string"
},
"qty": {
"type": "number"
},
"unitPrice": {
"type": "string"
},
"lineTotal": {
"type": "string"
},
"image": {
"type": "string"
},
"variantTitle": {
"type": "string"
},
"addonsSummary": {
"type": "string"
},
"removeAction": {
"type": "object",
"properties": {
"label": {
"type": "string"
},
"toolName": {
"type": "string"
},
"params": {
"type": "object"
}
}
},
"setQtyAction": {
"type": "object",
"properties": {
"label": {
"type": "string"
},
"toolName": {
"type": "string"
},
"params": {
"type": "object"
}
}
}
}
}
},
"shippingOptions": {
"type": "array",
"items": {
"type": "object",
"properties": {
"optionId": {
"type": "string"
},
"label": {
"type": "string"
},
"description": {
"type": "string"
},
"cost": {
"type": "string"
}
}
}
},
"selectedShippingId": {
"type": "string"
},
"subtotal": {
"type": "string"
},
"shipping": {
"type": "string"
},
"total": {
"type": "string"
}
},
"required": [
"kind",
"siteId",
"cartId",
"items",
"subtotal",
"total"
]
}🟡select_shipping_option(site_id, cart_id, option_id)
Select one of the shipping options returned by set_shipping_address. Binds the rate to the cart so the total includes shipping; call before execute_checkout so the hosted checkout opens pre-filled.
입력 스키마
{
"type": "object",
"properties": {
"site_id": {
"type": "string",
"description": "Registered site ID"
},
"cart_id": {
"type": "string",
"description": "Cart ID"
},
"option_id": {
"type": "string",
"description": "option_id from cart.shipping_options"
}
},
"required": [
"site_id",
"cart_id",
"option_id"
]
}출력 스키마
{
"type": "object",
"properties": {
"kind": {
"const": "checkout"
},
"siteId": {
"type": "string"
},
"cartId": {
"type": "string"
},
"items": {
"type": "array",
"items": {
"type": "object",
"properties": {
"itemId": {
"type": "string"
},
"title": {
"type": "string"
},
"qty": {
"type": "number"
},
"unitPrice": {
"type": "string"
},
"lineTotal": {
"type": "string"
},
"image": {
"type": "string"
},
"variantTitle": {
"type": "string"
},
"addonsSummary": {
"type": "string"
},
"removeAction": {
"type": "object",
"properties": {
"label": {
"type": "string"
},
"toolName": {
"type": "string"
},
"params": {
"type": "object"
}
}
},
"setQtyAction": {
"type": "object",
"properties": {
"label": {
"type": "string"
},
"toolName": {
"type": "string"
},
"params": {
"type": "object"
}
}
}
}
}
},
"shippingOptions": {
"type": "array",
"items": {
"type": "object",
"properties": {
"optionId": {
"type": "string"
},
"label": {
"type": "string"
},
"description": {
"type": "string"
},
"cost": {
"type": "string"
}
}
}
},
"selectedShippingId": {
"type": "string"
},
"subtotal": {
"type": "string"
},
"shipping": {
"type": "string"
},
"total": {
"type": "string"
}
},
"required": [
"kind",
"siteId",
"cartId",
"items",
"subtotal",
"total"
]
}🔴execute_checkout(site_id, cart_id, buyer_delegation_token, customer_name, customer_email, ...)
Execute checkout for a cart to create an order. Requires a buyer delegation token (from user auth) and a shipping address. The order is created UNPAID (status "pending"). IMPORTANT — do NOT stop here or just hand the user the payment_url. Immediately continue the in-chat payment flow: call get_payment_methods for the returned order_id, present the available channels to the buyer, and ask which they want to use; then drive initiate_payment → (submit_payment_otp if needed) → poll get_payment_status until the order is paid. The payment_url in the response is only a manual fallback if the buyer declines in-chat payment. Always offer to collect payment in the chat first.
입력 스키마
{
"type": "object",
"properties": {
"site_id": {
"type": "string",
"description": "Registered site ID"
},
"cart_id": {
"type": "string",
"description": "Cart ID to checkout"
},
"buyer_delegation_token": {
"type": "string",
"description": "Delegation token from buyer (OAuth-like flow)"
},
"customer_name": {
"type": "string",
"description": "Full name of the customer placing the order"
},
"customer_email": {
"type": "string",
"description": "Email address of the customer placing the order"
},
"customer_phone": {
"type": "string",
"description": "Customer contact / billing phone number (E.164 preferred, e.g. +233201234567)"
},
"shipping_name": {
"type": "string",
"description": "Recipient full name"
},
"shipping_line1": {
"type": "string",
"description": "Shipping address line 1 (street)"
},
"shipping_line2": {
"type": "string",
"description": "Shipping address line 2 (apt/suite) [optional]"
},
"shipping_city": {
"type": "string",
"description": "Shipping city"
},
"shipping_state": {
"type": "string",
"description": "Shipping state or province"
},
"shipping_postal_code": {
"type": "string",
"description": "Shipping postal code"
},
"shipping_country": {
"type": "string",
"enum": [
"AF",
"AX",
"AL",
"DZ",
"AS",
"AD",
"AO",
"AI",
"AQ",
"AG",
"AR",
"AM",
"AW",
"AU",
"AT",
"AZ",
"BS",
"BH",
"BD",
"BB",
"BY",
"BE",
"BZ",
"BJ",
"BM",
"BT",
"BO",
"BQ",
"BA",
"BW",
"BV",
"BR",
"IO",
"BN",
"BG",
"BF",
"BI",
"CV",
"KH",
"CM",
"CA",
"KY",
"CF",
"TD",
"CL",
"CN",
"CX",
"CC",
"CO",
"KM",
"CG",
"CD",
"CK",
"CR",
"CI",
"HR",
"CU",
"CW",
"CY",
"CZ",
"DK",
"DJ",
"DM",
"DO",
"EC",
"EG",
"SV",
"GQ",
"ER",
"EE",
"SZ",
"ET",
"FK",
"FO",
"FJ",
"FI",
"FR",
"GF",
"PF",
"TF",
"GA",
"GM",
"GE",
"DE",
"GH",
"GI",
"GR",
"GL",
"GD",
"GP",
"GU",
"GT",
"GG",
"GN",
"GW",
"GY",
"HT",
"HM",
"VA",
"HN",
"HK",
"HU",
"IS",
"IN",
"ID",
"IR",
"IQ",
"IE",
"IM",
"IL",
"IT",
"JM",
"JP",
"JE",
"JO",
"KZ",
"KE",
"KI",
"KP",
"KR",
"KW",
"KG",
"LA",
"LV",
"LB",
"LS",
"LR",
"LY",
"LI",
"LT",
"LU",
"MO",
"MG",
"MW",
"MY",
"MV",
"ML",
"MT",
"MH",
"MQ",
"MR",
"MU",
"YT",
"MX",
"FM",
"MD",
"MC",
"MN",
"ME",
"MS",
"MA",
"MZ",
"MM",
"NA",
"NR",
"NP",
"NL",
"NC",
"NZ",
"NI",
"NE",
"NG",
"NU",
"NF",
"MK",
"MP",
"NO",
"OM",
"PK",
"PW",
"PS",
"PA",
"PG",
"PY",
"PE",
"PH",
"PN",
"PL",
"PT",
"PR",
"QA",
"RE",
"RO",
"RU",
"RW",
"BL",
"SH",
"KN",
"LC",
"MF",
"PM",
"VC",
"WS",
"SM",
"ST",
"SA",
"SN",
"RS",
"SC",
"SL",
"SG",
"SX",
"SK",
"SI",
"SB",
"SO",
"ZA",
"GS",
"SS",
"ES",
"LK",
"SD",
"SR",
"SJ",
"SE",
"CH",
"SY",
"TW",
"TJ",
"TZ",
"TH",
"TL",
"TG",
"TK",
"TO",
"TT",
"TN",
"TR",
"TM",
"TC",
"TV",
"UG",
"UA",
"AE",
"GB",
"US",
"UM",
"UY",
"UZ",
"VU",
"VE",
"VN",
"VG",
"VI",
"WF",
"EH",
"YE",
"ZM",
"ZW"
],
"description": "ISO 3166-1 alpha-2 country code (e.g., \"US\", \"GB\")"
},
"shipping_phone": {
"type": "string",
"description": "Recipient phone for the shipping address (E.164 preferred); defaults to customer_phone if omitted"
},
"notes": {
"type": "string",
"description": "Optional order notes"
}
},
"required": [
"site_id",
"cart_id",
"buyer_delegation_token",
"customer_name",
"customer_email",
"customer_phone",
"shipping_name",
"shipping_line1",
"shipping_city",
"shipping_state",
"shipping_postal_code",
"shipping_country"
]
}출력 스키마
{
"type": "object",
"properties": {
"order_id": {
"type": "string"
},
"status": {
"type": "string"
},
"total": {
"type": "object",
"properties": {
"amount": {
"type": "string"
},
"currency": {
"type": "string"
}
}
},
"created_at": {
"type": "string"
},
"items": {
"type": "array",
"items": {
"type": "object",
"properties": {
"title": {
"type": "string"
},
"name": {
"type": "string"
},
"quantity": {
"type": "number"
},
"line_total": {
"type": "object",
"properties": {
"amount": {
"type": "string"
},
"currency": {
"type": "string"
}
}
}
}
}
}
}
}🟢get_order(site_id, order_id, buyer_delegation_token)
Retrieve details for an order by its ID, including items, status, shipping, and tracking information. Orders are buyer-private — pass `buyer_delegation_token` (the delegation token from this buyer's checkout approval) so the gateway can confirm the buyer owns this order. If checking if an order is paid: a status of 'pending' or 'pending_payment' means the order has NOT been paid. Do NOT assume that the vendor storefront has synchronization delays or database lag; treat 'pending' as unpaid. When an order is unpaid, offer to collect payment in the chat by starting the in-chat payment flow (get_payment_methods → initiate_payment → get_payment_status) rather than only pointing the user at the payment_url. Do not mark the purchase task as successful until the status updates to 'processing' or 'completed'.
입력 스키마
{
"type": "object",
"properties": {
"site_id": {
"type": "string",
"description": "Registered site ID"
},
"order_id": {
"type": "string",
"description": "Order ID"
},
"buyer_delegation_token": {
"type": "string",
"description": "The buyer's delegation token (from their checkout approval); required to read their order."
}
},
"required": [
"site_id",
"order_id"
]
}출력 스키마
{
"type": "object",
"properties": {
"order_id": {
"type": "string"
},
"status": {
"type": "string"
},
"total": {
"type": "object",
"properties": {
"amount": {
"type": "string"
},
"currency": {
"type": "string"
}
}
},
"created_at": {
"type": "string"
},
"items": {
"type": "array",
"items": {
"type": "object",
"properties": {
"title": {
"type": "string"
},
"name": {
"type": "string"
},
"quantity": {
"type": "number"
},
"line_total": {
"type": "object",
"properties": {
"amount": {
"type": "string"
},
"currency": {
"type": "string"
}
}
}
}
}
}
}
}🟢list_orders(site_id, status, page, per_page, buyer_delegation_token)
List recent orders for a site, optionally filtered by status (pending, processing, completed, cancelled, refunded). Orders are buyer-private — pass `buyer_delegation_token` (from this buyer's checkout approval); only that buyer's orders are returned.
입력 스키마
{
"type": "object",
"properties": {
"site_id": {
"type": "string",
"description": "Registered site ID"
},
"status": {
"type": "string",
"description": "Filter by order status",
"enum": [
"pending",
"processing",
"completed",
"cancelled",
"refunded"
]
},
"page": {
"type": "integer",
"description": "Page number (1-indexed, default: 1)"
},
"per_page": {
"type": "integer",
"description": "Results per page (max 100, default: 20)"
},
"buyer_delegation_token": {
"type": "string",
"description": "The buyer's delegation token (from their checkout approval); required to list their orders."
}
},
"required": [
"site_id"
]
}출력 스키마
{
"type": "object",
"properties": {
"orders": {
"type": "array",
"items": {
"type": "object",
"properties": {
"order_id": {
"type": "string"
},
"status": {
"type": "string"
},
"total": {
"type": "object",
"properties": {
"amount": {
"type": "string"
},
"currency": {
"type": "string"
}
}
},
"created_at": {
"type": "string"
},
"items": {
"type": "array",
"items": {
"type": "object",
"properties": {
"title": {
"type": "string"
},
"name": {
"type": "string"
},
"quantity": {
"type": "number"
},
"line_total": {
"type": "object",
"properties": {
"amount": {
"type": "string"
},
"currency": {
"type": "string"
}
}
}
}
}
}
}
}
}
},
"required": [
"orders"
]
}🟡request_delegation(site_id, email, scopes, marketing_opt_in)
Start the human delegation (approval) flow needed for checkout/payment. PREFERRED: pass the buyer's `email` — the gateway emails them a 6-digit code and returns a device_code; ask the user for the code and call submit_delegation_otp. This keeps approval fully in-chat (no link) and you never see the code, so you cannot approve on their behalf. If you omit `email`, it falls back to a browser approval link (device flow) which the user must open; then poll check_delegation. You can never approve a delegation yourself.
입력 스키마
{
"type": "object",
"properties": {
"site_id": {
"type": "string",
"description": "Site ID requiring delegation"
},
"email": {
"type": "string",
"description": "Buyer's email. When provided, a one-time approval code is emailed to them and approval happens in-chat via submit_delegation_otp (recommended)."
},
"scopes": {
"type": "array",
"items": {
"type": "string",
"enum": [
"read_products",
"manage_cart",
"execute_checkout",
"read_orders"
]
},
"description": "Scopes to request (defaults to all four scopes)"
},
"marketing_opt_in": {
"type": "boolean",
"description": "Set true ONLY if the buyer explicitly agreed to receive marketing/deals emails (e.g. ticked the opt-in box). Subscribes their email to the consumer mailing list."
}
},
"required": [
"site_id"
]
}출력 스키마
{
"type": "object",
"properties": {
"device_code": {
"type": "string"
},
"user_code": {
"type": "string"
},
"delivery": {
"type": "string"
},
"approvalUrl": {
"type": "string"
},
"status": {
"type": "string"
},
"delegation_token": {
"type": "string"
}
}
}🟡submit_delegation_otp(site_id, device_code, code)
Submit the 6-digit code the buyer received by email (from request_delegation with an email) to approve the delegation in-chat. On success returns a delegation_token to use as buyer_delegation_token for checkout/payment. You cannot obtain this code yourself — the user must read it from their email and give it to you.
입력 스키마
{
"type": "object",
"properties": {
"site_id": {
"type": "string",
"description": "Registered site ID (optional if DEFAULT_SITE_ID is set)"
},
"device_code": {
"type": "string",
"description": "device_code returned by request_delegation"
},
"code": {
"type": "string",
"description": "The 6-digit code the buyer read from their email"
}
},
"required": [
"device_code",
"code"
]
}출력 스키마
{
"type": "object",
"properties": {
"device_code": {
"type": "string"
},
"user_code": {
"type": "string"
},
"delivery": {
"type": "string"
},
"approvalUrl": {
"type": "string"
},
"status": {
"type": "string"
},
"delegation_token": {
"type": "string"
}
}
}🟢check_delegation(device_code)
Poll for human approval of a delegation request. When status is "approved", returns the delegation_token to use as buyer_delegation_token in execute_checkout.
입력 스키마
{
"type": "object",
"properties": {
"device_code": {
"type": "string",
"description": "device_code returned by request_delegation"
}
},
"required": [
"device_code"
]
}출력 스키마
{
"type": "object",
"properties": {
"device_code": {
"type": "string"
},
"user_code": {
"type": "string"
},
"delivery": {
"type": "string"
},
"approvalUrl": {
"type": "string"
},
"status": {
"type": "string"
},
"delegation_token": {
"type": "string"
}
}
}🟢get_payment_methods(site_id, order_id)
STEP 1 of the in-chat payment flow. Returns the payment channels available for an order (e.g. "mobile_money", "card") plus a `gateways` array of the enabled payment gateways (each with id, label, and its channels). When more than one gateway is listed, ask the buyer which they want to use and pass it as `gateway` to initiate_payment. Call this first, after an order exists. Then call initiate_payment with the chosen channel (and gateway if more than one). site_id falls back to DEFAULT_SITE_ID if omitted.
입력 스키마
{
"type": "object",
"properties": {
"site_id": {
"type": "string",
"description": "Registered site ID (optional if DEFAULT_SITE_ID is set)"
},
"order_id": {
"type": "string",
"description": "Order ID to pay for"
}
},
"required": [
"order_id"
]
}출력 스키마
{
"type": "object",
"properties": {
"mobile_money_provider_labels": {
"type": "object"
}
}
}🔴initiate_payment(site_id, order_id, channel, phone, provider, ...)
STEP 2 of the in-chat payment flow. Starts a payment session for an order and returns a PaymentSession with an `instruction` the agent renders in chat. REQUIRES a buyer_delegation_token — obtain it exactly like execute_checkout: call request_delegation, have the user approve in chat, then check_delegation to get the token (spending money always needs human approval). For channel "mobile_money" you MUST collect the buyer's `phone` (Ghana: 055… or +233…) and `provider` — use codes mtn, vod (Vodafone/Telecel), or tgo (AirtelTigo); aliases telecel→vod, tigo→tgo are accepted. ALWAYS quote the **Show this instruction to the buyer** line from the response verbatim (Paystack display_text). For channel "card", no phone/provider is needed; the response instruction contains an `authorization_url` you send the user to. After calling: if instruction.action == "submit_otp", ask the user for the OTP and call submit_payment_otp. If instruction.action == "approve_on_phone", tell the user to approve the prompt on their phone, then poll get_payment_status. If instruction.action == "redirect" (card), send the user the authorization_url, then poll get_payment_status.
입력 스키마
{
"type": "object",
"properties": {
"site_id": {
"type": "string",
"description": "Registered site ID (optional if DEFAULT_SITE_ID is set)"
},
"order_id": {
"type": "string",
"description": "Order ID to pay for"
},
"channel": {
"type": "string",
"enum": [
"mobile_money",
"card"
],
"description": "Payment channel chosen by the buyer (from get_payment_methods)"
},
"phone": {
"type": "string",
"description": "Buyer mobile-money phone number (required for channel \"mobile_money\")"
},
"provider": {
"type": "string",
"enum": [
"mtn",
"vod",
"tgo",
"telecel",
"vodafone",
"tigo",
"airteltigo"
],
"description": "Mobile-money provider (required for channel \"mobile_money\"). Codes: mtn, vod (Vodafone/Telecel), tgo (AirtelTigo)."
},
"gateway": {
"type": "string",
"enum": [
"paystack",
"stripe",
"paypal"
],
"description": "Payment gateway to use when the store has more than one enabled (see get_payment_methods.gateways[].id). Optional — defaults to the store's first enabled gateway."
},
"buyer_delegation_token": {
"type": "string",
"description": "Delegation token from the buyer (from request_delegation/check_delegation). Required — payments always need human approval."
}
},
"required": [
"order_id",
"channel"
]
}출력 스키마
{
"type": "object",
"properties": {
"payment_status": {
"type": "string"
},
"reference": {
"type": "string"
},
"message": {
"type": "string"
},
"instruction": {
"type": "object",
"properties": {
"action": {
"type": "string"
},
"provider": {
"type": "string"
},
"authorization_url": {
"type": "string"
}
}
}
}
}🔴submit_payment_otp(site_id, order_id, otp, buyer_delegation_token)
STEP 3 (mobile_money only, when initiate_payment returned instruction.action == "submit_otp"). Submits the one-time password the buyer received to authorise the mobile-money charge. REQUIRES the same buyer_delegation_token used for initiate_payment. After submitting, poll get_payment_status until payment_status is "paid"/"processing" or "failed".
입력 스키마
{
"type": "object",
"properties": {
"site_id": {
"type": "string",
"description": "Registered site ID (optional if DEFAULT_SITE_ID is set)"
},
"order_id": {
"type": "string",
"description": "Order ID being paid for"
},
"otp": {
"type": "string",
"description": "One-time password entered by the buyer"
},
"buyer_delegation_token": {
"type": "string",
"description": "Delegation token from the buyer (same one used for initiate_payment). Required."
}
},
"required": [
"order_id",
"otp"
]
}출력 스키마
{
"type": "object",
"properties": {
"payment_status": {
"type": "string"
},
"reference": {
"type": "string"
},
"message": {
"type": "string"
},
"instruction": {
"type": "object",
"properties": {
"action": {
"type": "string"
},
"provider": {
"type": "string"
},
"authorization_url": {
"type": "string"
}
}
}
}
}🟢get_payment_status(site_id, order_id)
FINAL STEP of the in-chat payment flow. Returns the current PaymentSession for an order. Poll this (every ~5 seconds) after initiate_payment/submit_payment_otp until payment_status becomes "paid" or "processing" (success — the order is confirmed) or "failed" (tell the user; they can retry by initiating a new payment). Do NOT treat the purchase as complete until this returns "paid" or "processing". No delegation needed (read-only).
입력 스키마
{
"type": "object",
"properties": {
"site_id": {
"type": "string",
"description": "Registered site ID (optional if DEFAULT_SITE_ID is set)"
},
"order_id": {
"type": "string",
"description": "Order ID to check payment status for"
}
},
"required": [
"order_id"
]
}출력 스키마
{
"type": "object",
"properties": {
"payment_status": {
"type": "string"
},
"reference": {
"type": "string"
},
"message": {
"type": "string"
},
"instruction": {
"type": "object",
"properties": {
"action": {
"type": "string"
},
"provider": {
"type": "string"
},
"authorization_url": {
"type": "string"
}
}
}
}
}커뮤니티
증거