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.dev3.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.dev3-py3-none-any.whl (10.2 kB view details)

Uploaded Python 3

File details

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

File metadata

  • Download URL: swarmauri_billing_razorpay-0.9.3.dev3.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.dev3.tar.gz
Algorithm Hash digest
SHA256 fd926bf7eb0845f9187b0bffaf7685c09d29d181702f8bb20775c6c622be7867
MD5 a60f7a7eb52e6fa35e9ed9b45bad0f87
BLAKE2b-256 83f20d54475504a7c95ae3a15e878f9b8c481f297adb61b2a1f64c519760eea8

See more details on using hashes here.

File details

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

File metadata

  • Download URL: swarmauri_billing_razorpay-0.9.3.dev3-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.dev3-py3-none-any.whl
Algorithm Hash digest
SHA256 c52601e0ff77ab5f4462ce7cbd696f8cbf367289028543ea9bd3995f54e2739e
MD5 0e02ccfacceb1a8fce1b678ed4732923
BLAKE2b-256 2944bdbc7fc35450a0a47fab8bb613ee7c21cac0704aa94d60f7e6202306c9c6

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