Documentation Index
Fetch the complete documentation index at: https://developer.notchpay.co/llms.txt
Use this file to discover all available pages before exploring further.
Notch Pay Python SDK
The Notch Pay Python SDK provides a convenient way to integrate Notch Pay into your Python applications, including frameworks like Django, Flask, and FastAPI.
Installation
- pip
- poetry
- pipenv
Basic Usage
Initialize the SDK
Create a Payment
Retrieve a Payment
List Payments
Create a Transfer
Check Balance
Django Integration
Installation
Settings Configuration
Add Notch Pay settings to your Django settings file:Create a Payment View
URLs Configuration
Templates
Create the necessary templates:Flask Integration
Installation
Basic Flask App
Templates
Create the necessary templates in atemplates folder:
payment_success.html, payment_failed.html, and payment_error.html as shown in the Django example.
FastAPI Integration
Installation
Basic FastAPI App
API Reference
The Python SDK provides access to all Notch Pay API endpoints:Payments
notchpay.payments.create(data)- Create a paymentnotchpay.payments.retrieve(reference)- Retrieve a paymentnotchpay.payments.list(params)- List paymentsnotchpay.payments.cancel(reference)- Cancel a payment
Transfers
notchpay.transfers.create(data)- Create a transfernotchpay.transfers.retrieve(reference)- Retrieve a transfernotchpay.transfers.list(params)- List transfersnotchpay.transfers.cancel(reference)- Cancel a transfernotchpay.transfers.create_bulk(data)- Create a bulk transfer
Customers
notchpay.customers.create(data)- Create a customernotchpay.customers.retrieve(id)- Retrieve a customernotchpay.customers.update(id, data)- Update a customernotchpay.customers.list(params)- List customersnotchpay.customers.delete(id)- Delete a customer
Beneficiaries
notchpay.beneficiaries.create(data)- Create a beneficiarynotchpay.beneficiaries.retrieve(id)- Retrieve a beneficiarynotchpay.beneficiaries.update(id, data)- Update a beneficiarynotchpay.beneficiaries.list(params)- List beneficiariesnotchpay.beneficiaries.delete(id)- Delete a beneficiary
Balance
notchpay.balance.retrieve()- Check balancenotchpay.balance.retrieve_currency(currency)- Check balance for a specific currencynotchpay.balance.history(params)- List balance history
Webhooks
notchpay.webhooks.create(data)- Create a webhooknotchpay.webhooks.retrieve(id)- Retrieve a webhooknotchpay.webhooks.update(id, data)- Update a webhooknotchpay.webhooks.list(params)- List webhooksnotchpay.webhooks.delete(id)- Delete a webhook
Error Handling
The SDK raises exceptions that you can catch and handle:Async Support
The SDK also provides async support for use with async frameworks like FastAPI:Related Resources
API Reference
Complete API documentation
JavaScript SDK
Integrate with JavaScript applications
PHP SDK
Integrate with PHP applications