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

Uploaded Python 3

File details

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

File metadata

  • Download URL: stripe_referral-0.1.1.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.1.tar.gz
Algorithm Hash digest
SHA256 985a58f4b9d228df69d6e7b5c9e20cdf0bd78e68cebc9dcf264d8193d71f2a69
MD5 d5b66261be06d301ab2db35b7298965b
BLAKE2b-256 15b3d01882498d3950dae67592ec1b130d0883f6595d0e57ec3be70187283af4

See more details on using hashes here.

Provenance

The following attestation bundles were made for stripe_referral-0.1.1.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.1-py3-none-any.whl.

File metadata

File hashes

Hashes for stripe_referral-0.1.1-py3-none-any.whl
Algorithm Hash digest
SHA256 7be060e32a334463ac4e4d0e40710a334031bba88081c2117923cf2a34f13562
MD5 444968046e3683f810447eb7a944e04a
BLAKE2b-256 2b37688a40ba3bb1e04cd78acc58bcbba5ac9da94b290adf5acd9e68748ff8f4

See more details on using hashes here.

Provenance

The following attestation bundles were made for stripe_referral-0.1.1-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