Skip to main content

Razorpay Asynchronous Tornado Python Client

Project description

Python ASYNC bindings for interacting with the Razorpay API.

Installation

  1. Through pip: pip install tornado-razorpay

  2. Manually: python setup.py install

Usage

You need to setup your key and secret using the following: You can find your API keys at https://dashboard.razorpay.com/#/app/keys.

from tornado_razorpay import Client
razor = Client("<YOUR_API_KEY>", "<YOUR_API_SECRET>")

Payments

  • Capture a payment

    await razor.payment.capture("<PAYMENT_ID>", "<AMOUNT>")
  • Fetch a particular payment

    await razor.payment.fetch("<PAYMENT_ID>")
  • Fetch all payments

    await razor.payment.all()

Refunds

  • Initiate a refund

    await razor.refund.create("<PAYMENT_ID>")  # for whole amount
    await razor.refund.create("<PAYMENT_ID>", data={"amount": "<AMOUNT_TO_BE_REFUNDED>"})  # for particular amount
  • Fetch a particular refund

    await razor.refund.fetch("<PAYMENT_ID>", "<REFUND_ID>")
  • Fetch all refunds for a particular payment

    await razor.refund.all("<PAYMENT_ID>")

Compliance and Errors

NOTE: You will have to use Tornado’s IOLoop to use this API in Async. If you are looking for Sync API’s or don’t know what this is, please go to https://github.com/razorpay/razorpay-python.

Project details


Download files

Download the file for your platform. If you're not sure which to choose, learn more about installing packages.

Source Distribution

tornado-razorpay-0.1.3.tar.gz (2.8 kB view details)

Uploaded Source

File details

Details for the file tornado-razorpay-0.1.3.tar.gz.

File metadata

File hashes

Hashes for tornado-razorpay-0.1.3.tar.gz
Algorithm Hash digest
SHA256 19011bd5a3ff003ca813ac829084693ff1f8f9a955e2f9108a24f0bf3a5535ba
MD5 0e251318b1e33eb3e245a4885f6d0397
BLAKE2b-256 e2b3837c06988d9e414d4f03fc8fba010d516d8d126dfc3c8ab1c18b965d4ffb

See more details on using hashes here.

Supported by

AWS Cloud computing and Security Sponsor Datadog Monitoring Depot Continuous Integration Fastly CDN Google Download Analytics Pingdom Monitoring Sentry Error logging StatusPage Status page