Skip to main content

Python SDK

The openpay-sdk package provides an async-first Python client built on httpx. It supports Python 3.9+.

Installation

Initialization

Never hardcode your API secret. Use environment variables or a secrets manager.

Create a Payment

Synchronous Usage

If you prefer synchronous calls, use the sync client:

Create a Checkout Session

Verify Webhook Signature

Use with FastAPI, Flask, or any ASGI/WSGI framework.

List Payments

Error Handling