Razorpay Python Client
Project description
# Razorpay Python Client
[](https://pypi.python.org/pypi/razorpay) [](https://travis-ci.org/razorpay/razorpay-python) [](https://opensource.org/licenses/MIT)
Python bindings for interacting with the Razorpay API.
This is primarily meant for merchants who wish to perform interactions with the Razorpay API programatically.
## Installation
`sh $ pip install razorpay `
## 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>.
`py import razorpay razor = razorpay.Client(auth=("<YOUR_API_KEY>", "<YOUR_API_SECRET>")) `
### Payments
Capture a payment
`py razor.payment.capture("<PAYMENT_ID>", "<AMOUNT>") `
Fetch a particular payment
`py razor.payment.fetch("<PAYMENT_ID>") `
Fetch all payments
`py razor.payment.all() `
### Refunds
Initiate a refund
`py razor.refund.create("<PAYMENT_ID>") # for whole amount razor.refund.create("<PAYMENT_ID>", data={"amount": "<AMOUNT_TO_BE_REFUNDED>"}) # for particular amount `
Fetch a particular refund
`py razor.refund.fetch("<PAYMENT_ID>", "<REFUND_ID>") `
Fetch all refunds for a particular payment
`py razor.refund.all("<PAYMENT_ID>") `
## Bugs? Feature requests? Pull requests?
All of those are welcome. You can [file issues][issues] or [submit pull requests][pulls] in this repository.
[issues]: https://github.com/decached/razorpay/issues [pulls]: https://github.com/decached/razorpay/pulls
Project details
Release history Release notifications | RSS feed
Download files
Download the file for your platform. If you're not sure which to choose, learn more about installing packages.
Source Distribution
File details
Details for the file razorpay-0.1.1.tar.gz.
File metadata
- Download URL: razorpay-0.1.1.tar.gz
- Upload date:
- Size: 5.2 kB
- Tags: Source
- Uploaded using Trusted Publishing? No
File hashes
| Algorithm | Hash digest | |
|---|---|---|
| SHA256 |
1ad509b4b35cedddcf7c215e94a53bac69404084aafa4150eb029caaea6eaf72
|
|
| MD5 |
b68c3d8ccb62861e2eb35c9c6ca8286c
|
|
| BLAKE2b-256 |
a2b3f580881f3a910c5694dc21d4660d8233922fedbf4221a4f3cb06f666acfd
|