Skip to main content

Razorpay billing provider for the Swarmauri SDK.

Project description

Swarmauri Logo

PyPI - Downloads Hits PyPI - Python Version PyPI - License PyPI - swarmauri_billing_razorpay

---

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


Download files

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

Source Distribution

swarmauri_billing_razorpay-0.9.3.dev2.tar.gz (9.2 kB view details)

Uploaded Source

Built Distribution

If you're not sure about the file name format, learn more about wheel file names.

swarmauri_billing_razorpay-0.9.3.dev2-py3-none-any.whl (10.2 kB view details)

Uploaded Python 3

File details

Details for the file swarmauri_billing_razorpay-0.9.3.dev2.tar.gz.

File metadata

  • Download URL: swarmauri_billing_razorpay-0.9.3.dev2.tar.gz
  • Upload date:
  • Size: 9.2 kB
  • Tags: Source
  • Uploaded using Trusted Publishing? No
  • Uploaded via: uv/0.11.15 {"installer":{"name":"uv","version":"0.11.15","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

Hashes for swarmauri_billing_razorpay-0.9.3.dev2.tar.gz
Algorithm Hash digest
SHA256 cdc75464f7f341e53b62995f01740a68d6091339f09d1ca20c9b70be906dc836
MD5 9d93a32eafbe946d45172e543cea73d9
BLAKE2b-256 88593afacca52591c7431c41b1f0441e1538090624c53f26c6fd63aeff005b93

See more details on using hashes here.

File details

Details for the file swarmauri_billing_razorpay-0.9.3.dev2-py3-none-any.whl.

File metadata

  • Download URL: swarmauri_billing_razorpay-0.9.3.dev2-py3-none-any.whl
  • Upload date:
  • Size: 10.2 kB
  • Tags: Python 3
  • Uploaded using Trusted Publishing? No
  • Uploaded via: uv/0.11.15 {"installer":{"name":"uv","version":"0.11.15","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

Hashes for swarmauri_billing_razorpay-0.9.3.dev2-py3-none-any.whl
Algorithm Hash digest
SHA256 43f32e8291759f5d0e516911ac8555146e287da4bd0e64b76aa16886151f777f
MD5 4518613d91225f39471a7524307cc729
BLAKE2b-256 31a54570c6792d1718a517ae7bcf5a1e57dca064b65029317a320c2f24a952f4

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