ankitjh4/indic-ai-skills/cashfree
Claude Code and agent skill by ankitjh4/indic-ai-skills
- community
Checking that the SKILL.md file is still in the repository.
Use this skill whenever the user wants to integrate Cashfree payment APIs. Triggers include: creating orders or payment sessions, accepting payments via UPI/cards/netbanking/wallets, generating payment links to share via SMS/email, handling refunds, verifying webhook signatures, fetching payment or settlement status, building a checkout flow, writing Python code for Cashfree, switching between test and production environments, or understanding Cashfree error codes. Also trigger when user mentions Cashfree PG, Cashfree Payouts, payment gateway India, or x-client-id credentials.
Install
npx vskill@latest install ankitjh4/indic-ai-skills/cashfreeSKILL.md
Source — verified from live official docs
- API Reference: https://www.cashfree.com/docs/api-reference/payments/latest/overview
- Latest version: v2025-01-01 (v5) — always use this for new integrations
- Official Python SDK:
pip install cashfree-pg - Dev Studio (interactive test): https://www.cashfree.com/devstudio/preview/pg/web/checkout
Bundled Files
| File | Purpose | |
|---|---|---|
scripts/cashfree_client.py | Reusable Python client using official SDK | |
scripts/test_cashfree.py | Smoke-test in sandbox — safe to run | |
scripts/requirements.txt | Python dependencies | |
references/endpoints.md | Full endpoint + error code reference |
Environments & Base URLs
| Environment | Base URL | Use for | |
|---|---|---|---|
| Sandbox (Test) | https://sandbox.cashfree.com/pg | Development, testing | |
| Production | https://api.cashfree.com/pg | Live payments |
Always develop in sandbox. Test cards/UPI provided at: https://www.cashfree.com/docs/api-reference/payments/data-to-test-integration
Step 0 — Get Credentials
- Sign up at https://merchant.cashfree.com/merchants/signup
- Dashboard → Developers → API Keys
- Switch to Test Mode → generate test keys
- You get two values:
x-client-id(App ID)x-client-secret(Secret Key)
Authentication
Every request needs two headers — no Bearer token, no expiry:
Unlike Shiprocket/Razorpay there is no token to refresh — credentials go directly in every request.
Core Flow
1. Create Order
2. Frontend Checkout (JS SDK)
Pass payment_session_id from Step 1 to the browser:
After payment, user is redirected to return_url with order_id as query param.
3. Fetch Order Status (Verify Payment)
Order statuses
| Status | Meaning | |
|---|---|---|
ACTIVE | Created, awaiting payment | |
PAID | Payment successful | |
EXPIRED | Order expired (default: 1 hour) | |
TERMINATED | Manually cancelled |
4. Webhook — Verify & Handle
Set your notify_url when creating the order. Cashfree POSTs to it on every payment event.
Key webhook event types
| Event | When | |
|---|---|---|
PAYMENT_SUCCESS_WEBHOOK | Payment captured successfully | |
PAYMENT_FAILED_WEBHOOK | Payment attempt failed | |
PAYMENT_USER_DROPPED_WEBHOOK | User closed checkout without paying | |
REFUND_STATUS_WEBHOOK | Refund processed | |
DISPUTE_OPENED_WEBHOOK | Customer raised a dispute |
5. Refunds
Refund statuses
| Status | Meaning | |
|---|---|---|
PENDING | Initiated, being processed | |
SUCCESS | Refund completed (2-7 business days) | |
CANCELLED | Refund was cancelled | |
ONHOLD | Under review |
6. Payment Links (no checkout integration needed)
Test Credentials (Sandbox only)
| Method | Details | |
|---|---|---|
| Card (success) | 4111 1111 1111 1111, any future expiry, CVV 123 | |
| Card (failure) | 4111 1111 1111 1112 | |
| UPI (success) | success@cashfree | |
| UPI (failure) | failure@cashfree | |
| Net banking | Any bank, use test credentials shown |
Full test data: https://www.cashfree.com/docs/api-reference/payments/data-to-test-integration
Important Rules
| Rule | Detail | |
|---|---|---|
order_amount | In rupees with 2 decimal places — NOT paise (opposite of Razorpay) | |
order_id | Max 50 chars, alphanumeric + _ and - only | |
customer_phone | 10 digits, no country code, no +91 | |
x-api-version | Always send 2025-01-01 for latest APIs | |
| Order expiry | Default 1 hour — set order_expiry_time to override | |
| Refund window | Must refund within 180 days of payment | |
| Webhook retry | Cashfree retries failed webhooks — make your handler idempotent |
Security
- Security scanPassed, 90 of 100Pattern checks on the skill's files.
- Model reviewPassed
Quality evaluation
- Task evaluationNot runNo evaluation yet. Run one in Skill Studio.
Source
- SKILL.md in the repositoryCheckingskills/cashfree/SKILL.md
Popularity
- Repository stars
- 65
- Repository forks
- 10
- 7-day trend score
- 21
Stars and forks are for the whole GitHub repository, not this skill alone. Not refreshed yet.
Works with
Any agent vskill installs to: 56 targets in all. These 39 have a page on this site.
- Claude Code
- Cursor
- GitHub Copilot
- Windsurf
- Codex
- Gemini CLI
- Cline
- Amp
- Roo Code
- Goose
- Continue
- Kilo Code
- Junie
- Trae
- OpenHands
- Qwen Code
- AI Agent
- Tabnine Chat
- Sourcegraph Cody
- Amazon Q
- Firebase Genkit
- Sweep
- Devin
- Phind
- Mentat
- Claude Desktop
- Aider
- GPT Pilot
- Plandex
- bolt.new
- v0
- Replit Agent
- Anse
- TypingMind
- BetterChatGPT
- LibreChat
- Warp AI
- Pieces
- Fig AI
Embed badge
[](https://verified-skill.com/skills/ankitjh4/indic-ai-skills/cashfree)