Skip to content

Get the analytics

Returns daily payment amount, count, fees and net amounts, optionally grouped by method, project or status.


GET/v1/reports/analytics
Requires payments:read permission.
fromstringrequired

The 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}$

tostringrequired

The 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_bystringoptional

How to split the figures: none (one total), payment_method, project or status.

Example: payment_method

Possible values: none, payment_method, project, status

project_idsstringoptional

Project 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}$

dataobjectrequired

The returned object, or an array of objects for a list.

livemodebooleanrequired

true means this object belongs to live and can involve real payments; false means it belongs to the sandbox.

currencystringrequired

The currency, an ISO 4217 code. Only IDR today.

Example: IDR

Value: IDR

fromstringrequired

The 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}$

tostringrequired

The 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_bystringrequired

How to split the figures: none (one total), payment_method, project or status.

Example: payment_method

Possible values: none, payment_method, project, status

seriesarray of objectrequired

One series for each row of the split.

keystringrequired

total when there is no split; otherwise the method, the project id or the status of the series.

Example: payment.qris

dailyarray of objectrequired

The figures of each day that had any, oldest first.

datestringrequired

The day, YYYY-MM-DD in Jakarta time.

Example: 2026-10-26

Pattern: ^\d{4}-\d{2}-\d{2}$

amountintegerrequired

The 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

countintegerrequired

Number of payments in this series for the day. A status breakdown also counts payments that did not succeed.

Example: 1

net_amountintegerrequired

The amount credited after the Baiyar fee, in the smallest unit of currency (Rp125.000 is 12500000).

Example: 993000

fee_amountintegerrequired

Baiyar's fee for this payment, in the smallest unit of currency (Rp125.000 is 12500000).

Example: 7000

sessions_startedintegerrequired

Number of checkout visits that started that day. Returned only for none or project breakdowns.

Example: 3

sessions_completedintegerrequired

Number of those checkout visits that resulted in a payment. Returned only for none or project breakdowns.

Example: 1

metaobjectrequired

Request details such as its id and pagination cursor.

request_idstringrequired

The 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"