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:
- Enrich — real-time categorization, merchant identification, geolocation, and carbon footprint.
- Engage — drop-in PFM components for your mobile and web apps.
- Target — behavior-based segmentation and card-linked offer routing.
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.
| Environment | Base URL | Key prefix |
|---|---|---|
| Sandbox | https://api.lunedata.io/v1 | lune_sk_test_ |
| Production | https://api.lunedata.io/v1 | lune_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.
