Official Python SDK for ZivonPay Payment Aggregator — UPI payments, orders, refunds, webhooks
Project description
ZivonPay Python SDK
Official Python SDK for ZivonPay Payment Aggregator.
Installation
pip install zivonpay
Usage
from zivonpay import ZivonPay
# Initialize client
client = ZivonPay(
key_id='zp_test_xxxxx',
key_secret='your_secret_key',
environment='sandbox' # or 'production'
)
# Create order
order = client.create_order(
amount=1000, # Amount in paise
receipt='order_123',
customer={
'name': 'Rahul Sharma',
'mobile': '8877664543'
},
notes={
'description': 'Payment for order'
}
)
print('UPI Intent URL:', order['upi_intent_url'])
# Fetch order
order = client.fetch_order(order['id'])
# List orders
orders = client.list_orders(skip=0, limit=10)
Webhook Verification
from flask import Flask, request
from zivonpay import ZivonPay
app = Flask(__name__)
@app.route('/webhooks/zivonpay', methods=['POST'])
def webhook():
payload = request.get_data(as_text=True)
signature = request.headers.get('X-ZivonPay-Signature')
timestamp = int(request.headers.get('X-ZivonPay-Timestamp'))
is_valid = ZivonPay.verify_webhook_signature(
payload=payload,
signature=signature,
timestamp=timestamp,
secret='your_webhook_secret'
)
if is_valid:
event = request.get_json()
print('Webhook event:', event)
return '', 200
else:
return 'Invalid signature', 400
API Reference
See documentation for complete API reference.
License
MIT
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
zivonpay-1.0.0.tar.gz
(5.2 kB
view details)
Built Distribution
Filter files by name, interpreter, ABI, and platform.
If you're not sure about the file name format, learn more about wheel file names.
Copy a direct link to the current filters
File details
Details for the file zivonpay-1.0.0.tar.gz.
File metadata
- Download URL: zivonpay-1.0.0.tar.gz
- Upload date:
- Size: 5.2 kB
- Tags: Source
- Uploaded using Trusted Publishing? No
- Uploaded via: twine/6.2.0 CPython/3.13.7
File hashes
| Algorithm | Hash digest | |
|---|---|---|
| SHA256 |
0df7c7550793e9081d836c6dead5d4380fcbc7b3ccfc99a074e02840966381ab
|
|
| MD5 |
a6bec5596627ea4137252194f7132d1f
|
|
| BLAKE2b-256 |
7b8f6017a3c23dcb05e6e29dafafc9c14d9568a0d9260891cd78b103a3c62b76
|
File details
Details for the file zivonpay-1.0.0-py3-none-any.whl.
File metadata
- Download URL: zivonpay-1.0.0-py3-none-any.whl
- Upload date:
- Size: 5.4 kB
- Tags: Python 3
- Uploaded using Trusted Publishing? No
- Uploaded via: twine/6.2.0 CPython/3.13.7
File hashes
| Algorithm | Hash digest | |
|---|---|---|
| SHA256 |
c1a8685c92eb238ce7f05edade75eb2578eba4e47d4bac5f7843eda0e15f534b
|
|
| MD5 |
45e03088cb8ea2b856a09560273dede2
|
|
| BLAKE2b-256 |
b5ed6ad49c3a8f5b9489acc7bfd6b846b81f35ea87f7af264fae6d1949006967
|