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/strike-key | Update Strike API key (Strike merchants) |
PUT | /api/merchant/opennode-key | Update OpenNode API key (OpenNode merchants) |
PUT | /api/merchant/payment-provider | Set the active payment provider (strike or opennode) |
PUT | /api/merchant/webhook-url | Update webhook URL and secret |
GET | /api/merchant/subscription | Get subscription details |
POST | /api/merchant/validate-strike | Validate Strike API key |
POST | /api/merchant/validate-opennode | Validate OpenNode API key |
GET | /api/merchant/api-key-info | Get metadata about your merchant API key |
POST | /api/merchant/regenerate-key | Rotate your merchant API key |
GET | /api/merchant/quickstart | Get interactive onboarding guide |
Strike is the recommended default payment provider and is self-serve — configure it yourself with PUT /api/merchant/strike-key, then confirm it works with POST /api/merchant/validate-strike. No support ticket needed.
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": "individual",
"subscriptionStatus": "active",
"isActive": true,
"createdAt": "2024-01-15T10:30:00Z",
"features": {
"refundsEnabled": false,
"multiCurrencyEnabled": true,
"analyticsEnabled": true,
"prioritySupport": true,
"customBrandingEnabled": false,
"maxWebhookEndpoints": 5,
"l402Enabled": true
},
"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 — useful for dashboards and integrations that want to show a merchant's L402 capability.
GET /api/merchant/l402-status
Response (L402 Enabled)
{
"l402Enabled": true,
"planTier": "l402",
"subscriptionStatus": "active",
"isActive": true
}
Response (L402 Not Enabled)
{
"l402Enabled": false,
"planTier": "individual",
"subscriptionStatus": "active",
"isActive": true
}
l402Enabled is a per-account flag, not a plan lookup, so it can read false on a tier whose plan includes L402 — as above. All three live tiers include L402, so this body means the flag was never applied to the account, most often on a row created under a tier id that has since been retired. It also reads false whenever isActive is false, whatever the flag says. Contact support to have the flag applied; buying the plan again will not set it.
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. There are three, cheapest first:
Internal planTier Value | User-Facing Product Name | Price |
|---|---|---|
free | Free Producer Sandbox | $0 |
individual | Agentic Commerce | $49/mo |
l402 | Agentic Commerce — Business | Contact us |
Plan Tiers and L402 Support
| Plan | Internal Value | Price | L402 Enabled | Trial Eligible |
|---|---|---|---|---|
| Free Producer Sandbox | free | $0 | ✅ Yes — capped at 3 endpoints, 200 challenges/mo, 1,000 sats per challenge | ❌ No — Free is the floor, not a trial |
| Agentic Commerce | individual | $49/mo | ✅ Yes | ✅ Yes |
| Agentic Commerce — Business | l402 | Contact us | ✅ Yes | Arranged directly on contact, not via self-serve checkout |
planTier is normalized — changed September 2026planTier is the resolved tier, not the raw stored column. GET /api/merchant/me, GET /api/merchant/l402-status, and GET /api/merchant/subscription all return one of the three values above.
This is a contract change. These three fields previously returned the stored column, which meant the same unset account was reported as pilot by two of them and standalone by the third. They now agree.
If your account was created before September 2026 under a tier id that has since been retired — standard, kenticocommerce, standalone, standaloneapi, or pilot — the field reports the live tier that id maps to, not the id you may have stored: the retired paid ids report as individual, and pilot reports as free. Update any client that string-matches on a retired id, and treat an unrecognized value as Free.
Example
curl https://api.lightningenable.com/api/merchant/l402-status \
-H "X-API-Key: le_merchant_abc123"
The MCP server's consumer tools (access_l402_resource, pay_l402_challenge, and the rest of the out-of-the-box set) are free and never call this endpoint — they need only a wallet. Set the LIGHTNING_ENABLE_API_KEY environment variable to your merchant API key to unlock the producer and ASA publishing tools.
Update Strike API Key
Configure your Strike API key yourself — Strike is the recommended default and fully self-serve. Saving the key also defaults your account to the Strike provider on first save (it never overwrites an explicit prior provider choice).
PUT /api/merchant/strike-key
Request Body
| Field | Type | Required | Description |
|---|---|---|---|
strikeApiKey | string | Yes | Your Strike API key (needs partner.receive-request.create and related scopes) |
Request
{
"strikeApiKey": "your-strike-api-key"
}
Example
curl -X PUT https://api.lightningenable.com/api/merchant/strike-key \
-H "X-API-Key: le_merchant_abc123" \
-H "Content-Type: application/json" \
-d '{
"strikeApiKey": "your-strike-api-key"
}'
After saving, confirm the key works with POST /api/merchant/validate-strike.
Update OpenNode API Key
Configure your OpenNode API key. This endpoint applies to merchants using OpenNode as their payment provider. Strike merchants should use PUT /api/merchant/strike-key instead (self-serve — no support ticket required).
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": "individual",
"planName": "Agentic Commerce",
"status": "active",
"stripeCustomerId": "cus_abc123",
"limits": {
"maxMerchants": 1,
"maxEnvironments": 2,
"maxWebhookEndpoints": 5
}
}
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."
}
Example
curl -X POST https://api.lightningenable.com/api/merchant/validate-opennode \
-H "X-API-Key: le_merchant_abc123"
Validate Strike API Key
Test your Strike API key to verify it's configured correctly.
POST /api/merchant/validate-strike
Response (No Key Configured)
{
"isValid": false,
"message": "No Strike API key configured. Use PUT /api/merchant/strike-key to add one."
}
Example
curl -X POST https://api.lightningenable.com/api/merchant/validate-strike \
-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