Skip to main content

Reports

Creating and Managing Reports Using the API

This guide walks you through how to retrieve authorization, settlement, refund, and chargeback reports using the AndDone Reports API. Reports are delivered in CSV format and can be integrated into your systems for downstream processing or reconciliation.

Using the Reports API, merchants can:

  • Download a report using POST Download Report
  • Retrieve report data using either the ReportGenerationLogId or the event date
  • Monitor report generation and download readiness using the Report Webhook Module
  • Programmatically write the CSV response to a .csv file for easy access and analysis

Prerequisites

Before using the API, ensure the following conditions are met:

Enable Supporting Features

In the AndDone Merchant Portal, enable the following features:

  • Reports
  • Webhooks (Report Module)

Subscribe to Webhooks

You must be subscribed to the Report Webhook module to receive the Report.OnReportGeneration event, which provides the reportId and reportGenerationLogId needed to use the Reports API.

Downloading a Report

Use the POST Download Report method to fetch a CSV version of your report once it has been generated.

Request Body Example

{
    "reportId": "qKd2nd6A",
    "reportGenerationLogId": "Ovkobogv"
}

Response Example

Returns the report in CSV format as a string. The response should be programmatically written to a .csv file to view or import into reporting tools.

MerchantId,TransactionId,TransactionType,MerchantReference,TraceNumber,PaymentMethod,Brand,CreatedOn,Currency,TimeZone,SubTotal,TotalAmount,TechnologyFee,
NetSettlementAmount,IPFSSettlement,SettlementDate,ShopperName,MetaAccount,
MetaPolicyNumber,MetaInvoiceNumber,MetaOther,PayingOnBehalfOf,QuoteId,
BillingAddressLine1,BillingAddressLine2,BillingCountry,BillingState,BillingCity,BillingPostalCode,
FullAccountNumber,eZdmqkdQ,"7c583a8e-157c-498d-a6e7-89bf05391511",Payment,
"7c583a8e-157c-498d-a6e7-89bf05391511","DXDB35GLMS3JC8V5",CARD,DISCOVER,7/9/2024 2:56:29 PM,USD,Eastern,200.99,200.99,0,200.99," ",7/9/2024 3:59:59 PM,"TEST TEST","","45645","","","TEST","TEST","434 ","",USA,AK,Seward,34345-3553,"",

Using Report Event Payloads to Download Reports

The Reports API works in conjunction with the Report Webhook module. When a report is generated, a webhook is sent with all necessary parameters.

Using the webhook, you can:

  • Monitor report generation status
    Receive real-time notifications when reports are ready, contain no data, or encounter errors
  • Trigger report download
    Use the values provided in the Report.OnReportGeneration webhook (reportId, reportGenerationLogId, EventDateTime) to download the report

See the Report Webhook Payloads page for a full list of supported events and field descriptions.

Webhook Events Reference

The Report module includes the following webhook events:

Event Name

Description

Report.OnReportGeneration

Sent when a report is successfully generated

Report.OnGenerationWithNoData

Sent when a report is generated but contains no data

Report.OnReportGenerationFailed

Sent when a report fails to generate (includes error details)