Skip to main content

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

MethodEndpointDescription
GET/api/merchant/meGet account info and onboarding status
GET/api/merchant/l402-statusCheck L402 license status
PUT/api/merchant/opennode-keyUpdate OpenNode API key (OpenNode merchants)
PUT/api/merchant/webhook-urlUpdate webhook URL and secret
GET/api/merchant/subscriptionGet subscription details
POST/api/merchant/validate-opennodeValidate OpenNode API key
GET/api/merchant/quickstartGet interactive onboarding guide
Strike API Key Configuration

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

FieldTypeDescription
l402EnabledbooleanWhether L402 features are available
planTierstringCurrent plan tier (see mapping table below)
subscriptionStatusstringSubscription status: active, trialing, past_due, canceled
isActivebooleanWhether 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 ValueUser-Facing Product NamePrice
standaloneAgentic Commerce — Individual$99/mo
standardKentico Commerce$249/mo
l402Agentic Commerce — Business$299/mo
pilotPilot (internal)

Plan Tiers and L402 Support

PlanInternal ValuePriceL402 EnabledTrial Eligible
Agentic Commerce — Individualstandalone$99/mo✅ Yes (producer tools require subscription)✅ Yes
Kentico Commercestandard$249/mo❌ No❌ No
Agentic Commerce — Businessl402$299/mo✅ Yes✅ Yes

Example

curl https://api.lightningenable.com/api/merchant/l402-status \
-H "X-API-Key: le_merchant_abc123"
MCP Integration

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

FieldTypeRequiredDescription
openNodeApiKeystringYesYour OpenNode API key
Get Your OpenNode API Key

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

FieldTypeRequiredDescription
webhookUrlstringNoURL to receive webhook notifications
webhookSecretstringNoSecret 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

StatusDescription
activeSubscription is active and paid
trialingIn free trial period (30 days). Full API access. Card required.
past_duePayment failed, grace period
canceledSubscription 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