# Payment Statistics

Use this endpoint to retrieve aggregated payment statistics associated with your account, determined by your Merchant API Key. The results are grouped by cryptocurrency and include the total number of payments and the total received amount for each pay currency. You can filter the statistics by payment type, blockchain network, cryptocurrency symbol, and date range to generate more specific reports.

## GET /payment/stats

>

```json
{"openapi":"3.0.0","info":{"title":"Payments","version":"1.0.0"},"servers":[{"url":"https://api.oxapay.com/v1"}],"security":[],"paths":{"/payment/stats":{"get":{"operationId":"getPaymentStatistics","responses":{"200":{"description":"Successful operation","content":{"application/json":{"schema":{"type":"object","properties":{"data":{"type":"object","properties":{"list":{"type":"array","description":"A list of aggregated payment statistics grouped by cryptocurrency.","items":{"type":"object","properties":{"pay_currency":{"type":"string","description":"The cryptocurrency symbol in which the payment was received."},"total":{"type":"integer","description":"The total number of payments for this cryptocurrency."},"received_amount":{"type":"string","description":"The total received amount for this cryptocurrency. Returned as a decimal string to preserve precision."}}}},"meta":{"type":"object","properties":{"page":{"type":"integer","description":"The current page number of the result set."},"last_page":{"type":"integer","description":"The total number of pages available based on the number of records and page size."},"total":{"type":"integer","description":"The total number of statistic records available for the specified criteria."}}}}},"message":{"type":"string","description":"A message containing additional information about the result of the request."},"error":{"type":"object","description":"An object that provides details about any errors that occurred.","nullable":true,"properties":{"type":{"type":"string","description":"Type of the error."},"key":{"type":"string","description":"Key related to the error."},"message":{"type":"string","description":"Error message."}}},"status":{"type":"integer","description":"The status of the request response. Typically provided as a numeric code."},"version":{"type":"string","description":"The version of the API being used."}}}}}},"400":{"description":"Bad request","content":{"application/json":{"schema":{"type":"object","properties":{"data":{"type":"object","properties":{}},"message":{"type":"string","description":"A message containing additional information about the result of the request."},"error":{"type":"object","description":"An object that provides details about any errors that occurred.","nullable":true,"properties":{"type":{"type":"string","description":"Type of the error"},"key":{"type":"string","description":"Key related to the error"},"message":{"type":"string","description":"Error message"}}},"status":{"type":"integer","description":"The status of the request response. Typically provided as a numeric code (e.g., 200 for success or other codes for errors)."},"version":{"type":"string","description":"The version of the API being used."}}}}}}},"tags":["payment-statistics"],"parameters":[{"in":"header","name":"merchant_api_key","required":true,"schema":{"type":"string"},"description":"Your Merchant API Key for authentication and authorization."},{"in":"header","name":"Content-Type","required":true,"schema":{"type":"string","default":"application/json"}},{"name":"type","in":"query","description":"Filter payment statistics by payment type.","required":false,"schema":{"type":"string","enum":["invoice","white_label","static_address"]}},{"name":"network","in":"query","description":"Filter payment statistics by blockchain network.","required":false,"schema":{"type":"string"}},{"name":"currency","in":"query","description":"Filter payment statistics by a specific cryptocurrency symbol.","required":false,"schema":{"type":"string"}},{"name":"from_date","in":"query","description":"The start of the date window to query for payment statistics in UNIX timestamp format.","required":false,"schema":{"type":"integer"}},{"name":"to_date","in":"query","description":"The end of the date window to query for payment statistics in UNIX timestamp format.","required":false,"schema":{"type":"integer"}}]}}}}
```


---

# Agent Instructions: Querying This Documentation

If you need additional information that is not directly available in this page, you can query the documentation dynamically by asking a question.

Perform an HTTP GET request on the current page URL with the `ask` query parameter:

```
GET https://docs.oxapay.com/api-reference/payment/payment-statistics.md?ask=<question>
```

The question should be specific, self-contained, and written in natural language.
The response will contain a direct answer to the question and relevant excerpts and sources from the documentation.

Use this mechanism when the answer is not explicitly present in the current page, you need clarification or additional context, or you want to retrieve related documentation sections.
