Cashfree Payment Gateway - Backend SDK Integration

Integrates Cashfree Payments into backend applications using official Node.js, Python, Java, Go, PHP, and .NET SDKs.

Updated Sep 8, 2026
One-click install
npx skills add https://github.com/dasara-varun/orange --skill cashfree-payment-gateway-backend-sdk-integration-dasara-varun
Or copy as Structured Prompt for Agent▼
Please help me install this Agent Skill.
Skill: Cashfree Payment Gateway - Backend SDK Integration
Source: https://github.com/dasara-varun/orange/tree/main/.cursor/cashfree-skills/pg/backend-sdks
Command: npx skills add https://github.com/dasara-varun/orange --skill cashfree-payment-gateway-backend-sdk-integration-dasara-varun

SYSTEM DOCUMENTATION & REQUIREMENTS

💡 This Skill includes references (resource) components.

What problem does it solve? Integrating a payment gateway backend involves many error-prone details: correct SDK initialization, API version pinning, order creation, payment verification, webhook signature validation, refunds, and idempotent retries. This Skill provides verified, version-accurate guidance for the official Cashfree SDKs so developers avoid common integration bugs like broken webhook signatures or duplicate orders. ## Core Features & Use Cases - Multi-language SDK setup: Installation and initialization for Node.js (cashfree-pg), Python, Java, Go, PHP, and .NET, including sandbox vs production environments and API version pinning. - Core payment flow: Create orders with PGCreateOrder, verify payment status with PGFetchOrder, and process webhooks with PGVerifyWebhookSignature using raw request bodies. - Advanced operations via reference docs: Refunds, payment links, settlements, pre-authorization capture/void, token vault saved instruments, S2S payments, and idempotency-key retry patterns. - Use Case: A developer building an Express.js checkout backend uses this Skill to install cashfree-pg, create an order, verify the payment server-side, and securely handle the PAYMENT_SUCCESS_WEBHOOK with signature verification. ## Quick Start Ask the assistant to integrate Cashfree Payments into your Node.js or Python backend using the official SDK, starting with order creation and webhook verification.

Frequently Asked Questions about Cashfree Payment Gateway - Backend SDK Integration

High-intent search queries and answers about installing and using this skill.

FAQPage Schema
How do I integrate Cashfree Payments in Node.js?▼

Install the cashfree-pg npm package, initialize a Cashfree client with CFEnvironment.SANDBOX and your app credentials, then call PGCreateOrder to get a payment_session_id for checkout. Verify completed payments server-side with PGFetchOrder before fulfilling orders.

How to verify Cashfree webhook signatures in Python?▼

Call PGVerifyWebhookSignature with the x-webhook-signature header, the raw request body string, and the x-webhook-timestamp header. Always use the raw body rather than parsed JSON, since re-serialization can change values like 170.00 to 170 and break the signature.

Which languages does the Cashfree PG SDK support?▼

Official SDKs exist for Node.js (cashfree-pg on npm), Python (cashfree-pg on PyPI), Java (cashfree_pg on Maven Central), Go (cashfree-pg/v6), PHP (cashfree/cashfree-pg on Packagist), and .NET (cashfree_pg on NuGet).

Why does my Cashfree SDK call fail with a version error?▼

Current SDK majors (v5/v6+) do not accept the API version as a leading method argument; the version is carried by the client instance. The bundled default is 2026-01-01, so set XApiVersion to 2025-01-01 explicitly if you need the published v5 contract.

When should I use the Cashfree SDK instead of the REST API?▼

Use the SDK when your backend is Node.js, Python, Java, Go, PHP, or .NET and you want typed methods like PGCreateOrder and PGFetchOrder. Use the S2S REST API skill for raw HTTP integrations, and the Mobile or Web Checkout skills for client-side integration.

Why does the Cashfree .NET SDK fail with an SSL/TLS error?▼

Older .NET Framework versions default to TLS 1.0 or 1.1, but Cashfree requires TLS 1.2 or higher. Set ServicePointManager.SecurityProtocol to Tls12 or Tls13 at application startup before making any HTTP calls.