Metadata-Version: 2.4
Name: durrapay
Version: 0.1.1
Summary: DurraPay Platform API client for Python
License-Expression: MIT
Project-URL: Homepage, https://developer.durrapay.com
Project-URL: Repository, https://github.com/Durrafx-repos/durrapy-sdks
Project-URL: Issues, https://github.com/Durrafx-repos/durrapy-sdks/issues
Keywords: durrapay,payments,mpesa,africa,fintech
Requires-Python: >=3.8
Description-Content-Type: text/markdown
Requires-Dist: requests>=2.25

# durrapay (Python)

Client for the [DurraPay Platform API](https://developer.durrapay.com). Python 3.8+.

```bash
pip install durrapay
```

```python
import os
from durrapay import DurraPay

dp = DurraPay(api_key=os.environ["DURRAPAY_KEY"])   # dpk_test_... or dpk_live_...

# Who am I?
print(dp.me())

# Collect in Kenya (M-Pesa STK)
c = dp.collections.stk(
    phone="254712345678",
    amount_minor=150000,        # KES 1,500.00 (minor units)
    currency="KES",
    reference="ORDER-1001",
)
dp.collections.get(c["payment_id"])

# Send cross-border (FX + payout)
q = dp.transfers.quote(from_currency="KES", destination_country="TZ", from_amount_minor=1_000_000)
dp.transfers.create(quote_id=q["quote_id"], dest_type="PHONE", dest_phone="255712345678", dest_name="Jane Doe")

# Customers, recipients, payment links, balances, usage…
dp.customers.create(name="Jane Doe", email="jane@example.com")
dp.balances()
```

Idempotency keys are auto-generated for POSTs (override with `idempotency_key=`).
Errors raise `DurraPayError` with `.status`, `.code`, and `.body`.
```
