Framework agnostic referral program package with Stripe Connect integration
Project description
Framework Agnostic Referral Program Package with Stripe Connect Integration
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
Release history Release notifications | RSS feed
Download files
Download the file for your platform. If you're not sure which to choose, learn more about installing packages.
Source Distribution
Built Distribution
Filter files by name, interpreter, ABI, and platform.
If you're not sure about the file name format, learn more about wheel file names.
Copy a direct link to the current filters
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
| Algorithm | Hash digest | |
|---|---|---|
| SHA256 |
985a58f4b9d228df69d6e7b5c9e20cdf0bd78e68cebc9dcf264d8193d71f2a69
|
|
| MD5 |
d5b66261be06d301ab2db35b7298965b
|
|
| BLAKE2b-256 |
15b3d01882498d3950dae67592ec1b130d0883f6595d0e57ec3be70187283af4
|
Provenance
The following attestation bundles were made for stripe_referral-0.1.1.tar.gz:
Publisher:
publish.yml on CarterPerez-dev/stripe-referral
-
Statement:
-
Statement type:
https://in-toto.io/Statement/v1 -
Predicate type:
https://docs.pypi.org/attestations/publish/v1 -
Subject name:
stripe_referral-0.1.1.tar.gz -
Subject digest:
985a58f4b9d228df69d6e7b5c9e20cdf0bd78e68cebc9dcf264d8193d71f2a69 - Sigstore transparency entry: 708556071
- Sigstore integration time:
-
Permalink:
CarterPerez-dev/stripe-referral@ac6f0d0b03a3efeb277d5444040be7ee3e67e2ef -
Branch / Tag:
refs/heads/main - Owner: https://github.com/CarterPerez-dev
-
Access:
public
-
Token Issuer:
https://token.actions.githubusercontent.com -
Runner Environment:
github-hosted -
Publication workflow:
publish.yml@ac6f0d0b03a3efeb277d5444040be7ee3e67e2ef -
Trigger Event:
push
-
Statement type:
File details
Details for the file stripe_referral-0.1.1-py3-none-any.whl.
File metadata
- Download URL: stripe_referral-0.1.1-py3-none-any.whl
- Upload date:
- Size: 37.1 kB
- Tags: Python 3
- Uploaded using Trusted Publishing? Yes
- Uploaded via: twine/6.1.0 CPython/3.13.7
File hashes
| Algorithm | Hash digest | |
|---|---|---|
| SHA256 |
7be060e32a334463ac4e4d0e40710a334031bba88081c2117923cf2a34f13562
|
|
| MD5 |
444968046e3683f810447eb7a944e04a
|
|
| BLAKE2b-256 |
2b37688a40ba3bb1e04cd78acc58bcbba5ac9da94b290adf5acd9e68748ff8f4
|
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
-
Statement:
-
Statement type:
https://in-toto.io/Statement/v1 -
Predicate type:
https://docs.pypi.org/attestations/publish/v1 -
Subject name:
stripe_referral-0.1.1-py3-none-any.whl -
Subject digest:
7be060e32a334463ac4e4d0e40710a334031bba88081c2117923cf2a34f13562 - Sigstore transparency entry: 708556074
- Sigstore integration time:
-
Permalink:
CarterPerez-dev/stripe-referral@ac6f0d0b03a3efeb277d5444040be7ee3e67e2ef -
Branch / Tag:
refs/heads/main - Owner: https://github.com/CarterPerez-dev
-
Access:
public
-
Token Issuer:
https://token.actions.githubusercontent.com -
Runner Environment:
github-hosted -
Publication workflow:
publish.yml@ac6f0d0b03a3efeb277d5444040be7ee3e67e2ef -
Trigger Event:
push
-
Statement type: