Using the Reporting API


The Reporting API supports two types of report: transaction reports and return reports.

A transaction report includes details about all debit and credit transactions within a specified date range. A transaction report can also retrieve details about a specific transaction.

A return report includes details about returned transactions within a specified date range. The report can also retrieve details about a specific returned transaction.

Headers

Report requests require the following headers:

  • x-pgw-client-id: client_id
  • x-pgw-app-id: app_id
  • Authorization: Bearer token
  • Content-Type: application/json

The access token is obtained via the OAuth clientCredentials flow using the token URL: https://staging.mazoomagateway.com/register/oauth/token

For more information, see Authentication.

Report request
object
productList
array[string]
1 validation
report
object
required
merchant
object
transaction
object

Report Response


Report responses are returned as a stream, which when deserialized consist of an array of TransactionReportResponse and ReturnReportResponse objects.

The report response is one of the following, depending on the option specified in the request:

  • JSON text stream
  • CSV text stream
  • Zipped JSON
  • Zipped CSV

When returning a JSON text stream, the response consists of an array of TransactionReportResponse and ReturnReportResponse objects, as shown in the JSON report response example. The return response must be de-serialized before being interpreted. The Mazooma Java client libraries perform this operation transparently.

array[oneOf]
object

Transaction report. A transaction report includes details about all debit transactions within a specified date range, including returned or rejected transactions. A transaction report can also retrieve details about a specific transaction.

or
object

Return report. A return report includes details about returned transactions during a specified date range. The report can also retrieve details about a specific returned transaction.