Overview
All SDK methods raise aMoneiError on failure. Always wrap calls in try/except:
Documentation Index
Fetch the complete documentation index at: /llms.txt
Use this file to discover all available pages before exploring further.
Understand how errors are returned and handled in the Monei Python SDK.
MoneiError on failure. Always wrap calls in try/except:
from monei import MoneiClient, MoneiError
try:
tx = monei.payout.bank_transfer({...})
except MoneiError as err:
print(err.status_code) # HTTP status code
print(err.message) # Human-readable error
print(err.code) # Machine-readable error code
| Code | HTTP Status | Meaning |
|---|---|---|
UNAUTHORIZED | 401 | Missing or invalid API key / bearer token |
FORBIDDEN | 403 | Insufficient permissions or KYC tier too low |
NOT_FOUND | 404 | Resource does not exist |
VALIDATION_ERROR | 422 | Invalid request body |
INSUFFICIENT_FUNDS | 400 | Wallet balance too low |
RATE_LIMITED | 429 | Too many requests — back off and retry |
INTERNAL_ERROR | 500 | Something went wrong on our end |
