Skip to navigation

Payments report

How many payments succeeded, failed and were disputed, and for how much, over time. A payment is counted once, in the bucket it was created in, under its current status. disputed is a payment a provider chargeback holds in that status. Payments still pending aren’t in the report. It covers top-ups and invoice payments, and kind limits it to one of them.

Send split_by=provider to get a row per provider in each bucket, so a failing provider stands out. Amounts are in one currency. Send currency, or leave it out when every payment in the range is in one. If they are in more than one, the call returns 400 with parameter_invalid on currency.

Authentication

AuthorizationBearer

A secret key (rl_sk_test_..., rl_sk_live_...) or a restricted key with limited scopes (rl_rk_test_..., rl_rk_live_...). A restricted key can carry agent: true and an expires_at, and is what a coding agent should hold. Keys end in a checksum so secret scanners can recognize them. People create, roll and revoke keys in the dashboard; GET /v1/api_keys lists them, masked.

Query parameters

fromdatetimeRequired
Start of the range, inclusive.
todatetimeRequired
End of the range, exclusive.
group_byenumOptionalDefaults to month

The bucket size, in UTC (a week starts on Monday). Default month.

Allowed values:
split_byenumOptional

provider: a row per payment provider in each bucket. Leave it out for one row per bucket.

Allowed values:
payment_providerstringOptional
Only payments taken at this provider.
kindenumOptional
Only payments of this kind.
Allowed values:
currencystringOptional

Report in this currency (lowercase ISO 4217). Needed when the payments are in more than one.

Response

The report.
object"payments_report"
currencystring
fromdatetime
todatetime
group_byenum
Allowed values:
datalist of objects
generated_atdatetime
livemodeboolean
split_byenumOptional

Present when the request sent split_by.

Allowed values:

Errors

400
Bad Request Error
401
Unauthorized Error
403
Forbidden Error
429
Too Many Requests Error
500
Internal Server Error