Skip to main content
Pre-release

This release is a pre-release and may not be stable for production use.

eldercrank-stripe-core

A no-nonsense Stripe integration library that provides a clean, Pythonic interface to the Stripe API.

Features

  • StripeHandler: High-level interface for common Stripe operations including webhook handling
  • StripeManager: Comprehensive CRUD operations for products, prices, customers, and subscriptions
  • Pydantic Models: Type-safe models for Stripe events, products, and prices
  • Clean API: Hides the complexity of working with raw Stripe JSON responses

Installation

pip install eldercrank-stripe-core

Quick Start

Using StripeHandler

from eldercrank.stripe.core import StripeHandler

handler = StripeHandler(
    api_key="sk_test_...",
    webhook_secret="whsec_..."
)

# Register a webhook handler
def handle_payment_success(event_data):
    print(f"Payment successful for customer: {event_data}")

handler.add_event_handler("payment_intent.succeeded", handle_payment_success)

# Process a webhook
event = handler.process_webhook(payload, signature)

# Create a subscription product
result = handler.create_subscription_product(
    name="Premium Plan",
    amount=1999,  # $19.99
    currency="usd",
    interval="month"
)

Using StripeManager

from eldercrank.stripe.core import StripeManager

manager = StripeManager(api_key="sk_test_...")

# Create a customer
customer = manager.create_customer(
    name="John Doe",
    email="john@example.com"
)

# Create a product
product = manager.create_product(
    name="Basic Plan",
    description="Basic subscription plan"
)

# Create a price
price = manager.create_price(
    product_id=product["id"],
    unit_amount=999,
    currency="usd",
    recurring={"interval": "month"}
)

# Create a subscription
subscription = manager.create_subscription(
    customer_id=customer["id"],
    price_id=price["id"]
)

Framework Integrations

License

MIT

Metadata

Release files for eldercrank-stripe-core 0.1.0b4

For a detailed explanation of source distributions (sdists) and built distributions (wheels), please see the package formats documentation.

Source distribution (sdist)

Source distribution for eldercrank-stripe-core 0.1.0b4
File Size Uploaded Provenance
eldercrank_stripe_core-0.1.0b4.tar.gz 10.0 kB Without provenance Details

Built distribution (wheel)

Table of built distributions (wheels) for eldercrank-stripe-core 0.1.0b4
File Interpreter ABI Platform
eldercrank_stripe_core-0.1.0b4-py3-none-any.whl Python 3 none any Details

Total release size: 20.8 kB

Release files / eldercrank_stripe_core-0.1.0b4.tar.gz

Download URL eldercrank_stripe_core-0.1.0b4.tar.gz
Size 10.0 kB
Tags Source
SHA-256 checksum
How to use checksums
a04ca71c0c1abf93a7b815405396fd88240f12daff9209d32cf851d25b98d8bb
BLAKE2b-256 checksum
How to use checksums
bff0e08020797cf7ed79cfbb83acd3eaff6c72f1f800f19423ab9e044d3768cf
Upload date
Uploaded using Trusted Publishing?
What is trusted publishing?
No
Uploaded via uv/0.7.15

Release files / eldercrank_stripe_core-0.1.0b4-py3-none-any.whl

Download URL eldercrank_stripe_core-0.1.0b4-py3-none-any.whl
Size 10.8 kB
Tags Python 3
SHA-256 checksum
How to use checksums
d8b57f916265e39877e544ba1839080a59ccda25afb63400729aa88828e4d931
BLAKE2b-256 checksum
How to use checksums
06750d0feb9f111a4b1bcd7ef25fa998e1c2b1a68d36e96a22de594b114ef30f
Upload date
Uploaded using Trusted Publishing?
What is trusted publishing?
No
Uploaded via uv/0.7.15

Security for eldercrank-stripe-core 0.1.0b4

Provenance

Provenance describes where a file came from. On PyPI, provenance is shared via attestations, which provide a verifiable record of the build or publishing details. View details, limitations and caveats.

No provenance found

None of the files in this release were uploaded with provenance metadata.

A note on package security

PyPI is a repository for distributing packages, not a service for auditing them. While third-party security researchers and our staff do their best to detect and remove malicious packages, PyPI cannot guarantee the quality, security or suitability of any given package.

To learn more about protecting yourself from malicious actors, visit our package security documentation.

Anthropic, PBC Visionary sponsor Bloomberg Visionary sponsor Hudson River Trading Visionary sponsor Meta Visionary sponsor NVIDIA Visionary sponsor Microsoft Sustainability sponsor Depot Continuous Integration AWS Cloud computing and Security Sponsor Datadog Monitoring Fastly CDN Google Download Analytics Sentry Error logging StatusPage Status page