PawaPay Python SDK (Premium)
A secure, high-performance Python implementation for PawaPay integration, featuring a powered core and native bytecode validation for industrial-grade security.
Purchase License: katorymnd.com/pawapay-payment-sdk/python
🛠 Installation Guide (Ubuntu Server)
1. Prepare the Environment
Ensure your server has the necessary Python components:
sudo apt update
sudo apt install python3-venv python3-pip -y
2. Setup the Workspace
Navigate to your project directory and create an isolated environment:
cd /path/to/your/project
python3 -m venv .venv
source .venv/bin/activate
pip install fastapi uvicorn
3. Install the SDK and setup
Upload your .whl file to the server and install:
pip install katorymnd-pawapay-python-sdk
katorymnd-pawapay-setup # initialize sdk setup
⚙️ Configuration
Create a .env file in your root directory:
# .env
PAWAPAY_SANDBOX_API_TOKEN=your_token_here
PAWAPAY_PRODUCTION_API_TOKEN=your_production_api_token_here
KATORYMND_PAWAPAY_SDK_LICENSE_KEY=your_key_here
PAWAPAY_SDK_LICENSE_DOMAIN=your_domain_here
PAWAPAY_SDK_LICENSE_SECRET=your_key_here
🚀 Surgical Usage Examples
1. Initiate a Deposit (V2)
from src.api.ApiClient import ApiClient
from src.utils.helpers import Helpers
config = {
'api_token': 'YOUR_TOKEN',
'environment': 'sandbox',
'api_version': 'v2',
'license_key': 'YOUR_LICENSE'
}
client = ApiClient(config)
response = await client.initiate_deposit_v2(
deposit_id=Helpers.generate_unique_id(),
amount="5000",
currency="UGX",
payer_msisdn="256783456789",
provider="MTN_MOMO_UGA",
customer_message="Payment for Order #1"
)
Expected Response:
{
"depositId": "c6010b6c-871a-4d36-9bfc-b9a0f5f8b226",
"status": "ACCEPTED",
"created": "2026-04-25T11:24:41Z",
"nextStep": "FINAL_STATUS"
}
2. Create a Payment Page (V2)
params = {
'depositId': Helpers.generate_unique_id(),
'amount': "5000",
'currency': "UGX",
'returnUrl': "https://yourdomain.com/success",
'customerMessage': "SDK Test",
'country': "UGA",
'phoneNumber': "256783456789"
}
response = await client.create_payment_page_session_v2(params)
Expected Response:
{
"status": 201,
"response": {
"depositId": "31c56b59-d17f-...",
"redirectUrl": "https://sandbox.paywith.pawapay.io/v2?token=..."
}
}
3. Initiate a Payout (V2)
response = await client.initiate_payout_v2(
payout_id=Helpers.generate_unique_id(),
amount="5000",
currency="UGX",
recipient_msisdn="256783456789",
provider="MTN_MOMO_UGA",
customer_message="Monthly Salary"
)
Expected Response:
{
"payoutId": "1aacbb3b-c0ef-4c05-a0f9-eb8c47e0c34a",
"status": "ACCEPTED",
"created": "2026-04-25T12:17:41Z"
}
🔍 Transaction Management
Check Status (CLI)
The SDK includes a surgical status checker. Replace <UUID> with your transaction ID:
# Check a Deposit
python test_transaction_status.py <UUID> -t deposit -v v2
# Check a Payout
python test_transaction_status.py <UUID> -t payout -v v2
Successful Status Response:
{
"data": {
"status": "COMPLETED",
"amount": "5000.00",
"currency": "UGX",
"providerTransactionId": "eeeaa10f-b453-4db3-bb59-df668a066c31"
},
"status": "FOUND"
}
🛡 Security & Persistence
Background Service
To keep your SDK server running permanently on Ubuntu, create a service file:
/etc/systemd/system/pawapay-python.service
[Service]
WorkingDirectory=/path/to/your/project
Environment="PATH=/path/to/your/project/.venv/bin"
ExecStart=/path/to/your/project/.venv/bin/uvicorn main:app --host 127.0.0.1 --port 8000
Restart=always
Integrity Protection
This SDK utilizes a Native Core Loader. Upon initialization (katorymnd-pawapay-setup):
- .pawapay-imprint: Anchors the SDK to your specific server environment.
- Bytecode VM: Executes transaction logic via randomized opcodes to prevent tampering.
Support: For integration help or license issues, visit katorymnd.com Support.
Metadata
Release files for katorymnd-pawapay-python-sdk 2.1.1
For a detailed explanation of source distributions (sdists) and built distributions (wheels), please see the package formats documentation.
Source distribution (sdist)
| File | Size | Uploaded | Provenance | Actions |
|---|---|---|---|---|
| katorymnd_pawapay_python_sdk-2.1.1.tar.gz | 2.9 MB | Without provenance | Details for katorymnd_pawapay_python_sdk-2.1.1.tar.gz |
Built distribution (wheel)
| File | Interpreter | ABI | Platform | Actions Reset |
|---|---|---|---|---|
| katorymnd_pawapay_python_sdk-2.1.1-py3-none-any.whl | Python 3 | none | any | Details for katorymnd_pawapay_python_sdk-2.1.1-py3-none-any.whl |
Total release size: 5.8 MB
Release files / katorymnd_pawapay_python_sdk-2.1.1.tar.gz
| Download URL | katorymnd_pawapay_python_sdk-2.1.1.tar.gz |
|---|---|
| Size | 2.9 MB |
| Tags | Source |
|
SHA-256 checksum How to use checksums |
2e275ab123bc2a804228e31a718e993877122dac2f7bc12aec72ec2d11086201
|
|
BLAKE2b-256 checksum How to use checksums |
bd58969f451ea75188ce6646b54fa019c6307364048c38df6574e0a07c87bd70
|
| Upload date | |
|
Uploaded using Trusted Publishing? What is trusted publishing? |
No |
| Uploaded via |
twine/6.2.0 CPython/3.12.5
|
Release files / katorymnd_pawapay_python_sdk-2.1.1-py3-none-any.whl
| Download URL | katorymnd_pawapay_python_sdk-2.1.1-py3-none-any.whl |
|---|---|
| Size | 2.9 MB |
| Tags | Python 3 |
|
SHA-256 checksum How to use checksums |
a34c83f77193a2dab7aa6ab4a01abd9aafc22634232aeade2d2777fdd0c0a1f8
|
|
BLAKE2b-256 checksum How to use checksums |
45ae99df810b8a34304d3b751822be2f2d2fa24c11ae575ba100e6a7ae9ba95d
|
| Upload date | |
|
Uploaded using Trusted Publishing? What is trusted publishing? |
No |
| Uploaded via |
twine/6.2.0 CPython/3.12.5
|
Security for katorymnd-pawapay-python-sdk 2.1.1
Provenance
Provenance describes where a file came from. On PyPI, provenance is shared via attestations, which provide a verifiable record of the build or publishing details. View details, limitations and caveats.
No provenance found
None of the files in this release were uploaded with provenance metadata.
A note on package security
PyPI is a repository for distributing packages, not a service for auditing them. While third-party security researchers and our staff do their best to detect and remove malicious packages, PyPI cannot guarantee the quality, security or suitability of any given package.
To learn more about protecting yourself from malicious actors, visit our package security documentation.