Razorpay billing provider for the Swarmauri SDK.
Project description
Swarmauri Billing Razorpay
The Swarmauri Billing Razorpay package integrates the Razorpay Python SDK into the Swarmauri billing ecosystem. It offers high-fidelity wrappers for Razorpay items, payment links, orders, subscriptions, invoices, and webhook verification routines.
Features
- ✅ Creates products and prices using Razorpay items and catalog metadata.
- ✅ Generates payment links for hosted checkout flows.
- ✅ Manages orders for online payments, capture, and cancellation workflows.
- ✅ Handles Razorpay subscriptions and invoice issuance APIs.
- ✅ Supports Route marketplace transfers and secure webhook signature validation.
Installation
pip install swarmauri_billing_razorpay
uv add swarmauri_billing_razorpay
Usage
from swarmauri_billing_razorpay import RazorpayBillingProvider
from swarmauri_base.billing import CheckoutRequest, PriceSpec, ProductSpec
provider = RazorpayBillingProvider(
key_id="rzp_test_xxxxx",
key_secret="test_secret",
)
product = provider.create_product(
ProductSpec(name="Analytics Plan", description="Advanced dashboards"),
idempotency_key="razorpay-prod-001",
)
price = provider.create_price(
product,
PriceSpec(currency="INR", unit_amount_minor=49900, nickname="Quarterly"),
idempotency_key="razorpay-price-001",
)
checkout = provider.create_checkout(
price,
CheckoutRequest(
quantity=1,
success_url="https://merchant.example/razorpay/callback",
idempotency_key="razorpay-checkout-001",
),
)
print(product.id, price.id, checkout.url)
Capability Mapping
Razorpay operations surfaced by this provider emit Capability enums that can be translated to tigrbl billing capabilities using capabilities_to_tigrbl.
Contributing
Bug fixes and new Razorpay API coverage are very welcome. Please share reproducible examples when reporting issues so we can iterate quickly.
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
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 swarmauri_billing_razorpay-0.9.2.tar.gz.
File metadata
- Download URL: swarmauri_billing_razorpay-0.9.2.tar.gz
- Upload date:
- Size: 9.1 kB
- Tags: Source
- Uploaded using Trusted Publishing? No
- Uploaded via: uv/0.11.0 {"installer":{"name":"uv","version":"0.11.0","subcommand":["publish"]},"python":null,"implementation":{"name":null,"version":null},"distro":{"name":"Ubuntu","version":"24.04","id":"noble","libc":null},"system":{"name":null,"release":null},"cpu":null,"openssl_version":null,"setuptools_version":null,"rustc_version":null,"ci":true}
File hashes
| Algorithm | Hash digest | |
|---|---|---|
| SHA256 |
21d1f0ab7a58df4c95991f18de74405833aab11a312f16986bdefcbc40a1fbb6
|
|
| MD5 |
913b09c36f7674fd0fdd9417db76e939
|
|
| BLAKE2b-256 |
32f639ac6f3775e691af6d2958e5c1dda881fd63f2c1c1695fa0e98276ed3ce5
|
File details
Details for the file swarmauri_billing_razorpay-0.9.2-py3-none-any.whl.
File metadata
- Download URL: swarmauri_billing_razorpay-0.9.2-py3-none-any.whl
- Upload date:
- Size: 10.1 kB
- Tags: Python 3
- Uploaded using Trusted Publishing? No
- Uploaded via: uv/0.11.0 {"installer":{"name":"uv","version":"0.11.0","subcommand":["publish"]},"python":null,"implementation":{"name":null,"version":null},"distro":{"name":"Ubuntu","version":"24.04","id":"noble","libc":null},"system":{"name":null,"release":null},"cpu":null,"openssl_version":null,"setuptools_version":null,"rustc_version":null,"ci":true}
File hashes
| Algorithm | Hash digest | |
|---|---|---|
| SHA256 |
d65b1b48fd1cec4ece4e5d1ecc1e697c59c240404992dc4e294586d9e9faf856
|
|
| MD5 |
266b1390f2483671d79afbcc37d89cc8
|
|
| BLAKE2b-256 |
8d5cf7c94887937a409b811f783eefee3a5bec0e7a277c50e19b675a22fb2a7e
|