Statistics
The method allows you to retrieve payment statistics by sending a POST request.
What the method allows you to do
Returns statistics on invoice statuses for the specified period.
Endpoint
POST https://api.trybit.com/v2/invoice/merchant/statistics
Headers
Authorization*
string
Token eyJ0eXAiOiJK<...>4npi1ksS8tSY
Project API key
Request Body
Key parameters
start*
string
01.01.2026
Date in format «dd.mm.yyyyy»
end*
string
31.01.2026
Date in format «dd.mm.yyyyy»
Must be greater than or equal to start.
Request examples
These examples show how to send a request to retrieve statistics on invoice statuses for the specified period.
curl -X POST https://api.trybit.com/v2/invoice/merchant/statistics \
-H "Authorization: Token <API KEY>" \
-H "Content-Type: application/json" \
-d '{"start":"01.01.2023","end":"31.01.2023"}'import requests
url = "https://api.trybit.com/v2/invoice/merchant/statistics"
headers = {
"Authorization": "Token <API KEY>"
}
data = {
"start": "01.01.2023",
"end": "31.01.2023"
}
response = requests.post(url, headers=headers, json=data)
if response.status_code == 200:
print("Success:", response.json())
else:
print("Fail:", response.status_code, response.text)Response examples
A successful request returns a response with the status success and a result object.
Response parameters
The result object contains:
count
dict
"count": {
"all": 907,
"created": 4,
"paid": 90,
"overpaid": 8,
"partial": 6,
"canceled": 799
}
Object containing values for the number of invoices
amount
dict
"amount": {
"all": 214356.22712,
"created": 4.0,
"paid": 629.729137,
"overpaid": 36.82,
"partial": 11.4,
"canceled": 213674.277983
}
Object containing values for amounts in USD
all
int, float
907 / 214356.22712
All invoices
created
int, float
4 / 4.0
Invoices with the “Created” status
paid
int, float
90 / 629.729137
Invoices with the “Paid” status
overpaid
int, float
8 / 36.82
Invoices with the “Overpaid” status
partial
int, float
6 / 11.4
Invoices with the “Partially paid” status
canceled
int, float
799 / 213674.277983
Invoices with the “Canceled” status
Last updated
Was this helpful?
