Skip to main content
Glama

ucp_create_checkout

Idempotent

Create a UCP checkout session from line items. Returns a UCP checkout object with status 'incomplete'. Checkout guide: https://trusteed.xyz/.well-known/agent-checkout-guide.json.

Input Schema

TableJSON Schema
NameRequiredDescriptionDefault
labelNoOptional label for additional identifiers (e.g. external order ref, multi-PSP reference)
intentNoIntent context for relevance and personalization
currencyYesISO 4217 currency code (e.g. USD)
agent_keyNoSandbox credential from `create_sandbox_key`. Use this when your client cannot set an `Authorization: Bearer` header.
line_itemsYesLine items for the checkout
idempotency_keyNoRequired by the checkout bucket (UUID-v4 or bounded ASCII token). Choose one per purchase attempt and reuse it to retry safely. Alternatively send it as the Idempotency-Key header or params._meta["trusteed/idempotency-key"].

Output Schema

TableJSON Schema
NameRequiredDescriptionDefault
idYes
labelNo
intentNo
statusYes
totalsYes
currencyYes
next_stepNo
created_atYes
expires_atNoISO-8601 UTC instant at which this checkout SESSION stops being usable. It is not a stock reservation and not a price guarantee.
extensionsNo
line_itemsYes
updated_atYes
fulfillmentNo
next_actionNo
approval_urlNo
idempotency_keyNo
payment_optionsNo
next_step_messageNo
expires_in_secondsNoWhole seconds left on this checkout SESSION at response time (0 when already past). It is not a stock reservation and not a price guarantee.

Schema Changelog

Changes observed during successful MCP inspections.

  1. Changed2 schema fields changed
    • addedOutput schema / properties / expires_at
      Added value: +{
      +  "description": "ISO-8601 UTC instant at which this checkout SESSION stops being usable. It is not a stock reservation and not a price guarantee.",
      +  "type": "string"
      +}
    • addedOutput schema / properties / expires_in_seconds
      Added value: +{
      +  "description": "Whole seconds left on this checkout SESSION at response time (0 when already past). It is not a stock reservation and not a price guarantee.",
      +  "minimum": 0,
      +  "type": "integer"
      +}
  2. Changed1 schema field changed
    • changedOutput schema / properties / payment_options / items / properties / reason_unavailable / enum
      Previous value: -[
      -  "coming_soon",
      -  "not_enabled"
      -]New value: +[
      +  "coming_soon",
      +  "not_enabled",
      +  "currency_not_supported"
      +]
  3. Changed1 schema field changed
    • changedOutput schema / properties / payment_options / items / properties / id / enum
      Previous value: -[
      -  "demo_card",
      -  "demo_wallet",
      -  "own_wallet",
      -  "kyapay"
      -]New value: +[
      +  "demo_card",
      +  "demo_wallet",
      +  "own_wallet",
      +  "merchant_card",
      +  "kyapay"
      +]
  4. Changed5 schema fields changed
    • addedInput schema / properties / idempotency_key
      Added value: +{
      +  "description": "Required by the checkout bucket (UUID-v4 or bounded ASCII token). Choose one per purchase attempt and reuse it to retry safely. Alternatively send it as the Idempotency-Key header or params._meta[\"trusteed/idempotency-key\"].",
      +  "type": "string"
      +}
    • addedInput schema / properties / line_items / items / properties / variant_id
      Added value: +{
      +  "description": "Variant (size/colour) id as listed by get_product_details. Required when the product has more than one variant; the price and stock of THAT variant apply.",
      +  "minLength": 1,
      +  "type": "string"
      +}
    • addedOutput schema / properties / fulfillment
      Added value: +{
      +  "additionalProperties": true,
      +  "properties": {
      +    "destination": {
      +      "additionalProperties": true,
      +      "properties": {
      +        "city": {
      +          "type": "string"
      +        },
      +        "country_code": {
      +          "type": "string"
      +        },
      +        "province_code": {
      +          "type": "string"
      +        },
      +        "zip": {
      +          "type": "string"
      +        }
      +      },
      +      "required": [
      +        "city",
      +        "country_code",
      +        "zip"
      +      ],
      +      "type": "object"
      +    },
      +    "options": {
      +      "items": {
      +        "additionalProperties": true,
      +        "properties": {
      +          "authoritative": {
      +            "type": "boolean"
      +          },
      +          "estimated_delivery": {
      +            "type": "string"
      +          },
      +          "id": {
      +            "type": "string"
      +          },
      +          "price": {
      +            "additionalProperties": true,
      +            "properties": {
      +              "amount": {
      +                "type": "number"
      +              },
      +              "currency": {
      +                "type": "string"
      +              }
      +            },
      +            "required": [
      +              "amount",
      +              "currency"
      +            ],
      +            "type": "object"
      +          },
      +          "source": {
      +            "enum": [
      +              "platform",
      +              "merchant_policy",
      +              "estimated"
      +            ],
      +            "type": "string"
      +          },
      +          "title": {
      +            "type": "string"
      +          }
      +        },
      +        "required": [
      +          "id",
      +          "title",
      +          "price",
      +          "source",
      +          "authoritative"
      +        ],
      +        "type": "object"
      +      },
      +      "type": "array"
      +    },
      +    "selected_option_id": {
      +      "type": "string"
      +    }
      +  },
      +  "type": "object"
      +}
    • addedOutput schema / properties / line_items / items / properties / variant_id
      Added value: +{
      +  "type": "string"
      +}
    • addedOutput schema / properties / line_items / items / properties / variant_title
      Added value: +{
      +  "type": "string"
      +}
  5. Changed3 schema fields changed
    • addedOutput schema / properties / next_step
      Added value: +{
      +  "const": "ask_user_payment_method",
      +  "type": "string"
      +}
    • addedOutput schema / properties / next_step_message
      Added value: +{
      +  "type": "string"
      +}
    • addedOutput schema / properties / payment_options
      Added value: +{
      +  "items": {
      +    "additionalProperties": true,
      +    "properties": {
      +      "available": {
      +        "type": "boolean"
      +      },
      +      "funding_source": {
      +        "anyOf": [
      +          {
      +            "enum": [
      +              "platform_test_card",
      +              "platform_test_wallet",
      +              "buyer_wallet"
      +            ],
      +            "type": "string"
      +          },
      +          {
      +            "type": "null"
      +          }
      +        ]
      +      },
      +      "id": {
      +        "enum": [
      +          "demo_card",
      +          "demo_wallet",
      +          "own_wallet",
      +          "kyapay"
      +        ],
      +        "type": "string"
      +      },
      +      "label": {
      +        "type": "string"
      +      },
      +      "rail": {
      +        "enum": [
      +          "stripe",
      +          "x402",
      +          "kyapay"
      +        ],
      +        "type": "string"
      +      },
      +      "reason_unavailable": {
      +        "enum": [
      +          "coming_soon",
      +          "not_enabled"
      +        ],
      +        "type": "string"
      +      }
      +    },
      +    "required": [
      +      "id",
      +      "label",
      +      "rail",
      +      "funding_source",
      +      "available"
      +    ],
      +    "type": "object"
      +  },
      +  "type": "array"
      +}
  6. Changed2 schema fields changed
    • addedOutput schema / properties / approval_url
      Added value: +{
      +  "type": "string"
      +}
    • addedOutput schema / properties / next_action
      Added value: +{
      +  "additionalProperties": true,
      +  "properties": {
      +    "actor": {
      +      "const": "buyer",
      +      "type": "string"
      +    },
      +    "do": {
      +      "enum": [
      +        "approve",
      +        "pay"
      +      ],
      +      "type": "string"
      +    },
      +    "instruction": {
      +      "type": "string"
      +    },
      +    "reuse_arguments": {
      +      "items": {
      +        "enum": [
      +          "checkout_session_id",
      +          "checkout_id",
      +          "idempotency_key"
      +        ],
      +        "type": "string"
      +      },
      +      "type": "array"
      +    },
      +    "then_call": {
      +      "maxLength": 64,
      +      "minLength": 1,
      +      "type": "string"
      +    },
      +    "url": {
      +      "type": "string"
      +    }
      +  },
      +  "required": [
      +    "actor",
      +    "do",
      +    "url",
      +    "instruction"
      +  ],
      +  "type": "object"
      +}
  7. Changed2 schema fields changed
    • changedInput schema / properties / line_items / items / properties / price / properties / amount / description
      Previous value: -"Price in smallest unit (cents)"New value: +"Ignored: the catalogue price is used and returned per line. Any non-negative integer is accepted."
    • changedInput schema / properties / line_items / items / properties / title / description
      Previous value: -"Product title"New value: +"Ignored: the catalogue title is used. Any non-empty string is accepted."
  8. Changed1 schema field changed
    • removedInput schema / properties / payment_mandate
      Removed value: -{
      -  "anyOf": [
      -    {
      -      "additionalProperties": {},
      -      "type": "object"
      -    },
      -    {
      -      "type": "string"
      -    }
      -  ],
      -  "description": "Payment mandate with `mandate_id`, `max_amount_cents` (integer, minor units), `currency` (3 letters, must match the cart's), `exp` (expiry as an INTEGER of Unix seconds — not an ISO 8601 date string), `sub` (your agent id) and `aud` (the store slug this mandate is for, e.g. the slug in the URL you are calling — not a domain). Use this when your client cannot set an `X-Payment-Mandate` header."
      -}
  9. Changed1 schema field changed
    • addedInput schema / properties / agent_key
      Added value: +{
      +  "description": "Sandbox credential from `create_sandbox_key`. Use this when your client cannot set an `Authorization: Bearer` header.",
      +  "type": "string"
      +}
  10. Changed1 schema field changed
    • changedInput schema / properties / payment_mandate / description
      Previous value: -"Payment mandate with `mandate_id`, `max_amount_cents`, `currency`, `exp`, `sub`, `aud`. Its `currency` must match the cart's. Use this when your client cannot set an `X-Payment-Mandate` header."New value: +"Payment mandate with `mandate_id`, `max_amount_cents` (integer, minor units), `currency` (3 letters, must match the cart's), `exp` (expiry as an INTEGER of Unix seconds — not an ISO 8601 date string), `sub` (your agent id) and `aud` (the store slug this mandate is for, e.g. the slug in the URL you are calling — not a domain). Use this when your client cannot set an `X-Payment-Mandate` header."
  11. Changed1 schema field changed
    • addedInput schema / properties / payment_mandate
      Added value: +{
      +  "anyOf": [
      +    {
      +      "additionalProperties": {},
      +      "type": "object"
      +    },
      +    {
      +      "type": "string"
      +    }
      +  ],
      +  "description": "Payment mandate with `mandate_id`, `max_amount_cents`, `currency`, `exp`, `sub`, `aud`. Its `currency` must match the cart's. Use this when your client cannot set an `X-Payment-Mandate` header."
      +}
  12. Changed10 schema fields changed
    • changedInput schema / additionalProperties
      Previous value: -falseNew value: +true
    • changedInput schema / properties / intent / additionalProperties
      Previous value: -falseNew value: +true
    • changedInput schema / properties / line_items / items / additionalProperties
      Previous value: -falseNew value: +true
    • changedOutput schema / additionalProperties
      Previous value: -falseNew value: +true
    • changedOutput schema / properties / extensions / additionalProperties
      Previous value: -falseNew value: +true
    • changedOutput schema / properties / extensions / properties / warnings / items / additionalProperties
      Previous value: -falseNew value: +true
    • changedOutput schema / properties / intent / additionalProperties
      Previous value: -falseNew value: +true
    • changedOutput schema / properties / line_items / items / additionalProperties
      Previous value: -falseNew value: +true
    • changedOutput schema / properties / line_items / items / properties / price / additionalProperties
      Previous value: -falseNew value: +true
    • changedOutput schema / properties / totals / items / additionalProperties
      Previous value: -falseNew value: +true
  13. Added
  14. Removed
  15. Changed4 schema fields changed
    • addedInput schema / $schema
      Added value: +"http://json-schema.org/draft-07/schema#"
    • addedInput schema / additionalProperties
      Added value: +false
    • addedInput schema / properties
      Added value: +{
      +  "currency": {
      +    "description": "ISO 4217 currency code (e.g. USD)",
      +    "maxLength": 3,
      +    "minLength": 3,
      +    "type": "string"
      +  },
      +  "intent": {
      +    "additionalProperties": false,
      +    "description": "Intent context for relevance and personalization",
      +    "properties": {
      +      "action": {
      +        "description": "Intent action (e.g. 'purchase', 'gift', 'compare')",
      +        "type": "string"
      +      },
      +      "context": {
      +        "description": "Natural language context for personalization",
      +        "type": "string"
      +      },
      +      "locale": {
      +        "description": "ISO locale",
      +        "type": "string"
      +      }
      +    },
      +    "required": [
      +      "action"
      +    ],
      +    "type": "object"
      +  },
      +  "label": {
      +    "description": "Optional label for additional identifiers (e.g. external order ref, multi-PSP reference)",
      +    "type": "string"
      +  },
      +  "line_items": {
      +    "description": "Line items for the checkout",
      +    "items": {
      +      "additionalProperties": false,
      +      "properties": {
      +        "price": {
      +          "additionalProperties": false,
      +          "properties": {
      +            "amount": {
      +              "description": "Price in smallest unit (cents)",
      +              "minimum": 0,
      +              "type": "number"
      +            },
      +            "currency": {
      +              "description": "ISO 4217 currency code",
      +              "maxLength": 3,
      +              "minLength": 3,
      +              "type": "string"
      +            }
      +          },
      +          "required": [
      +            "amount",
      +            "currency"
      +          ],
      +          "type": "object"
      +        },
      +        "product_id": {
      +          "description": "Product identifier",
      +          "minLength": 1,
      +          "type": "string"
      +        },
      +        "quantity": {
      +          "description": "Quantity",
      +          "exclusiveMinimum": 0,
      +          "type": "integer"
      +        },
      +        "title": {
      +          "description": "Product title",
      +          "minLength": 1,
      +          "type": "string"
      +        }
      +      },
      +      "required": [
      +        "product_id",
      +        "title",
      +        "quantity",
      +        "price"
      +      ],
      +      "type": "object"
      +    },
      +    "minItems": 1,
      +    "type": "array"
      +  }
      +}
    • addedInput schema / required
      Added value: +[
      +  "currency",
      +  "line_items"
      +]
  16. Changed5 schema fields changed
    • removedInput schema / $schema
      Removed value: -"http://json-schema.org/draft-07/schema#"
    • removedInput schema / additionalProperties
      Removed value: -false
    • removedInput schema / properties
      Removed value: -{
      -  "currency": {
      -    "description": "ISO 4217 currency code (e.g. USD)",
      -    "maxLength": 3,
      -    "minLength": 3,
      -    "type": "string"
      -  },
      -  "intent": {
      -    "additionalProperties": false,
      -    "description": "Intent context for relevance and personalization",
      -    "properties": {
      -      "action": {
      -        "description": "Intent action (e.g. 'purchase', 'gift', 'compare')",
      -        "type": "string"
      -      },
      -      "context": {
      -        "description": "Natural language context for personalization",
      -        "type": "string"
      -      },
      -      "locale": {
      -        "description": "ISO locale",
      -        "type": "string"
      -      }
      -    },
      -    "required": [
      -      "action"
      -    ],
      -    "type": "object"
      -  },
      -  "label": {
      -    "description": "Optional label for additional identifiers (e.g. external order ref, multi-PSP reference)",
      -    "type": "string"
      -  },
      -  "line_items": {
      -    "description": "Line items for the checkout",
      -    "items": {
      -      "additionalProperties": false,
      -      "properties": {
      -        "price": {
      -          "additionalProperties": false,
      -          "properties": {
      -            "amount": {
      -              "description": "Price in smallest unit (cents)",
      -              "minimum": 0,
      -              "type": "number"
      -            },
      -            "currency": {
      -              "description": "ISO 4217 currency code",
      -              "maxLength": 3,
      -              "minLength": 3,
      -              "type": "string"
      -            }
      -          },
      -          "required": [
      -            "amount",
      -            "currency"
      -          ],
      -          "type": "object"
      -        },
      -        "product_id": {
      -          "description": "Product identifier",
      -          "minLength": 1,
      -          "type": "string"
      -        },
      -        "quantity": {
      -          "description": "Quantity",
      -          "exclusiveMinimum": 0,
      -          "type": "integer"
      -        },
      -        "title": {
      -          "description": "Product title",
      -          "minLength": 1,
      -          "type": "string"
      -        }
      -      },
      -      "required": [
      -        "product_id",
      -        "title",
      -        "quantity",
      -        "price"
      -      ],
      -      "type": "object"
      -    },
      -    "minItems": 1,
      -    "type": "array"
      -  }
      -}
    • removedInput schema / required
      Removed value: -[
      -  "currency",
      -  "line_items"
      -]
    • changedOutput schema / (root)
      Previous value: -{
      -  "$schema": "http://json-schema.org/draft-07/schema#",
      -  "additionalProperties": false,
      -  "properties": {
      -    "created_at": {
      -      "type": "string"
      -    },
      -    "currency": {
      -      "type": "string"
      -    },
      -    "extensions": {
      -      "additionalProperties": false,
      -      "properties": {
      -        "warnings": {
      -          "items": {
      -            "additionalProperties": false,
      -            "properties": {
      -              "code": {
      -                "type": "string"
      -              },
      -              "disclosure_url": {
      -                "type": "string"
      -              },
      -              "message": {
      -                "type": "string"
      -              },
      -              "severity": {
      -                "enum": [
      -                  "info",
      -                  "caution",
      -                  "critical"
      -                ],
      -                "type": "string"
      -              }
      -            },
      -            "required": [
      -              "code",
      -              "message",
      -              "severity"
      -            ],
      -            "type": "object"
      -          },
      -          "type": "array"
      -        }
      -      },
      -      "type": "object"
      -    },
      -    "id": {
      -      "type": "string"
      -    },
      -    "idempotency_key": {
      -      "type": "string"
      -    },
      -    "intent": {
      -      "additionalProperties": false,
      -      "properties": {
      -        "action": {
      -          "type": "string"
      -        },
      -        "context": {
      -          "type": "string"
      -        },
      -        "locale": {
      -          "type": "string"
      -        }
      -      },
      -      "required": [
      -        "action"
      -      ],
      -      "type": "object"
      -    },
      -    "label": {
      -      "type": "string"
      -    },
      -    "line_items": {
      -      "items": {
      -        "additionalProperties": false,
      -        "properties": {
      -          "id": {
      -            "type": "string"
      -          },
      -          "price": {
      -            "additionalProperties": false,
      -            "properties": {
      -              "amount": {
      -                "type": "number"
      -              },
      -              "currency": {
      -                "type": "string"
      -              }
      -            },
      -            "required": [
      -              "amount",
      -              "currency"
      -            ],
      -            "type": "object"
      -          },
      -          "product_id": {
      -            "type": "string"
      -          },
      -          "quantity": {
      -            "type": "number"
      -          },
      -          "title": {
      -            "type": "string"
      -          }
      -        },
      -        "required": [
      -          "id",
      -          "product_id",
      -          "title",
      -          "quantity",
      -          "price"
      -        ],
      -        "type": "object"
      -      },
      -      "type": "array"
      -    },
      -    "status": {
      -      "enum": [
      -        "incomplete",
      -        "requires_escalation",
      -        "ready_for_complete",
      -        "complete_in_progress",
      -        "completed",
      -        "canceled"
      -      ],
      -      "type": "string"
      -    },
      -    "totals": {
      -      "items": {
      -        "additionalProperties": false,
      -        "properties": {
      -          "amount": {
      -            "type": "number"
      -          },
      -          "currency": {
      -            "type": "string"
      -          },
      -          "label": {
      -            "type": "string"
      -          }
      -        },
      -        "required": [
      -          "label",
      -          "amount",
      -          "currency"
      -        ],
      -        "type": "object"
      -      },
      -      "type": "array"
      -    },
      -    "updated_at": {
      -      "type": "string"
      -    }
      -  },
      -  "required": [
      -    "id",
      -    "status",
      -    "currency",
      -    "line_items",
      -    "totals",
      -    "created_at",
      -    "updated_at"
      -  ],
      -  "type": "object"
      -}New value: +null
  17. First observed

TDQS

Score is being calculated.

Try in Browser

Glama MCP Gateway

Add one secure layer between your agents and this server.

Resources