Install
Terminal
Authenticate
Create a client with an organization access token or any valid bearer token. The token determines which organization and scopes the calls run against.Your first call
List the benefits granted to the authenticated user. List endpoints are paginated, and the SDK exposes a cursor you can walk until it returnsNone:
Async usage
For concurrent workloads — webhook fan-out, batch event ingestion, agent loops — use the async client andawait each call:
Sandbox environment
Point the client at the sandbox to develop and test against isolated data with no real money movement. Passserver="sandbox" when you instantiate the client — everything else stays identical:
Sandbox and production use separate tokens and separate data. Promote to production by swapping the token and dropping the
server argument.Metering AI and agent usage
The same client powers Macropay’s AI billing primitives. Ingest activity and outcome signals for an agent, then bill by usage, activity, or verified outcome:Read the reference
Every resource, parameter, and response model is documented in the API reference. The SDK method names mirror the REST structure (client.products, client.customers, client.checkouts, client.events), so anything you find there maps directly to a typed Python call.