Metadata-Version: 2.4
Name: maytes-api-client-py
Version: 0.1.2
Summary: Official Python client for the Maytes API — create, capture and cancel checkouts, with OAuth2 token management and webhook signature verification.
Home-page: https://github.com/kttipay/maytes-api-client-py
Author: Maytes
Author-email: team@openapitools.org
License: MIT
Project-URL: Repository, https://github.com/kttipay/maytes-api-client-py
Project-URL: Homepage, https://developers.maytes.co
Project-URL: Documentation, https://developers.maytes.co
Project-URL: Issues, https://github.com/kttipay/maytes-api-client-py/issues
Keywords: maytes,checkout,payments,api,sdk
Requires-Python: >=3.9
Description-Content-Type: text/markdown
License-File: LICENSE
Requires-Dist: urllib3<3.0.0,>=2.1.0
Requires-Dist: python-dateutil>=2.8.2
Requires-Dist: pydantic>=2.11
Requires-Dist: typing-extensions>=4.7.1
Dynamic: author-email
Dynamic: home-page
Dynamic: license-file

# Maytes Python SDK

Official Python client for the [Maytes API](https://developers.maytes.co) — create,
capture and cancel checkouts, and verify inbound webhook signatures.

> **Generated package.** This repository is a build artefact, published from the
> Maytes API service definition. Pull requests here are not accepted — file
> issues instead, and fixes land upstream in the source model.

## Install

```bash
pip install maytes-api-client-py
```

## Usage

The client mints an OAuth2 `client_credentials` token on first use, caches it,
and — on a `401` — refreshes and retries the request once. There is no
client-side expiry maths to get wrong, and no proactive refresh to schedule.

```python
from maytes_api_client import create_maytes_api_client, verify_webhook_signature

client = create_maytes_api_client(endpoint, client_id, client_secret)
checkout = client.create_checkout(request)

event = verify_webhook_signature(raw_body, signature_header, signing_secret)
```

The PyPI project is `maytes-api-client-py`; the import package is
`maytes_api_client`.

### Verifying webhooks

Verify **before** parsing the body, and pass the raw request bytes — not a
re-encoded object. Re-serialising changes the bytes and the signature will not
match. The event id is stable across retries, so deduplicate on it.

## Documentation

Full integration docs: <https://developers.maytes.co>

## License

MIT — see [LICENSE](LICENSE).
