Metadata-Version: 2.4
Name: natcashify-fastapi
Version: 0.1.0
Summary: FastAPI integration for Natcashify.
Keywords: natcash,natcom,payments,haiti,sdk,typed
Author: Louis Midson LAJEANTY
Author-email: Louis Midson LAJEANTY <midsonlajeanty@proton.me>
License-Expression: MIT
License-File: LICENSE
Classifier: Development Status :: 3 - Alpha
Classifier: Framework :: FastAPI
Classifier: Intended Audience :: Developers
Classifier: Programming Language :: Python :: 3
Classifier: Programming Language :: Python :: 3.12
Classifier: Programming Language :: Python :: 3.13
Classifier: Programming Language :: Python :: 3.14
Classifier: Topic :: Office/Business :: Financial
Classifier: Typing :: Typed
Requires-Dist: natcashify-core==0.1.0
Requires-Dist: fastapi>=0.115
Requires-Python: >=3.12
Project-URL: Homepage, https://github.com/midsonlajeanty/natcashify
Project-URL: Documentation, https://midsonlajeanty.github.io/natcashify/
Project-URL: Issues, https://github.com/midsonlajeanty/natcashify/issues
Description-Content-Type: text/markdown

# natcashify-fastapi

FastAPI integration for Natcashify: client dependencies and a verified callback dependency.

```bash
pip install natcashify-fastapi
```

```python
from natcashify.fastapi import NatcashCallback, get_async_natcash_client


@app.get("/natcash/callback")
async def callback(callback: NatcashCallback, client: Client) -> dict[str, str]:
    transaction = await client.get_transaction(callback.order_number)
    ...
```

`NatcashCallback` answers 400 on an invalid signature. Confirm the transaction before fulfilling,
and skip an unknown or already paid order: the browser replays the callback on refresh.
The clients are built from the `NATCASH_*` environment variables.
Documentation: <https://midsonlajeanty.github.io/natcashify/integrations/fastapi/>
