- Home
- API reference
- Reports
- Get the analytics
Get the analytics
Returns daily payment amount, count, fees and net amounts, optionally grouped by method, project or status.
/v1/reports/analyticspayments:read permission.Query parameters
Section titled “Query parameters”fromstringrequiredThe first day of the period, YYYY-MM-DD in Jakarta time. It is included.
Example: 2026-10-01
Pattern: ^\d{4}-\d{2}-\d{2}$
tostringrequiredThe last day of the period, YYYY-MM-DD in Jakarta time. It is included.
Example: 2026-10-26
Pattern: ^\d{4}-\d{2}-\d{2}$
breakdown_bystringoptionalHow to split the figures: none (one total), payment_method, project or status.
Example: payment_method
Possible values: none, payment_method, project, status
project_idsstringoptionalProject ids separated by commas; every project when left out. A project key counts its own project only.
Example: string
Pattern: ^(prj_[0-7][0-9a-hjkmnp-tv-z]{25})(,prj_[0-7][0-9a-hjkmnp-tv-z]{25}){0,19}$
Response (200)
Section titled “Response (200)”dataobjectrequiredThe returned object, or an array of objects for a list.
livemodebooleanrequiredtrue means this object belongs to live and can involve real payments; false means it belongs to the sandbox.
currencystringrequiredThe currency, an ISO 4217 code. Only IDR today.
Example: IDR
Value: IDR
fromstringrequiredThe first day of the period, YYYY-MM-DD in Jakarta time. It is included.
Example: 2026-10-01
Pattern: ^\d{4}-\d{2}-\d{2}$
tostringrequiredThe last day of the period, YYYY-MM-DD in Jakarta time. It is included.
Example: 2026-10-26
Pattern: ^\d{4}-\d{2}-\d{2}$
breakdown_bystringrequiredHow to split the figures: none (one total), payment_method, project or status.
Example: payment_method
Possible values: none, payment_method, project, status
seriesarray of objectrequiredOne series for each row of the split.
keystringrequiredtotal when there is no split; otherwise the method, the project id or the status of the series.
Example: payment.qris
dailyarray of objectrequiredThe figures of each day that had any, oldest first.
datestringrequiredThe day, YYYY-MM-DD in Jakarta time.
Example: 2026-10-26
Pattern: ^\d{4}-\d{2}-\d{2}$
amountintegerrequiredThe paid amount of the day (a split by status also counts payments that did not go through), in the smallest unit of currency (Rp125.000 is 12500000).
Example: 1000000
countintegerrequiredNumber of payments in this series for the day. A status breakdown also counts payments that did not succeed.
Example: 1
net_amountintegerrequiredThe amount credited after the Baiyar fee, in the smallest unit of currency (Rp125.000 is 12500000).
Example: 993000
fee_amountintegerrequiredBaiyar's fee for this payment, in the smallest unit of currency (Rp125.000 is 12500000).
Example: 7000
sessions_startedintegerrequiredNumber of checkout visits that started that day. Returned only for none or project breakdowns.
Example: 3
sessions_completedintegerrequiredNumber of those checkout visits that resulted in a payment. Returned only for none or project breakdowns.
Example: 1
metaobjectrequiredRequest details such as its id and pagination cursor.
request_idstringrequiredThe id of this request. Quote it when you ask support about it.
Example: req_Hy3k9QzT2LmN8vXa
A failed request answers with the common error shape; see Errors.
curl "https://api.baiyar.com/v1/reports/analytics" \ -H "Authorization: Bearer $BAIYAR_KEY"{ "data": { "livemode": false, "currency": "IDR", "from": "2026-10-01", "to": "2026-10-26", "breakdown_by": "payment_method", "series": [ { "key": "payment.qris", "daily": [ { "date": "2026-10-26", "amount": 1000000, "count": 1, "net_amount": 993000, "fee_amount": 7000, "sessions_started": 3, "sessions_completed": 1 } ] } ] }, "meta": { "request_id": "req_Hy3k9QzT2LmN8vXa" }}