Official Cashfree Payment Gateway Python SDK. Current version: 5.0.6 (Mar 2026). THREE packages on PyPI causing confusion: 'cashfree-sdk' (0.1.3 — beta, NOT recommended for production by Cashfree), 'cashfree_pg' (5.0.6 — correct current PG SDK), 'cashfree' (1.0.1 — unrelated package). Use cashfree_pg. API version string must be passed to every API call. Supports SANDBOX and PRODUCTION environments. Amount in rupees (float) — unlike Razorpay which uses paise.
pip install cashfree_pgVerified import paths — ran on the pinned version, not inferred.
Cashfree PG Python SDK — create and fetch order.
pip install cashfree_pg — this is the official current SDK.
x_api_version = '2023-08-01'; cashfree.PGCreateOrder(x_api_version, request, None, None)
order_amount=500.00 means ₹500. No multiplication needed.
Use Cashfree.SANDBOX for testing, Cashfree.PRODUCTION for live. Keys are different for each environment.
return_url='https://yourapp.com/callback?order_id={order_id}'Whitelist server IP in Cashfree dashboard → Settings → IP Whitelist.