canonical: https://jentic.com/apis/api.cashfree.com/cashfree

# Cashfree Payment Links API

Jentic publishes the only available OpenAPI specification for Cashfree Payment Links API, keeping it validated and agent-ready. The Cashfree Payment Links API lets Indian merchants generate hosted payment links that customers can pay via UPI, cards, netbanking, and wallets without integrating a full checkout flow. You create a link with an amount, currency, and customer details, share the returned URL by email or SMS, and Cashfree handles the payment page, retries, and settlement. The same API exposes endpoints to fetch a link's status, cancel it, and list the underlying orders that customers complete against it.

## For AI agents

Create, fetch, cancel, and list orders for Cashfree hosted payment links so agents can collect Indian payments by sharing a URL with the customer.

## Scope

Does not handle full custom checkout, payouts, or subscription billing - use for hosted Cashfree payment link creation, status, and cancellation only.

## Capabilities

- Create a hosted payment link with amount, currency, and customer email and phone
- Fetch the current status of a payment link including paid, partially paid, expired, or cancelled
- Cancel an outstanding payment link before the customer pays it
- List all orders associated with a payment link to reconcile partial payments
- Generate links for one-time and recurring collection use cases backed by UPI, cards, netbanking, and wallets

## Use cases

### Invoice Collection by SMS or Email

Generate a Cashfree payment link for each open invoice and send it to the customer over SMS, WhatsApp, or email. The agent calls POST /links with the invoice amount, customer details, and a callback URL, then forwards the returned link_url to a messaging tool. Customers pay via UPI, card, or netbanking on the hosted page and you reconcile by polling GET /links/{link_id} or by webhook.

Example prompt: Call POST /links with link_amount=4999, link_currency='INR', and customer_details for the invoice's payer, then text the link_url to the customer.

### Hosted Checkout Without Frontend Build

Use Cashfree Payment Links as a quick checkout for stores that do not yet have a custom payment page. The agent creates a link per order via POST /links and redirects the buyer to the Cashfree hosted page. This skips PCI scope and lets merchants accept UPI within a day instead of integrating a full SDK.

Example prompt: Call POST /links for each cart, set link_notify={'send_sms': true, 'send_email': true}, and redirect the buyer to link_url.

### Reconciliation of Partial Payments

When a payment link allows partial payments, multiple orders settle against the same link. The agent calls GET /links/{link_id}/orders to enumerate every successful order, sums their amounts, and updates the customer's balance in the accounting system. This avoids missing partial settlements that GET /links/{link_id} alone would not break down.

Example prompt: Call GET /links/{link_id}/orders, sum the order_amount values for orders with order_status='PAID', and post the total to the ledger.

### Agent-Driven Payment Collection via Jentic

Connect Cashfree to an AI agent through Jentic so an operator can say 'send Priya a payment link for 2,500 rupees' in chat. The agent searches Jentic for the right Cashfree operation, loads the schema, and calls POST /links with the API client ID and secret kept in your Jentic One instance. The secret never enters the agent's prompt or response.

Example prompt: Use the Jentic Python SDK to search for 'create cashfree payment link', load the POST /links operation, and execute it with link_amount and customer_details from a chat message.

## Key endpoints

| Method | Path | Description |
| --- | --- | --- |
| POST | /links | Create a hosted payment link |
| GET | /links/{link_id} | Fetch a payment link's status |
| POST | /links/{link_id}/cancel | Cancel a payment link |
| GET | /links/{link_id}/orders | List orders against a payment link |

## Key resources

- **Payment Links** — Create, fetch, and cancel hosted payment links.
- **Link Orders** — List the orders that have been completed against a payment link.

## Why Jentic

- **Setup:** Wiring the Cashfree Payment Links API by hand means handling its paired x-client-id and x-client-secret headers, targeting the pg host, and mapping the link create, status, and cancel routes yourself. Through Jentic you install once, import Cashfree from the API Directory, store the credentials once, and your agent calls it.
- **Permission scoping:** Cashfree puts the link id in the URL path (/links/{link_id}, /links/{link_id}/orders), so a rule can pin your agent to one payment link: it can read that link's status and orders and nothing else. You choose the operations it may call, so cancelling a link is only included if you add it.
- **Credential handling:** Your Cashfree x-client-id and x-client-secret are stored once, encrypted, by your own Jentic One instance and injected at execution time. They never enter the agent's prompt, logs, or context.
- **Discovery method:** Agents search Jentic by intent such as 'create a payment link' or 'cancel a payment link', and Jentic returns the matching Cashfree operation with its input schema so the agent calls the right endpoint without browsing the reference docs.

## Related APIs

- **Stripe** — Global payment platform with Payment Links and full Checkout for international card and wallet payments.
- **PayPal Invoicing** — PayPal-hosted invoice and payment link flow with global PayPal balance and card support.
- **Square** — US/UK payment platform with checkout links, in-person POS, and a unified merchant dashboard.

## FAQ

### Why is there no official OpenAPI spec for Cashfree Payment Links API?

Cashfree publishes HTML reference docs at docs.cashfree.com but does not export a downloadable OpenAPI specification for the Payment Links API. Jentic generates and maintains this spec so that AI agents and developers can call Cashfree Payment Links API via structured tooling. It is validated against the live API and kept up to date. Get started with Jentic One, the self-hosted execution layer.

### What authentication does the Cashfree Payment Links API use?

The API uses two API key headers, x-client-id and x-client-secret, issued from the Cashfree dashboard. Both are required on every request. Through Jentic, both values are stored encrypted in the vault, and only scoped tokens reach the agent's context.

### Can I cancel a Cashfree payment link before it is paid?

Yes. Call POST /links/{link_id}/cancel with the link ID. The link's status becomes CANCELLED and any subsequent customer attempt to pay is rejected. Already-completed payments under the link are unaffected and can still be retrieved via GET /links/{link_id}/orders.

### What are the rate limits for the Cashfree Payment Links API?

Cashfree applies per-account rate limits that vary by plan; production accounts typically get a few hundred requests per second. Check the X-RateLimit headers on each response when running through Jentic and back off when limits are hit.

### How do I create a payment link through Jentic?

Search Jentic for 'create payment link' and the POST /links Cashfree operation is returned with its input schema for link_amount, link_currency, and customer_details. Load the operation, then execute it with the invoice values. The standard quickstart is pip install jentic, search, load, execute.

### Is the Cashfree Payment Links API free?

Cashfree does not charge for API access; you pay per successful transaction at rates set in your Cashfree contract (typically 1.95%-2.5% for cards and a flat fee for UPI). There is no flat monthly fee for the Payment Links endpoints themselves.

### Can I limit what my agent is allowed to do with the Cashfree Payment Links API?

Yes. Jentic One runs self-hosted on your own infrastructure, so your rules decide which Cashfree operations and credentials the agent may use. Because the link id sits in the URL path (/links/{link_id}, /links/{link_id}/orders), you can pin the agent to a single payment link and let it read only that link's status and its orders. You also choose which operations are callable, so cancelling a link via POST /links/{link_id}/cancel is available to the agent only if you explicitly include it.
