Metadata-Version: 2.4
Name: stapel-billing
Version: 0.7.0
Summary: Billing and payments Django app for the Stapel framework
License: MIT
Project-URL: Homepage, https://github.com/usestapel/stapel-billing
Project-URL: Repository, https://github.com/usestapel/stapel-billing
Project-URL: Documentation, https://github.com/usestapel/stapel-billing#readme
Project-URL: Changelog, https://github.com/usestapel/stapel-billing/blob/main/CHANGELOG.md
Project-URL: Issues, https://github.com/usestapel/stapel-billing/issues
Keywords: django,stapel,billing,payments,stripe
Classifier: Development Status :: 4 - Beta
Classifier: Framework :: Django
Classifier: Framework :: Django :: 5.2
Classifier: Intended Audience :: Developers
Classifier: License :: OSI Approved :: MIT License
Classifier: Operating System :: OS Independent
Classifier: Programming Language :: Python :: 3 :: Only
Classifier: Programming Language :: Python :: 3.11
Classifier: Programming Language :: Python :: 3.12
Classifier: Programming Language :: Python :: 3.13
Classifier: Programming Language :: Python :: 3.14
Classifier: Typing :: Typed
Requires-Python: >=3.11
Description-Content-Type: text/markdown
License-File: LICENSE
Requires-Dist: stapel-core<1.0,>=0.24.0
Provides-Extra: stripe
Requires-Dist: stripe<12,>=8.0; extra == "stripe"
Provides-Extra: all
Requires-Dist: stapel-billing[stripe]; extra == "all"
Dynamic: license-file

<!-- Generated by stapel-readme from docs/readme.md + docs/*.json. Do not edit this file; edit docs/readme.md and re-run `make readme`. -->

# stapel-billing

[![CI](https://img.shields.io/github/actions/workflow/status/usestapel/stapel-billing/ci.yml?branch=main&logo=github&label=CI)](https://github.com/usestapel/stapel-billing/actions/workflows/ci.yml?query=branch%3Amain)
[![coverage](https://img.shields.io/codecov/c/github/usestapel/stapel-billing?branch=main&logo=codecov&label=coverage)](https://app.codecov.io/gh/usestapel/stapel-billing)
[![pypi](https://img.shields.io/pypi/v/stapel-billing?logo=pypi&logoColor=white&label=pypi)](https://pypi.org/project/stapel-billing/)
[![downloads](https://static.pepy.tech/badge/stapel-billing/month)](https://pepy.tech/project/stapel-billing)
[![python](https://img.shields.io/pypi/pyversions/stapel-billing?logo=python&logoColor=white)](https://pypi.org/project/stapel-billing/)
[![license](https://img.shields.io/github/license/usestapel/stapel-billing)](https://github.com/usestapel/stapel-billing/blob/main/LICENSE)
[![llms.txt](https://img.shields.io/badge/llms.txt-blue)](https://github.com/usestapel/stapel-billing/blob/main/docs/llms.txt)

> Payments and billing: per-user credit wallets with an immutable transaction ledger, one-off credit packages and recurring subscription plans, Stripe-backed checkout and self-service customer portal, idempotent webhooks and a service-to-service debit endpoint.

Part of the [Stapel framework](https://github.com/usestapel) — composable Django apps that deploy as a monolith or as microservices without changing module code.

## Install

```bash
pip install stapel-billing
```

## At a glance

| Fact | Value |
|---|---|
| Version | `0.7.0` |
| Python | `>=3.11` (3.11, 3.12, 3.13, 3.14) |
| HTTP operations | 10 |
| Config axes | 1 |
| Usage surface | 15 |
| Extension points | 5 |
| Error codes | 54 |
| Fleet dependencies | [`stapel-auth`](https://github.com/usestapel/stapel-auth) (optional) · [`stapel-core`](https://github.com/usestapel/stapel-core) |

## Documentation

**Errors:** [English](https://github.com/usestapel/stapel-billing/blob/main/docs/errors.en.md) · [Español](https://github.com/usestapel/stapel-billing/blob/main/docs/errors.es.md) · [Русский](https://github.com/usestapel/stapel-billing/blob/main/docs/errors.ru.md) · [OpenAPI](https://github.com/usestapel/stapel-billing/blob/main/docs/schema.json) · [capabilities.json](https://github.com/usestapel/stapel-billing/blob/main/docs/capabilities.json) · [llms.txt (for agents)](https://github.com/usestapel/stapel-billing/blob/main/docs/llms.txt)

## Quick start

```python
# settings.py
INSTALLED_APPS = [
    ...
    'stapel_billing',
]
```

## Bus events

### Emits
| `payment.completed` | [schema](schemas/emits/payment.completed.json) | A payment transaction completed successfully. |
| `subscription.changed` | [schema](schemas/emits/subscription.changed.json) | User subscription plan or status changed. |

### Consumes
| `user.deleted` | [schema](schemas/consumes/user.deleted.json) |
| `user.deletion_initiated` | [schema](schemas/consumes/user.deletion_initiated.json) |

## License

MIT — see [LICENSE](https://github.com/usestapel/stapel-billing/blob/main/LICENSE).

---

<sub>This page is assembled by `stapel-readme` from `docs/readme.md` plus the contract artifacts in `docs/`. Edit the prose in `docs/readme.md`; the badges, facts and links above and below it are generated — do not hand-edit `README.md`.</sub>
