The official Python SDK provides fully typed synchronous and asynchronous clients for the OurPay API.
The new SDK is currently in public preview. Preview builds are distributed as versioned wheels from the OurPay documentation site until the PyPI package is available.

Installation

The SDK requires Python 3.11 or later.
Terminal

Quickstart

Create an organization access token, store it in OURPAY_ACCESS_TOKEN, and make your first request:
main.py

Async client

Use OurPayAsync in asynchronous applications:
async_main.py
The import path pins your client to the 2026-10 API version.

Context managers

Both clients support context managers to close their HTTP connections automatically when the block exits. For synchronous applications, use OurPay with with:
For asynchronous applications, use OurPayAsync with async with:

Sandbox environment

The client uses production by default. Pass environment="sandbox" to use the isolated sandbox environment:
Download the current wheel.