Skip to main content
Glama

create_payment_link

Generate hosted payment checkout URLs with custom amounts, currency, customer details, and expiry. Route to Stripe, Razorpay, or LemonSqueezy based on smart fee evaluation.

Instructions

Generates a secure hosted payment checkout URL across Stripe, Razorpay, or LemonSqueezy. Supports custom transaction amounts, automatic currency formatting, customer prefill metadata (name, email, phone), customizable link expiry timeouts, and intelligent multi-gateway routing. Returns a JSON object containing the checkout URL, payment link ID, status, and assigned gateway provider.

Input Schema

TableJSON Schema
NameRequiredDescriptionDefault
amountYesThe total transaction amount represented in minor currency units (e.g., 50000 for $500.00 USD or ₹500.00 INR, 1500 for $15.00). Must be a positive integer.
currencyYesThree-letter ISO 4217 currency code for the charge (e.g., "USD", "INR", "EUR", "GBP"). Defaults to "USD" or profile default if omitted.
providerNoTarget payment provider adapter to execute the charge ("stripe" for international credit cards, "razorpay" for Indian domestic UPI/cards/netbanking, "lemonsqueezy" for merchant-of-record digital products). If omitted, smart routing is used.
descriptionYesDetailed billing description or line item summary presented directly to the customer on the hosted checkout page.
customerNameNoCustomer full legal or billing name used to automatically prefill checkout contact forms.
smartRoutingNoWhen set to true, automatically evaluates the currency and transaction size to route to the lowest fee gateway provider.
customerEmailNoCustomer email address used for receipt delivery and automatic checkout form prefilling.
customerPhoneNoCustomer contact phone number with international country calling code (e.g., "+919876543210" or "+14155552671") for SMS delivery and verification.
expiresInMinutesNoTime-to-live expiration window in minutes after which the generated checkout URL automatically expires and rejects payments. Defaults to no expiration if omitted.
Behavior4/5

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

With no annotations provided, the description carries the full burden of behavioral disclosure. It states the resource is a hosted checkout URL, describes customer prefill metadata, link expiry, routing, and explicitly lists the JSON return fields. While it does not mention authorization requirements or whether the customer is charged immediately, it provides substantial behavioral context beyond a simple action statement.

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

Conciseness5/5

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

The description is three sentences, with the primary purpose front-loaded in the first sentence. The second sentence efficiently summarizes capabilities without redundancy, and the third sentence covers return values. Every sentence earns its place.

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?

Given the tool's complexity (9 parameters, multiple providers, no output schema), the description is largely complete: it names providers, key capabilities, and return fields. However, it omits detail about error conditions, authorization prerequisites, or whether the payment is captured immediately upon link generation, which would make it fully self-sufficient for an agent.

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

Parameters3/5

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

Schema description coverage is 100%, so the baseline is 3. The description summarizes parameter-related features like custom amounts, currency formatting, customer prefill metadata, and expiry timeouts, but it does not add meaning beyond what the schema already documents for each individual parameter.

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?

The description opens with a specific action and resource: "Generates a secure hosted payment checkout URL across Stripe, Razorpay, or LemonSqueezy." It clearly distinguishes this tool from siblings like create_refund and create_itemized_invoice by focusing exclusively on payment link generation.

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

Usage Guidelines3/5

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

The use case is implied through the description of generating checkout URLs and supporting multi-gateway routing, but there is no explicit guidance about when to choose this tool over alternatives such as create_itemized_invoice or create_refund. No exclusions or alternative recommendations are provided.

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

Install Server

Other Tools

Latest Blog Posts

MCP directory API

We provide all the information about MCP servers via our MCP API.

curl -X GET 'https://glama.ai/api/mcp/v1/servers/pritam825/unified-pay-cli'

If you have feedback or need assistance with the MCP directory API, please join our Discord server