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 and balance requests.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 Format
A full API key contains two parts separated by a colon:<key_id>:<secret>.
The key ID identifies the credential; the secret is shown when the key is created or rotated. Store the full value securely.
Always send the full <key_id>:<secret> value in X-API-Key. Legacy integrations that send only the key ID should migrate to the full format; key-ID-only requests can be rejected with 401 Unauthorized when full-key validation is enforced.
Making API v1 Authenticated Requests
Include your full API key (<key_id>:<secret>) in the X-API-Key header with every request:
API v2 HMAC Requests
Merchants onboarded to API v2 use HMAC-authenticated endpoints: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
Canonical String
Build the canonical string exactly as:methodis uppercase, for examplePOSTorGETpath_with_queryincludes the API v2 path and any query string exactly as sentsha256_raw_body_hexis the SHA-256 hash of the raw request body bytes- GET requests use an empty raw body hash:
e3b0c44298fc1c149afbf4c8996fb92427ae41e4649b934ca495991b7852b855 - 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. Confirm the
environment with your account manager before creating payments.
Confirm Your Testing Setup
Ask your account manager to confirm the testing endpoint, credentials, enabled routes, recipient fixtures and balance setup before creating payments. Do not assume that changing a key prefix enables simulation or isolates balances. Use only the credentials issued for the agreed environment.API Key Scopes
API keys can be configured with specific scopes to limit access:Rate Limits
API requests are rate-limited to ensure fair usage:Rate limits are applied per endpoint and client IP. If you exceed the limit,
you’ll receive a
429 Too Many Requests response.Error Responses
Authentication errors return standard HTTP status codes: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. Coordinate webhook signing-secret rotation with support and verify
signatures using a test delivery before processing payments.
