Metadata-Version: 2.4
Name: wirepayment
Version: 1.0.0
Summary: Official Python SDK for the Wire payment API
Project-URL: Homepage, https://wire.mn
Project-URL: Source, https://github.com/buildry-wire/wire-python
Author: Buildry
License-Expression: MIT
License-File: LICENSE
Requires-Python: >=3.9
Description-Content-Type: text/markdown

# wirepayment (Python)

Official Python SDK for the [Wire](https://wire.mn) payment API.

## Install
```bash
pip install wirepayment
```

## Quickstart
```python
import wire

client = wire.Client("sk_live_...")

pi = client.payment_intents.create(amount=50000, currency="MNT")  # minor units
print(pi.id, pi.status)
```

## Auto-pagination
```python
for charge in client.charges.list(limit=50):
    print(charge.id)
```

## Webhook verification
```python
import wire

event = client.webhooks.verify(
    request.body,                       # raw bytes
    request.headers[wire.SIGNATURE_HEADER],
    endpoint_secret,
)
print(event.type)
```

## Errors
```python
try:
    client.payment_intents.create(amount=-1)
except wire.WireError as e:
    print(e.code, e.request_id, e.status_code)
```

## License
MIT
