Troubleshooting
- Authentication and API key issues
- User onboarding and KYC problems
- Card creation and usage errors
- Transaction declines and failures
- Webhook delivery issues
- MCP connection problems
Authentication Issues
Error: 'Invalid API key'
Error: 'Invalid API key'
- HTTP 401 response
- Error message: “Invalid API key” or “Unauthorized”
- Typo in API key
- Using wrong environment key (dev vs live)
- Key has been revoked
- Verify the key in your dashboard matches what you’re using
- Check you’re using
lk_dev_for sandbox andlk_live_for production - Ensure the key hasn’t been revoked
- Check for extra whitespace or newlines in the key
Error: 'Missing Api-Key header'
Error: 'Missing Api-Key header'
- HTTP 401 response
- Error message: “Missing Api-Key header”
- Header name is wrong (case-sensitive)
- Header not being sent
- Use exact header name:
Api-Key(capital A, capital K) - Check your HTTP client is sending headers correctly
Error: 'Agent token not authorized for this endpoint'
Error: 'Agent token not authorized for this endpoint'
User & KYC Issues
User stuck in 'pending' verification status
User stuck in 'pending' verification status
- User completed KYC flow but status remains “pending”
- Not receiving
user.approvedwebhook
- KYC requires manual review
- Document quality issues
- Information mismatch
- Check verification status via API:
- If status is
manualReview, wait for review (usually < 24 hours) - If status is
documentRequired, user needs to re-upload documents - Contact support if stuck > 48 hours
KYC verification URL expired
KYC verification URL expired
- User clicks verification link and sees “expired” error
- Verification URLs expire after 7 days
- Generate a new verification URL:
Error: 'User not approved for spending'
Error: 'User not approved for spending'
- Cannot create agents or cards
- Error mentions user not approved
- User hasn’t completed KYC
- KYC was rejected
- Check user’s application status:
- If
applicationStatusis not “approved”, user must complete/retry KYC - If rejected, check
rejectionReasonand advise user
Card Issues
Error: 'Insufficient balance' when creating card
Error: 'Insufficient balance' when creating card
- Card creation fails
- Error: “Insufficient balance”
- User’s available balance is less than card’s
maxAmount - Funds are tied up in pending transactions
- Check user’s balance:
- Look at
available(nottotal) balance - Either:
- Reduce card’s
maxAmount - Have user deposit more funds
- Wait for pending transactions to settle
- Reduce card’s
Error: 'Declare intent first' when getting card details
Error: 'Declare intent first' when getting card details
POST /v1/cards/{id}/detailsreturns error- Message: “Intent declaration required”
- No intent declared for this card
- Intent expired (intents expire after 1 hour)
- Declare intent first:
- Then request card details
- Note: intents expire after 1 hour if details aren’t accessed
Card shows 'frozen' status unexpectedly
Card shows 'frozen' status unexpectedly
- Card transactions are declining
- Card status is “frozen”
- Spending limit exceeded
- Risk engine triggered freeze
- Manual freeze via API/dashboard
- Check card status and reason:
- If limit exceeded: increase limit or create new card
- If risk freeze: review in dashboard, unfreeze if appropriate:
Transaction Issues
Transaction declined: Insufficient funds
Transaction declined: Insufficient funds
- Transaction fails at merchant
- Decline reason: insufficient funds
- User balance too low
- Card’s
maxAmountexceeded - Pending transactions holding funds
- Check balance and card limits
- Remember: card’s
maxAmountis per-transaction limit - For multi-use cards, check if daily/monthly limits are exceeded
Transaction triggered merchant drift alert
Transaction triggered merchant drift alert
- Transaction completes but triggers
risk.merchant_driftwebhook - Card may be frozen (if drift action is
freeze_card)
- Multi-use card used at a different merchant than the first transaction
- Merchant drift detection is enabled by default for multi-use cards
- If legitimate multi-merchant use, disable drift detection when creating the card:
- Use single-use cards for one-off purchases at different merchants
- If card was frozen, unfreeze it via
POST /v1/cards/{id}/unfreeze
Transaction declined: Card expired or closed
Transaction declined: Card expired or closed
- Transaction fails
- Card shows as “closed”
- Single-use card already used
- Card manually closed
- Card TTL expired
- Single-use cards close after one transaction
- Check if card was manually closed
- Create a new card for the purchase
Intent shows 'mismatched' after transaction
Intent shows 'mismatched' after transaction
- Transaction succeeded but intent is “mismatched”
- Risk alerts generated
- Transaction amount differs >10% from declared
- Merchant name doesn’t match declared merchantText
- This is informational—transaction still completes
- Review the mismatch details
- Improve future intent declarations:
- Include taxes/shipping in amount estimate
- Use exact merchant strings (check past transactions)
Webhook Issues
Webhooks not being received
Webhooks not being received
- Events occur but no webhooks arrive
- Webhook logs show failures
- Endpoint unreachable
- SSL/TLS issues
- Firewall blocking
- Endpoint returning errors
- Verify endpoint is publicly accessible
- Check SSL certificate is valid
- Ensure endpoint returns 2xx within 30 seconds
- Test with dashboard “Send Test” feature
- Check your server logs for incoming requests
Webhook signature verification failing
Webhook signature verification failing
- Webhooks arrive but signature doesn’t match
- Wrong secret being used
- Request body modified by middleware
- Encoding issues
- Get correct secret from dashboard or API:
- Verify you’re using raw request body (not parsed JSON)
- Check your web framework isn’t modifying the body
Receiving duplicate webhook events
Receiving duplicate webhook events
- Same event delivered multiple times
- Normal behavior—webhooks are delivered at-least-once
- Your endpoint may have timed out, triggering retry
- Implement idempotency using event ID:
- Ensure endpoint responds quickly (< 30s)
MCP Issues
MCP tools not appearing in Claude/Cursor
MCP tools not appearing in Claude/Cursor
- Connected to MCP server but tools not visible
- “No tools available” message
- Configuration error
- Missing or invalid API key
- mcp-remote not installed
- Verify config file location and syntax:
- Claude Desktop:
~/Library/Application Support/Claude/claude_desktop_config.json - Cursor:
.cursor/mcp.json
- Claude Desktop:
- Check API key is set:
- Restart the application after config changes
- Check MCP server logs for errors
MCP error: 'Agent token required'
MCP error: 'Agent token required'
- Agent tools fail with authorization error
- Admin tools work but agent tools don’t
- Using agent-only tools without agent context
- Missing
LEDGER_AGENT_TOKENorLEDGER_AGENT_ID
- For agent-specific operations, provide agent credentials:
- Or use API key which has full access
MCP connection timeout
MCP connection timeout
- Tools take forever or timeout
- Intermittent connection failures
- Network issues
- Firewall blocking outbound connections
- Proxy configuration needed
- Test connectivity:
- Check firewall allows outbound HTTPS
- If behind proxy, configure proxy settings
Funding Issues
Crypto deposit not credited
Crypto deposit not credited
- Sent USDC/USDT but balance not updated
- No
deposit.completedwebhook
- Wrong network (sent on unsupported chain)
- Wrong token (sent wrong stablecoin)
- Transaction still pending
- Verify supported networks:
- Check you sent to correct address on correct network
- Verify transaction is confirmed on-chain
- Deposits typically credit within 2-5 minutes after confirmation
- Contact support with transaction hash if not credited after 30 minutes
Balance shows but 'available' is lower
Balance shows but 'available' is lower
- Total balance is correct
- Available balance is lower than expected
- Funds held by pending authorizations
- Funds allocated to active cards
- Check pending transactions
- Review active cards and their
maxAmountreservations - Available = Total - Pending - CardReservations