Skip to main content

Python SDK

Requires Python 3.9+. Both synchronous and asynchronous clients are included.

Client initialisation

Use as a context manager to ensure the underlying HTTP session is closed cleanly:

Framework examples

Create a shared client instance at module level — do not instantiate per request:
Payment endpoint
Webhook endpoint
App entry point

STK Push


B2C Payout

Always supply an idempotency_key so you can safely retry without double-paying:

Service wallet


Transactions


Payment wallet channels


Error handling

Common error codes


Async patterns

AsyncPalPluss mirrors every method of PalPluss with the same parameters. Use it whenever you are in an async context: