skillfed

razorpay

Razorpay Python Client

razorpay v2.0.1 1.1M downloads/30d#4,370 on PyPI172
Permissive license MIT Active released

What it is and what it does

Razorpay is a Python wrapper around the Razorpay payment gateway API, designed for merchants in India who need to programmatically manage payments, orders, refunds, subscriptions, and related financial workflows. It abstracts HTTP communication via the requests library and provides a client-based interface to a large API surface covering accounts, customers, tokens, invoices, payment links, QR codes, and dispute handling.

The library is straightforward to set up: instantiate a client with your API credentials, optionally enable retries and set app metadata, then call methods on the client to interact with Razorpay resources. It is actively maintained, carries no known vulnerabilities, and has been in use since 2015, though it remains classified as Beta.

Use it for:

  • Build a Django or Flask web application that accepts payments and needs to create orders and process refunds via Razorpay.
  • Automate subscription billing workflows by programmatically managing recurring charges and customer tokens.
  • Generate and manage payment links or QR codes for customers without building custom payment UI.
  • Reconcile transactions by fetching payment and settlement data from Razorpay into your internal ledger.
  • Handle payment verification and dispute resolution as part of a merchant's post-transaction workflow.

Worth the install?

AI-flagged interpretation of the facts on this page — verify before relying

Python client library for the Razorpay payment gateway API, enabling merchants to programmatically interact with payment processing, orders, refunds, subscriptions, and related financial operations.

Yes. Razorpay is the official Python client for a major payment gateway serving India, actively maintained with no known vulnerabilities, low install friction, and permissive licensing. Install it if you are building a merchant application that needs to integrate Razorpay payments; avoid it if you use a different payment processor.

Install

razorpay on PyPI

pip

pip install razorpay

uv

uv add razorpay

poetry

poetry add razorpay

Installing razorpay

Before you install

Low install friction with a single lightweight dependency (requests). Actively maintained with recent commits and a stable release cadence; marked as Beta in development status but has been in production use since 2015.

License in practice

MIT license permits commercial and private use with minimal restrictions; you may use, modify, and distribute this package freely provided you include the license notice.

Quickstart

import razorpay

client = razorpay.Client(auth=("YOUR_API_KEY", "YOUR_API_SECRET"))
client.enable_retry(True)
client.set_app_details({"title": "MyApp", "version": "1.0"})

You must obtain API credentials (key and secret) from the Razorpay dashboard before instantiating a client.

Verify before relying

  • Whether all listed resource types (Account, Addon, Item, Customer, etc.) are fully implemented and tested in version 2.0.1
  • Specific Python version compatibility beyond the classifiers listed (3.4–3.6 are declared but current support is unspecified)

Package facts

License MIT (permissive)
Python support not specified
Install friction low — pure-Python wheel
Runtime dependencies 1 — requests
Maintenance actively maintained — 158 days since the last release
Last repo commit
First released
Downloads 1,100,087/month — #4,370 on PyPI (30-day window, as of 2026-08-14)
Known vulnerabilities none known (OSV.dev, checked 2026-08-14)

Evidence: razorpay-2.0.1-py3-none-any.whl

Keywords: razorpay, payment, gateway, india

Development Status :: 4 - BetaIntended Audience :: DevelopersLicense :: OSI Approved :: MIT LicenseProgramming Language :: PythonProgramming Language :: Python :: 3Programming Language :: Python :: 3.4Programming Language :: Python :: 3.5Programming Language :: Python :: 3.6Topic :: Software Development :: Libraries :: Python Modules

Tags

razorpay api clientpayment gateway pythonrazorpay merchant integrationpayment processing sdkrazorpay orders and refundsindia payment gatewaysubscription billing api
payment-processingmerchant-apiindia-fintech

More Python Modules packages