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
| Name | Required | Description | Default |
|---|---|---|---|
| amount | Yes | The 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. | |
| currency | Yes | Three-letter ISO 4217 currency code for the charge (e.g., "USD", "INR", "EUR", "GBP"). Defaults to "USD" or profile default if omitted. | |
| provider | No | Target 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. | |
| description | Yes | Detailed billing description or line item summary presented directly to the customer on the hosted checkout page. | |
| customerName | No | Customer full legal or billing name used to automatically prefill checkout contact forms. | |
| smartRouting | No | When set to true, automatically evaluates the currency and transaction size to route to the lowest fee gateway provider. | |
| customerEmail | No | Customer email address used for receipt delivery and automatic checkout form prefilling. | |
| customerPhone | No | Customer contact phone number with international country calling code (e.g., "+919876543210" or "+14155552671") for SMS delivery and verification. | |
| expiresInMinutes | No | Time-to-live expiration window in minutes after which the generated checkout URL automatically expires and rejects payments. Defaults to no expiration if omitted. |