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/strike-keyUpdate Strike API key (Strike merchants)
PUT/api/merchant/opennode-keyUpdate OpenNode API key (OpenNode merchants)
PUT/api/merchant/payment-providerSet the active payment provider (strike or opennode)
PUT/api/merchant/webhook-urlUpdate webhook URL and secret
GET/api/merchant/subscriptionGet subscription details
POST/api/merchant/validate-strikeValidate Strike API key
POST/api/merchant/validate-opennodeValidate OpenNode API key
GET/api/merchant/api-key-infoGet metadata about your merchant API key
POST/api/merchant/regenerate-keyRotate your merchant API key
GET/api/merchant/quickstartGet interactive onboarding guide
Strike API Key Configuration

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

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. There are three, cheapest first:

Internal planTier ValueUser-Facing Product NamePrice
freeFree Producer Sandbox$0
individualAgentic Commerce$49/mo
l402Agentic Commerce — BusinessContact us

Plan Tiers and L402 Support

PlanInternal ValuePriceL402 EnabledTrial Eligible
Free Producer Sandboxfree$0✅ Yes — capped at 3 endpoints, 200 challenges/mo, 1,000 sats per challenge❌ No — Free is the floor, not a trial
Agentic Commerceindividual$49/mo✅ Yes✅ Yes
Agentic Commerce — Businessl402Contact us✅ YesArranged directly on contact, not via self-serve checkout
planTier is normalized — changed September 2026

planTier 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"
MCP Integration

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

FieldTypeRequiredDescription
strikeApiKeystringYesYour 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

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": "individual",
"planName": "Agentic Commerce",
"status": "active",
"stripeCustomerId": "cus_abc123",
"limits": {
"maxMerchants": 1,
"maxEnvironments": 2,
"maxWebhookEndpoints": 5
}
}

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."
}

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