Cashfree Payment Gateway - S2S REST API Integration

Integrates Cashfree Payments via direct server-to-server REST API calls without SDKs.

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

SYSTEM DOCUMENTATION & REQUIREMENTS

💡 This Skill includes references (resource) components.

What problem does it solve? Integrating Cashfree Payments without an official SDK requires piecing together scattered API documentation, and mistakes in order creation, payment method payloads, or webhook signature verification lead to failed transactions or security holes. This Skill provides the complete server-to-server REST integration flow with correct endpoints, headers, and verification logic. ## Core Features & Use Cases - Full Payment Lifecycle: Covers order creation, Order Pay API, payment status verification, refunds, and pre-authorization capture/void across Card, UPI, Netbanking, Wallet, EMI, and Paylater methods. - Webhook Security: Provides HMAC-SHA256 signature verification code in Node.js, Python, and Go using the raw request body. - Advanced Workflows: Documents Native OTP headless card payments, UPI Collect polling, and idempotency-key retry patterns for safe production retries. - Use Case: A backend developer building a Rust or Ruby service needs to accept UPI and card payments via Cashfree; this Skill supplies the exact HTTP requests, response handling rules for each action type, and sandbox test credentials. ## Quick Start Ask the AI to integrate Cashfree Payments into your backend using direct REST API calls, starting with creating an order and verifying payment status.

Frequently Asked Questions about Cashfree Payment Gateway - S2S REST API Integration

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

FAQPage Schema
How do I integrate Cashfree Payments without an SDK?▼

Create an order via POST /orders with your x-client-id and x-client-secret headers to get a payment_session_id, then submit payment details through POST /orders/sessions. Always verify the final status with GET /orders/{order_id} before fulfilling.

How to verify Cashfree webhook signatures?▼

Concatenate the x-webhook-timestamp header with the raw request body, compute HMAC-SHA256 using your client secret, Base64-encode it, and compare with the x-webhook-signature header. Never use the parsed JSON body, as it causes signature mismatches.

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

Use direct REST calls when working in a language without an official Cashfree SDK, such as Ruby, Rust, or Elixir, or when you prefer raw HTTP control. If you use Node.js, Python, Java, Go, PHP, or .NET, the official Backend SDK skill is a better fit.

Does the Cashfree Order Pay API need client credentials?▼

No, POST /orders/sessions authenticates via the payment_session_id and only requires the x-api-version and Content-Type headers. Sending x-client-id and x-client-secret to this endpoint is unnecessary and ignored.

Why did my Cashfree retry create a duplicate order?▼

Retries after network timeouts create duplicates unless you send an x-idempotency-key header derived deterministically from the business operation, such as order:<order_id>:v1. Cashfree replays the original response for the same key and body within 24 hours.

What payment methods does the Cashfree S2S API support?▼

The Order Pay API supports Card (plain, saved token, international), UPI (collect, intent link, QR code), Netbanking, Wallets like PhonePe and Paytm, Card and Cardless EMI, Paylater, and Bank Transfer. Each method has a specific payment_method object structure.