λ.digital

Documentation

λ.digital API reference and integration guide. Base URL: https://xn--wxa.digital/api/v1

Quick Start

Three steps to accept your first crypto payment.

1. Create a merchant account

Sign up at λ.digital/signup, add your wallet addresses in the dashboard, and copy your API key from Settings.

2. Create a payment intent

curl -X POST https://xn--wxa.digital/api/v1/payment-intents \
  -H "Authorization: Bearer sk_live_..." \
  -H "Content-Type: application/json" \
  -d '{"amount": "99.97", "currency": "USD", "metadata": {"orderId": "123"}}'

Response:

{
  "id": "pi_...",
  "checkoutUrl": "https://xn--wxa.digital/checkout/pi_...",
  "expiresAt": "2026-06-26T14:00:00Z"
}

3. Send the customer to checkout

// Popup (recommended)
window.open(checkoutUrl, 'pay', 'width=420,height=700,popup');

// Or redirect
window.location.href = checkoutUrl;

Authentication

All API requests must include your API key as a Bearer token in theAuthorizationheader. API keys are prefixed withsk_live_.

Authorization: Bearer sk_live_your_api_key

Never expose your API key in client-side code. All API calls must be made from your server. Rotate your key immediately if compromised — go to Dashboard → Settings → Regenerate API key.

Rate limit: 30 requests / hour per API key on the free plan.

Payment Intents

A PaymentIntent represents a payment request. It holds the expected amount and links to the hosted checkout page where the customer selects a chain and pays.

Create a PaymentIntent

POST /api/v1/payment-intents

Request body:

{
  "amount": "99.97",       // required — amount as string
  "currency": "USD",       // required — fiat currency for display
  "metadata": {            // optional — any JSON object
    "orderId": "ord_123",
    "userId": "usr_456"
  }
}

Response:

{
  "id": "pi_abc123",
  "checkoutUrl": "https://xn--wxa.digital/checkout/pi_abc123",
  "status": "PENDING",
  "amount": "99.97",
  "currency": "USD",
  "metadata": { "orderId": "ord_123" },
  "expiresAt": "2026-06-26T14:30:00Z",
  "createdAt": "2026-06-26T14:00:00Z"
}

Get a PaymentIntent

GET /api/v1/payment-intents/:id

Returns the current state of a payment intent. Poll this to check payment status if you are not using webhooks.

PaymentIntent statuses

PENDINGAwaiting payment from the customer
CONFIRMEDPayment detected and confirmed on-chain
UNDERPAIDPayment received but below the expected amount
EXPIREDNo payment received before expiry

Hosted Checkout

The checkout page at /checkout/:id is a hosted page where the customer selects a chain and sends payment. It displays a QR code and copyable wallet address.

The available chains are determined by the wallet addresses you have registered in the dashboard. The customer can only pay using chains you have configured.

Embedding options

// Option A — popup window (customer stays on your page)
window.open(checkoutUrl, 'pay', 'width=420,height=700,popup');

// Option B — full redirect
window.location.href = checkoutUrl;

The checkout page auto-detects when a payment arrives on-chain (polling every 15 seconds) and shows a confirmation to the customer.

Webhooks

Webhooks deliver real-time payment notifications to your server. Set your webhook URL in Dashboard → Settings.

Event types

payment.confirmedPayment received and confirmed on-chain
payment.expiredPayment intent expired without payment

Payload

{
  "event": "payment.confirmed",
  "data": {
    "paymentIntentId": "pi_abc123",
    "txHash": "0xabc...",
    "amount": "99.97",
    "chain": "bsc",
    "token": "USDT",
    "confirmedAt": "2026-06-26T14:05:00Z",
    "metadata": { "orderId": "ord_123" }
  }
}

Verifying signatures

Every webhook request includes an x-signature header — an HMAC-SHA256 of the raw request body signed with your webhook secret. Always verify this before processing.

const crypto = require('crypto');

function verifyWebhook(rawBody, signature, secret) {
  const expected = crypto
    .createHmac('sha256', secret)
    .update(rawBody)
    .digest('hex');
  return crypto.timingSafeEqual(
    Buffer.from(signature),
    Buffer.from(expected)
  );
}

Retry policy

Failed webhook deliveries are retried 5 times with exponential backoff (immediate → 30s → 5m → 30m → 2h). After 5 failures the webhook is marked as failed. View delivery logs in the dashboard.

Errors

The API uses standard HTTP status codes. Error responses include a JSON body with a message field.

400Bad RequestInvalid request body or missing required fields
401UnauthorizedMissing or invalid API key
403ForbiddenAPI key valid but not permitted for this action
404Not FoundResource does not exist
429Too Many RequestsRate limit exceeded
500Server ErrorInternal error — contact support

Supported Chains & Tokens

BSC
BNB Smart ChainUSDT, USDC~3s block time, 15 confirmations
ETH
EthereumUSDT, USDC~12s block time, 12 confirmations
TRON
TronUSDT~3s block time, 19 confirmations
TON
TONUSDT Jetton~5s block time, finality lag 30s

Available chains on the checkout depend on which wallet addresses the merchant has registered.