Felloh Python SDK
Official Python SDK for the Felloh payment API.
Installation
pip install felloh
Quick Start
import asyncio
from felloh import FellohClient
from felloh.types import FellohConfig
client = FellohClient(FellohConfig(
public_key="your_public_key",
private_key="your_private_key",
))
async def main():
# List bookings
bookings = await client.bookings.list({"organisation": "org-id"})
print(bookings["data"])
# Create a booking
booking = await client.bookings.create({
"organisation": "org-id",
"booking_reference": "REF-001",
"customer_name": "Jane Smith",
"email": "jane@example.com",
})
print(booking["data"]["id"])
await client.close()
asyncio.run(main())
Context Manager
async with FellohClient(FellohConfig(
public_key="your_public_key",
private_key="your_private_key",
)) as client:
bookings = await client.bookings.list({"organisation": "org-id"})
Pagination
Iterate through all results automatically:
from felloh import to_array
# Async iteration
async for booking in client.bookings.list_all({"organisation": "org-id"}):
print(booking["id"])
# Or collect all into a list
all_bookings = await to_array(client.bookings.list_all({"organisation": "org-id"}))
Resources
| Resource | Methods |
|---|---|
organisations |
list |
bookings |
list, list_all, get, create, update, delete, update_reference |
booking_components |
create, delete |
transactions |
list, list_all, get, refund, complete, reverse, reassign |
customers |
list, list_all, create |
payment_links |
list, list_all, get, create, delete, assign |
ecommerce |
list, list_all, get, create, delete, assign |
refunds |
list, list_all, authorise, decline |
charges |
list, list_all |
chargebacks |
list, list_all |
credit_notes |
list, list_all, get, create, assign |
suppliers |
list, list_all, create |
beneficiaries |
list, list_all, create, activate |
disbursements |
list, list_all, get |
ledger |
list, list_all |
batches |
list, list_all, get |
api_keys |
list, create, delete |
audit |
list, list_all |
aisp |
accounts, transactions, statistics |
scheduled_payments |
list, list_all, available_tokens, create_payment, approval_link, delete |
enums |
list |
Error Handling
from felloh import (
FellohError,
FellohAuthenticationError,
FellohNotFoundError,
FellohValidationError,
FellohRateLimitError,
FellohServerError,
FellohNetworkError,
)
try:
await client.bookings.get("nonexistent-id")
except FellohNotFoundError as e:
print(f"Not found: {e}")
except FellohAuthenticationError:
print("Invalid credentials")
except FellohError as e:
print(f"API error {e.status_code}: {e}")
Webhook Verification
from felloh import verify_webhook_signature, assert_webhook_signature
# Returns True/False
is_valid = verify_webhook_signature(
payload=request_body,
signature=request.headers["X-Signature"],
secret="your_webhook_secret",
)
# Or raise FellohWebhookSignatureError
assert_webhook_signature(
payload=request_body,
signature=request.headers["X-Signature"],
secret="your_webhook_secret",
)
Configuration
FellohConfig(
public_key="pk_...",
private_key="sk_...",
base_url="https://api.felloh.com", # default
timeout=30.0, # seconds, default
max_retries=2, # default
token_refresh_buffer=60, # seconds before expiry, default
logger=lambda entry: print(entry), # optional request logger
)
Development
pip install -e ".[dev]"
pytest # unit + resource tests
pytest -m integration # integration tests (requires env vars)
Integration tests require:
FELLOH_PUBLIC_KEYFELLOH_PRIVATE_KEYFELLOH_ORGANISATION_ID
License
MIT
Metadata
Release files for felloh 0.1.0
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 |
|---|---|---|---|---|
| felloh-0.1.0.tar.gz | 18.5 kB | With provenance | Details for felloh-0.1.0.tar.gz |
Built distribution (wheel)
| File | Interpreter | ABI | Platform | Actions Reset |
|---|---|---|---|---|
| felloh-0.1.0-py3-none-any.whl | Python 3 | none | any | Details for felloh-0.1.0-py3-none-any.whl |
Total release size: 37.8 kB
Release files / felloh-0.1.0.tar.gz
| Download URL | felloh-0.1.0.tar.gz |
|---|---|
| Size | 18.5 kB |
| Tags | Source |
|
SHA-256 checksum How to use checksums |
a1f77ec937bfc6b3cf57fb4dcecb527de9699683a70dfc9e10e3d86fcb6154f0
|
|
BLAKE2b-256 checksum How to use checksums |
22b5a6f1b16ef1c8b0cc36449885767203dd2549d5e84e3edccea610059143c8
|
| Upload date | |
|
Uploaded using Trusted Publishing? What is trusted publishing? |
Yes |
| Uploaded via |
twine/6.1.0 CPython/3.13.7
|
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.
PyPI Publish Attestation
PyPI verified that this artifact, at this checksum, originated from the publisher listed below.
Signed by GitHub Actions, verified by PyPI on Apr 1, 2026.
Transparency logRelease files / felloh-0.1.0-py3-none-any.whl
| Download URL | felloh-0.1.0-py3-none-any.whl |
|---|---|
| Size | 19.3 kB |
| Tags | Python 3 |
|
SHA-256 checksum How to use checksums |
28cd067a8467bde9445af2aa8316fb5413f75d709bcdbd5ba14f2e5d493d5d55
|
|
BLAKE2b-256 checksum How to use checksums |
44e768b6fef38c4a15d6b5adbe4a048cf2ba293b90b5f09197e34f7ca0035fcc
|
| Upload date | |
|
Uploaded using Trusted Publishing? What is trusted publishing? |
Yes |
| Uploaded via |
twine/6.1.0 CPython/3.13.7
|
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.
PyPI Publish Attestation
PyPI verified that this artifact, at this checksum, originated from the publisher listed below.
Signed by GitHub Actions, verified by PyPI on Apr 1, 2026.
Transparency logSecurity for felloh 0.1.0
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.
Full provenance
Both files in this release have been uploaded with provenance metadata.
Attestation for felloh-0.1.0.tar.gz
PyPI Publish Attestation
PyPI verified that this artifact, at this checksum, originated from the publisher listed below.
Signed by GitHub Actions, verified by PyPI on Apr 1, 2026.
Transparency logA 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.