Skip to main content

SDKs & Code Examples

While we don’t yet offer official SDKs, we provide comprehensive code examples in popular programming languages to help you integrate with the LuxCore API.

Available Examples

Quick Start

All examples follow the same pattern:
  1. Set your API key in an environment variable
  2. Make HTTP requests to the API endpoints
  3. Handle responses and errors appropriately

Environment Variables

Store your API key securely:
export LUXCORE_API_KEY="qp_test_your_api_key"

Common Operations

Each SDK example covers these essential operations:
OperationDescription
Create PaymentCreate deposit or withdrawal payments
Get PaymentRetrieve payment status by ID
List PaymentsList payments with filters
Cancel PaymentCancel a pending payment
Create WebhookSet up webhook endpoints
Verify WebhookVerify webhook signatures
Get BalanceCheck merchant balance

API Wrapper Example

Here’s a simple wrapper class pattern used across our examples:
Python Example
class LuxCoreClient:
    BASE_URL = "https://api.lux-core.io/api/v1"
    
    def __init__(self, api_key):
        self.api_key = api_key
        self.headers = {
            "X-API-Key": api_key,
            "Content-Type": "application/json"
        }
    
    def create_payment(self, **kwargs):
        return self._request("POST", "/payments", kwargs)
    
    def get_payment(self, payment_id):
        return self._request("GET", f"/payments/{payment_id}")
    
    def _request(self, method, path, data=None):
        # Implementation details...
        pass

Community SDKs

If you’ve built an SDK for LuxCore, we’d love to feature it here! Contact us at developers@lux-core.io.

Need Help?