Skip to main content

Framework agnostic referral program package with Stripe Connect integration

Project description

Framework Agnostic Referral Program Package with Stripe Connect Integration

PyPI Version Python Versions License

CertGames.com | ©AngelaMos | 2025


Overview

stripe-referral is a production-ready, framework-agnostic Python package for building referral programs with automated payout processing.

Features

  • Framework Agnostic: Works with Flask, FastAPI, Django, or standalone

  • Multiple Payout Methods: Stripe Connect, Wise API, Manual bank transfers

  • Type Safe: Full TypedDict returns and modern type hints

  • Database Agnostic: SQLAlchemy-based (PostgreSQL, MySQL, SQLite)

  • Production Ready: Alembic migrations, error handling, validation

  • Clean Architecture: Repository pattern, service layer, adapter pattern


Quick Start

Installation

pip install stripe-referral

Basic Usage

from stripe_referral import ReferralService, get_db

# Generate referral code
with get_db() as db:
    result = ReferralService.create_code(
        db=db,
        user_id="user_123",
        program_key="certgames"
    )
    print(f"Your code: {result['code']}")

# Track referral conversion
with get_db() as db:
    tracking = ReferralService.track_referral(
        db=db,
        code="REF_ABC123",
        referred_user_id="user_456"
    )
    print(f"Earned: ${tracking['amount_earned']}")

Documentation

Coming soon…


Contributing

See CONTRIBUTING.rst for development setup and guidelines.


License

MIT License - see LICENSE for details.


Security

See SECURITY.rst for our security policy and how to report vulnerabilities.

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

stripe_referral-0.1.0.tar.gz (26.3 kB view details)

Uploaded Source

Built Distribution

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

stripe_referral-0.1.0-py3-none-any.whl (37.1 kB view details)

Uploaded Python 3

File details

Details for the file stripe_referral-0.1.0.tar.gz.

File metadata

  • Download URL: stripe_referral-0.1.0.tar.gz
  • Upload date:
  • Size: 26.3 kB
  • Tags: Source
  • Uploaded using Trusted Publishing? Yes
  • Uploaded via: twine/6.1.0 CPython/3.13.7

File hashes

Hashes for stripe_referral-0.1.0.tar.gz
Algorithm Hash digest
SHA256 05640afe57c1e4c0b71b28523bb380e5bcb051de4454bd2e676ec5959c98e566
MD5 50c176fda6a0fa5a5f4b21089165bc4f
BLAKE2b-256 6a1a3629e97eee6c933d4e83d74f9defdf80584c75d06f75f25a506953a3eb35

See more details on using hashes here.

Provenance

The following attestation bundles were made for stripe_referral-0.1.0.tar.gz:

Publisher: publish.yml on CarterPerez-dev/stripe-referral

Attestations: Values shown here reflect the state when the release was signed and may no longer be current.

File details

Details for the file stripe_referral-0.1.0-py3-none-any.whl.

File metadata

File hashes

Hashes for stripe_referral-0.1.0-py3-none-any.whl
Algorithm Hash digest
SHA256 f8d6cad4badded69988a6c6a4b12b0974a4d961773e25055940dd75a7b07fe3d
MD5 a3932f25eee1ef94787527dfeda7c8d0
BLAKE2b-256 2501514be2a9129a7d8c9ff1f030ad45de83a7ec367736046c5119a5128e02d8

See more details on using hashes here.

Provenance

The following attestation bundles were made for stripe_referral-0.1.0-py3-none-any.whl:

Publisher: publish.yml on CarterPerez-dev/stripe-referral

Attestations: Values shown here reflect the state when the release was signed and may no longer be current.

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