Merchant Settings API
The Merchant Settings API allows you to manage your own account configuration. All endpoints require authentication with your merchant API key.
Endpoints
| Method | Endpoint | Description |
|---|---|---|
GET | /api/merchant/me | Get account info and onboarding status |
GET | /api/merchant/l402-status | Check L402 license status |
PUT | /api/merchant/opennode-key | Update OpenNode API key (OpenNode merchants) |
PUT | /api/merchant/webhook-url | Update webhook URL and secret |
GET | /api/merchant/subscription | Get subscription details |
POST | /api/merchant/validate-opennode | Validate OpenNode API key |
GET | /api/merchant/quickstart | Get interactive onboarding guide |
Strike is the recommended default payment provider. Strike API key configuration is managed via the Admin API (PUT /api/admin/merchants/{merchantId} with strikeApiKey). Contact support@lightningenable.com to configure your Strike API key, or use the admin API if you have access.
Get Account Info
Get your merchant account information and onboarding status.
GET /api/merchant/me
Response
{
"merchantId": 123,
"name": "My Company",
"email": "api@mycompany.com",
"planTier": "standard",
"subscriptionStatus": "active",
"isActive": true,
"createdAt": "2024-01-15T10:30:00Z",
"features": {
"refundsEnabled": true,
"multiCurrencyEnabled": true,
"analyticsEnabled": true,
"prioritySupport": false,
"customBrandingEnabled": false,
"maxWebhookEndpoints": 3,
"slaUptimePercentage": 99.5
},
"onboarding": {
"hasPaymentProviderKey": true,
"hasWebhookUrl": true,
"hasActiveProxy": true,
"proxyCount": 2,
"isFullyConfigured": true
}
}
Example
curl https://api.lightningenable.com/api/merchant/me \
-H "X-API-Key: le_merchant_abc123"
Check L402 License Status
Check if your account has L402 features enabled. This endpoint is used by MCP tools to validate license status before executing paid-tier operations.
GET /api/merchant/l402-status
Response (L402 Enabled)
{
"l402Enabled": true,
"planTier": "l402",
"subscriptionStatus": "active",
"isActive": true
}
Response (L402 Not Enabled)
{
"l402Enabled": false,
"planTier": "standalone",
"subscriptionStatus": "active",
"isActive": true
}
Response Fields
| Field | Type | Description |
|---|---|---|
l402Enabled | boolean | Whether L402 features are available |
planTier | string | Current plan tier (see mapping table below) |
subscriptionStatus | string | Subscription status: active, trialing, past_due, canceled |
isActive | boolean | Whether the merchant account is active |
Plan Tier Name Mapping
The planTier field uses internal code names. Here is the mapping to user-facing product names:
Internal planTier Value | User-Facing Product Name | Price |
|---|---|---|
standalone | Agentic Commerce — Individual | $99/mo |
standard | Kentico Commerce | $249/mo |
l402 | Agentic Commerce — Business | $299/mo |
pilot | Pilot (internal) | — |
Plan Tiers and L402 Support
| Plan | Internal Value | Price | L402 Enabled | Trial Eligible |
|---|---|---|---|---|
| Agentic Commerce — Individual | standalone | $99/mo | ✅ Yes (producer tools require subscription) | ✅ Yes |
| Kentico Commerce | standard | $249/mo | ❌ No | ❌ No |
| Agentic Commerce — Business | l402 | $299/mo | ✅ Yes | ✅ Yes |
Example
curl https://api.lightningenable.com/api/merchant/l402-status \
-H "X-API-Key: le_merchant_abc123"
This endpoint is called automatically by the MCP server when using access_l402_resource or pay_l402_challenge tools. Set the LIGHTNING_ENABLE_API_KEY environment variable to your merchant API key.
Update OpenNode API Key
Configure your OpenNode API key. This endpoint applies to merchants using OpenNode as their payment provider. If you are using Strike (the recommended default), your Strike API key is configured via the Admin API — contact support@lightningenable.com for assistance.
PUT /api/merchant/opennode-key
Request Body
| Field | Type | Required | Description |
|---|---|---|---|
openNodeApiKey | string | Yes | Your OpenNode API key |
- Production: https://app.opennode.com → Settings → API Keys
- Testnet: https://dev-app.opennode.com → Settings → API Keys
Request
{
"openNodeApiKey": "your-opennode-api-key"
}
Response
{
"success": true,
"message": "OpenNode API key updated successfully. You can now create L402 proxies."
}
Example
curl -X PUT https://api.lightningenable.com/api/merchant/opennode-key \
-H "X-API-Key: le_merchant_abc123" \
-H "Content-Type: application/json" \
-d '{
"openNodeApiKey": "your-opennode-api-key"
}'
Update Webhook URL
Configure where Lightning Enable should send webhook notifications for payment events.
PUT /api/merchant/webhook-url
Request Body
| Field | Type | Required | Description |
|---|---|---|---|
webhookUrl | string | No | URL to receive webhook notifications |
webhookSecret | string | No | Secret for HMAC signature verification |
Request
{
"webhookUrl": "https://mycompany.com/webhooks/lightning",
"webhookSecret": "my-webhook-signing-secret"
}
Response
{
"success": true,
"message": "Webhook settings updated successfully."
}
Example
curl -X PUT https://api.lightningenable.com/api/merchant/webhook-url \
-H "X-API-Key: le_merchant_abc123" \
-H "Content-Type: application/json" \
-d '{
"webhookUrl": "https://mycompany.com/webhooks/lightning",
"webhookSecret": "my-webhook-signing-secret"
}'
Get Subscription Details
Get your current subscription plan and limits.
GET /api/merchant/subscription
Response
{
"planTier": "standard",
"planName": "Standard",
"status": "active",
"stripeCustomerId": "cus_abc123",
"limits": {
"maxMerchants": 1,
"maxEnvironments": 2,
"maxWebhookEndpoints": 3
}
}
Subscription Status Values
| Status | Description |
|---|---|
active | Subscription is active and paid |
trialing | In free trial period (30 days). Full API access. Card required. |
past_due | Payment failed, grace period |
canceled | Subscription was canceled |
Example
curl https://api.lightningenable.com/api/merchant/subscription \
-H "X-API-Key: le_merchant_abc123"
Validate OpenNode API Key
Test your OpenNode API key to verify it's configured correctly.
POST /api/merchant/validate-opennode
Response (Valid Key)
{
"isValid": true,
"message": "OpenNode API key is valid and working."
}
Response (Invalid Key)
{
"isValid": false,
"message": "OpenNode API key validation failed: 401"
}
Response (No Key Configured)
{
"isValid": false,
"message": "No OpenNode API key configured. Use PUT /api/merchant/opennode-key to add one. Strike merchants should contact support."
}
Example
curl -X POST https://api.lightningenable.com/api/merchant/validate-opennode \
-H "X-API-Key: le_merchant_abc123"
Get Quickstart Guide
Get an interactive onboarding guide that tracks your setup progress.
GET /api/merchant/quickstart
Response
{
"merchantId": 123,
"merchantName": "My Company",
"completedSteps": 3,
"totalSteps": 6,
"requiredStepsCompleted": 3,
"requiredStepsTotal": 4,
"isReadyForProduction": true,
"steps": [
{
"stepNumber": 1,
"title": "Configure Payment Provider API Key",
"description": "Add your payment provider API key (Strike or OpenNode) so Lightning Enable can create invoices on your behalf.",
"endpoint": "PUT /api/merchant/opennode-key",
"exampleRequest": "{ \"openNodeApiKey\": \"your-opennode-api-key\" }",
"isCompleted": true,
"isRequired": true
},
{
"stepNumber": 2,
"title": "Validate Payment Provider Key",
"description": "Verify your payment provider API key is working correctly.",
"endpoint": "POST /api/merchant/validate-opennode",
"exampleRequest": null,
"isCompleted": true,
"isRequired": true
},
{
"stepNumber": 3,
"title": "Create Your First Proxy",
"description": "Create an L402 proxy configuration pointing to your API.",
"endpoint": "POST /api/proxy",
"exampleRequest": "{ \"name\": \"My API\", \"targetBaseUrl\": \"https://api.yourcompany.com/v1\", \"defaultPriceSats\": 100 }",
"isCompleted": true,
"isRequired": true
}
]
}
This endpoint is useful for building onboarding UIs that guide users through the setup process.
Example
curl https://api.lightningenable.com/api/merchant/quickstart \
-H "X-API-Key: le_merchant_abc123"
Error Responses
401 Unauthorized
{
"error": "Authentication required"
}
400 Bad Request
{
"error": "Payment provider API key is required"
}
{
"error": "Invalid webhook URL format"
}
404 Not Found
{
"error": "Merchant not found"
}
Next Steps
- Authentication - API key management
- L402 Protocol - Set up L402 proxy for API monetization
- Webhooks - Configure webhook notifications