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.- uv
- pip
Terminal
Quickstart
Create an organization access token, store it inOURPAY_ACCESS_TOKEN, and make your first request:
main.py
Async client
UseOurPayAsync in asynchronous applications:
async_main.py
2026-10 API version.
Context managers
Both clients support context managers to close their HTTP connections automatically when the block exits. For synchronous applications, useOurPay with with:
OurPayAsync with async with:
Sandbox environment
The client uses production by default. Passenvironment="sandbox" to use the isolated sandbox environment: