Documentation Index
Fetch the complete documentation index at: https://docs.lux-core.io/llms.txt
Use this file to discover all available pages before exploring further.
Authentication
All API requests to LuxCore must be authenticated. Most integrations use API keys on API v1. Merchants explicitly onboarded to API v2 use HMAC signatures for payment creation.Obtaining API Keys
API keys and merchant accounts are created by the LuxCore team during onboarding. Self-registration is not available.
- Contact your LuxCore account manager
- Or email developers@lux-core.io
API Key Types
LuxCore uses API keys to authenticate requests.Key Types
| Key Prefix | Environment | Description |
|---|---|---|
qp_prod_sk_ | Production | Real transactions with actual money movement |
qp_test_sk_ | Test | Simulated transactions, no real money movement |
Making API v1 Authenticated Requests
Include your API key in theX-API-Key header with every request:
API v2 HMAC Payment Requests
Merchants onboarded to API v2 create payments through:X-API-Key. Each request must be signed with HMAC-SHA256 using the payment HMAC secret issued during onboarding or API v2 enablement. This secret is separate from webhook signing secrets.
Required Headers
| Header | Description |
|---|---|
X-Merchant-Id | Numeric merchant ID |
X-Timestamp | Unix timestamp in seconds |
X-Nonce | Unique nonce, 8-128 characters |
X-Signature-Version | Canonicalization version, currently v1 |
X-Signature | hmac_sha256=<hex digest> |
Canonical String
Build the canonical string exactly as:methodis uppercase, for examplePOSTpath_with_queryincludes/api/v2/paymentsand any query string exactly as sentsha256_raw_body_hexis the SHA-256 hash of the raw request body bytes- Reject locally if the timestamp differs from current time by more than 300 seconds
- Never reuse a nonce within the 300-second replay window
Node.js Example
JWT Bearer Token
Some endpoints also support JWT Bearer token authentication as an alternative to API keys.For API v1 merchant integrations, API keys are the recommended authentication method. API v2 payment creation uses HMAC. JWT Bearer tokens are available for advanced use cases — contact support for details.
Test Mode vs Production
Test and production requests use the same API endpoint. The environment is determined by your API key type.
Test Mode Behavior
When using test API keys (qp_test_sk_*):
- Payments are simulated and do not process real funds
- Webhooks are delivered normally for testing integrations
- All API responses mirror production behavior
- Balance operations use test balances isolated from production
- No actual bank transfers or card charges occur
Switching Environments
Simply change your API key to switch between test and production:API Key Scopes
API keys can be configured with specific scopes to limit access:| Scope | Description |
|---|---|
payments.create | Create new payments |
payments.read | View payment details |
payments.view | View payment details (alias for payments.read) |
payments.cancel | Cancel pending payments |
payments.methods | Access payment methods info |
webhooks.create | Create webhook endpoints |
webhooks.read | View webhook configurations |
webhooks.view | View webhook configurations (alias for webhooks.read) |
webhooks.update | Modify webhook settings |
webhooks.delete | Delete webhooks |
balance.read | View account balances |
balance.view | View account balances (alias for balance.read) |
Rate Limits
API requests are rate-limited to ensure fair usage:| Endpoint Type | Limit |
|---|---|
| Payment creation | 5000 requests/minute (burst: 500/10sec) |
| Standard endpoints | 100 requests/minute |
Rate limits are applied per API key. If you exceed the limit, you’ll receive a
429 Too Many Requests response.Error Responses
Authentication errors return standard HTTP status codes:| Status Code | Description |
|---|---|
401 Unauthorized | Missing or invalid API key |
403 Forbidden | API key lacks required scope |
429 Too Many Requests | Rate limit exceeded |
Example Error Response
Best Practices
Use Environment Variables
Store API keys in environment variables, never in code
Rotate Keys Regularly
Regenerate API keys periodically for security
Use Minimal Scopes
Request only the scopes your application needs
Monitor Usage
Track API usage in the dashboard for anomalies
Key Rotation
To rotate your API keys:- Generate a new API key in the Dashboard under Settings -> API Keys
- Update your application to use the new key
- Verify the new key works correctly
- Deactivate the old key in the Dashboard
Multiple API keys can be active simultaneously, allowing zero-downtime rotation. For webhook secret rotation, delete and recreate the webhook endpoint with a new secret.
