Analitice
Venituri si analitice de plati. Toate endpoint-urile necesita autentificare.
GET /analytics/summary
Obtine un sumar agregat al dashboard-ului pentru un interval de date.
curl "https://api.paylinks.ro/api/v1/analytics/summary?from=2026-01-01&to=2026-02-17" \
-H "Authorization: Bearer YOUR_TOKEN" \
-H "X-Currency: RON"
Parametri query:
| Parametru | Tip | Descriere |
|---|---|---|
from | date/time | Data/ora de inceput (optional) |
to | date/time | Data/ora de sfarsit (optional) |
Raspuns (200):
{
"summary": {
"revenueGrossMinor": 499900,
"revenueNetMinor": 487000,
"refundedMinor": 12000,
"successCount": 100,
"disputesCount": 2,
"newCustomers": 85,
"avgProcessingMs": 1800
}
}
GET /analytics/revenue
Obtine evolutia veniturilor in timp.
curl "https://api.paylinks.ro/api/v1/analytics/revenue?from=2026-01-01&to=2026-02-17&interval=day" \
-H "Authorization: Bearer YOUR_TOKEN" \
-H "X-Currency: RON"
Parametri query:
| Parametru | Tip | Implicit | Descriere |
|---|---|---|---|
from | date/time | acum - 30 zile | Data/ora de inceput |
to | date/time | acum | Data/ora de sfarsit |
interval | string | day | day sau month |
Raspuns (200):
{
"series": [
{ "label": "1 ian.", "revenueMinor": 14999 },
{ "label": "2 ian.", "revenueMinor": 9998 },
{ "label": "3 ian.", "revenueMinor": 24997 }
]
}
GET /analytics/mrr
Obtine datele de venit lunar recurent.
curl "https://api.paylinks.ro/api/v1/analytics/mrr?from=2025-01-01&to=2026-02-17" \
-H "Authorization: Bearer YOUR_TOKEN" \
-H "X-Currency: RON"
Raspuns (200):
{
"currentMrrMinor": 49990,
"activeSubscriptions": 10,
"series": [
{ "label": "ian. 2026", "mrrMinor": 48990 },
{ "label": "feb. 2026", "mrrMinor": 49990 }
]
}
GET /analytics/payment-methods
Obtine distributia metodelor de plata.
curl "https://api.paylinks.ro/api/v1/analytics/payment-methods?from=2026-01-01&to=2026-02-17" \
-H "Authorization: Bearer YOUR_TOKEN" \
-H "X-Currency: RON"
Raspuns (200):
{
"items": [
{ "brand": "visa", "count": 85, "pct": 71 },
{ "brand": "mastercard", "count": 30, "pct": 25 },
{ "brand": "unknown", "count": 5, "pct": 4 }
]
}
POST /analytics/reconcile
Declanseaza reconcilierea tranzactiilor locale cu Stripe.
curl -X POST "https://api.paylinks.ro/api/v1/analytics/reconcile?from=2026-01-01&to=2026-02-17" \
-H "Authorization: Bearer YOUR_TOKEN"
Raspuns (200):
{
"ok": true,
"updated": 37
}