Reference layout demo. Full live docs are published at docs.lunedata.io. Code samples here are illustrative.
Getting started

Introduction

Lune turns raw transaction strings into structured, contextual data your customers can actually feel. This guide walks through the architecture and the fastest path to your first enriched transaction.

Platform overview

Lune sits between your transaction stream and your customer experience layer. Three modules expose the platform:

Each module is independently usable. Most customers start with Enrich and add the others over time.

Quick start

Authenticate with a sandbox key and POST one transaction to the /v1/enrich endpoint:

# Replace lune_sk_test_... with your sandbox key
curl https://api.lunedata.io/v1/enrich \
  -H "Authorization: Bearer lune_sk_test_..." \
  -H "Content-Type: application/json" \
  -d '{
    "description": "STARBUCKS #4521 DUBAI MALL",
    "amount": 26.50,
    "currency": "AED"
  }'
import requests

response = requests.post(
    "https://api.lunedata.io/v1/enrich",
    headers={"Authorization": f"Bearer {LUNE_KEY}"},
    json={
        "description": "STARBUCKS #4521 DUBAI MALL",
        "amount": 26.50,
        "currency": "AED",
    },
)
print(response.json())
const res = await fetch('https://api.lunedata.io/v1/enrich', {
  method: 'POST',
  headers: {
    'Authorization': `Bearer ${process.env.LUNE_KEY}`,
    'Content-Type': 'application/json',
  },
  body: JSON.stringify({
    description: 'STARBUCKS #4521 DUBAI MALL',
    amount: 26.50,
    currency: 'AED',
  }),
});
const data = await res.json();
body, _ := json.Marshal(map[string]interface{}{
    "description": "STARBUCKS #4521 DUBAI MALL",
    "amount":      26.50,
    "currency":    "AED",
})
req, _ := http.NewRequest("POST",
    "https://api.lunedata.io/v1/enrich", bytes.NewReader(body))
req.Header.Set("Authorization", "Bearer "+os.Getenv("LUNE_KEY"))
req.Header.Set("Content-Type", "application/json")
res, _ := http.DefaultClient.Do(req)

You'll receive a structured response in well under 1ms (typical p99: 0.5ms):

{
  "merchant": {
    "name": "Starbucks",
    "logo": "https://cdn.lunedata.io/m/starbucks.svg",
    "location": "Dubai Mall"
  },
  "category": "food.coffee",
  "carbon_g": 38,
  "recurring": false
}

Environments

Two environments share the same API surface. Sandbox traffic does not affect billing or production analytics.

EnvironmentBase URLKey prefix
Sandboxhttps://api.lunedata.io/v1lune_sk_test_
Productionhttps://api.lunedata.io/v1lune_sk_live_

Rate limits

Sandbox: 60 requests/second per key. Production limits are negotiated per contract and typically sit at 5,000 req/s sustained. Every response includes X-RateLimit-Remaining and X-RateLimit-Reset headers.