Skip to main content
Glama

create_checkout_session

Create a Stripe Checkout link for an end user to buy credits; returns checkout_url and session_id. Nothing is charged until the buyer pays on that page; credits are issued when payment completes. Price either a pricing tier (pricing_tier_id, optionally × quantity) or a custom amount (credit_type_id + amount credits, priced at the credit type's exchange_rate). billing: "recurring" creates a subscription (tier required; billing_type recurring or both), credited on every paid invoice; otherwise it is a one-time purchase even on a recurring tier. save_payment_method: true (one-time only) keeps the card for charge_saved_card and auto top-up. success_url and cancel_url must be https on a Cred host or a domain listed under Dashboard → Payments → Allowed redirect domains; on any other domain the link is still created and silently redirects to Cred's default pages. Requires an sk_live_ API key. Not CRD-metered.

Input Schema

NameRequiredDescriptionDefault
amountNoCustom-amount checkout: number of credits to sell
api_keyNoCred API key (optional if set via the x-api-key header)
billingNoDefault one_time
user_idYesExternal user ID of the buyer (created if new)
quantityNoTier packs (or seats for a subscription); default 1
user_nameNoBuyer display name
cancel_urlNoRedirect if the buyer cancels, on an allowed domain (else Cred's default page, no error)
project_idNoCred project ID (optional; the API key already identifies the project)
signup_urlNoApp/page URL the buyer came from (attribution)
user_emailNoBuyer email (prefills Checkout, matched first)
success_urlNoRedirect after payment, on an allowed domain (else Cred's default page, no error)
x402_paymentNoBase64 x402 PaymentPayload, only when a previous call failed with an x402 PaymentRequired because the account is out of CRD
credit_type_idNoCredit type to grant. Required with amount, and with a tier that allows several types (400 CREDIT_TYPE_REQUIRED otherwise).
pricing_tier_idNoTier to sell
save_payment_methodNoSave the card for off-session charges (one-time checkouts only)

Schema Changelog

Changes observed during successful MCP inspections.

  1. First observed

TDQS

A4.3/5.0
Behavior4/5

Does the description disclose side effects, auth requirements, rate limits, or destructive behavior?

With no annotations, the description carries the full burden and does so well: nothing is charged until the buyer pays, credits are issued on payment completion, subscriptions are credited on every paid invoice, and an invalid redirect domain is silently swallowed with a fallback to Cred's default page. It also states the sk_live_ key requirement and that the tool is not CRD-metered. It omits rate limits, idempotency, and the error path when neither pricing option is supplied.

Agents need to know what a tool does to the world before calling it. Descriptions should go beyond structured annotations to explain consequences.

Conciseness4/5

Is the description appropriately sized, front-loaded, and free of redundancy?

Front-loaded with purpose and return values, then ordered into pricing, billing, card saving, redirects, and auth. It is dense and semicolon-heavy, and a few clauses (e.g. the parenthetical about default one_time) duplicate schema text, but nearly every sentence carries operational weight.

Shorter descriptions cost fewer tokens and are easier for agents to parse. Every sentence should earn its place.

Completeness4/5

Given the tool's complexity, does the description cover enough for an agent to succeed on first attempt?

For a 15-parameter mutation-shaped tool with no annotations and no output schema, the description covers the pricing model, billing semantics, redirect domain caveats, auth level, and metering behavior. The remaining gap is the failure mode when neither pricing_tier_id nor amount/credit_type_id is provided, and error handling generally.

Complex tools with many parameters or behaviors need more documentation. Simple tools need less. This dimension scales expectations accordingly.

Parameters4/5

Does the description clarify parameter syntax, constraints, interactions, or defaults beyond what the schema provides?

Schema coverage is 100%, so the baseline is 3, but the description adds real cross-parameter meaning the schema cannot: tier × quantity vs amount + credit_type_id, that recurring requires a tier and a recurring/billing_type both setting, and that save_payment_method is one-time only. It explains how the pieces combine rather than restating individual field text.

Input schemas describe structure but not intent. Descriptions should explain non-obvious parameter relationships and valid value ranges.

Purpose5/5

Does the description clearly state what the tool does and how it differs from similar tools?

Opens with a specific verb and resource ("Create a Stripe Checkout link") plus the effect on the end user ("for an end user to buy credits") and the return values (checkout_url, session_id). That clearly separates it from siblings like create_subscription_portal_link, buy_credits_x402, and create_pricing_tier.

Agents choose between tools based on descriptions. A clear purpose with a specific verb and resource helps agents select the right tool.

Usage Guidelines4/5

Does the description explain when to use this tool, when not to, or what alternatives exist?

Gives explicit conditional guidance on which pricing path to take (pricing_tier_id × quantity vs credit_type_id + amount at exchange_rate), how billing=recurring differs from one_time, and when save_payment_method applies. It does not name an alternative sibling to use instead for out-of-scope cases, so it stops short of full when-not guidance.

Agents often have multiple tools that could apply. Explicit usage guidance like "use X instead of Y when Z" prevents misuse.

Try in Browser

Glama MCP Gateway

Add one secure layer between your agents and this server.

Resources