Skip to main content

Python Examples

Illustrative Python examples for integrating with the LuxCore API using the requests library.

Installation

Configuration

LuxCore Client Class

Save the following illustrative client in luxcore.py for the import examples below. It covers API v1; see Authentication for API v2 signing.
The webhook helpers below use the default HMAC-SHA256 algorithm. Use the configured algorithm and verify a test delivery before enabling business actions. These examples are clients for API v1, not official SDK packages.

Usage Examples

Create a Deposit Payment

Create a Withdrawal (Payout)

Get Payment Status

List Payments

Check Balance

Webhook Handler (Flask)

Error Handling

Complete Example