Metadata-Version: 2.4
Name: bila
Version: 0.2.0
Summary: Official Bila Python SDK — Stripe-style payment aggregator for Somalia.
Project-URL: Homepage, https://bila.so
Project-URL: Documentation, https://bila.so/docs/sdks
Project-URL: Source, https://github.com/Saakuut/bila
Author-email: Tabsamo Group <info@tabsamo.com>
License: MIT
Keywords: bila,edahab,payments,somalia,stripe,waafipay
Classifier: Development Status :: 4 - Beta
Classifier: Intended Audience :: Developers
Classifier: License :: OSI Approved :: MIT License
Classifier: Operating System :: OS Independent
Classifier: Programming Language :: Python :: 3
Classifier: Programming Language :: Python :: 3.9
Classifier: Programming Language :: Python :: 3.10
Classifier: Programming Language :: Python :: 3.11
Classifier: Programming Language :: Python :: 3.12
Classifier: Topic :: Office/Business :: Financial
Classifier: Topic :: Software Development :: Libraries
Requires-Python: >=3.9
Requires-Dist: requests>=2.31
Description-Content-Type: text/markdown

# bila — Python SDK

Official Python SDK for [Bila](https://bila.so), the Stripe-style payment aggregator for Somalia.

```bash
pip install bila
```

```python
from bila import Bila

bila = Bila(api_key="sk_live_...")

charge = bila.charges.create(
    amount=10000,
    currency="USD",
    rail="auto",
    identifier="+252611234567",
    description="Order #1234",
)

if charge["status"] == "requires_action":
    redirect_url = charge["requires_action_payload"]["redirect_to"]
    # send the payer to redirect_url
```

Webhook verification:

```python
from bila import verify_webhook_signature

signature = request.headers["Bila-Signature"]
body = request.get_data().decode()
if not verify_webhook_signature(body, signature, secret="whsec_..."):
    return "invalid signature", 400
```

Full docs at <https://bila.so/docs/sdks>.
