Report API
All daily transaction reports generated by Azupay are available for download via our Report API. Daily transaction reports include all completed/settled transactions made to your business in a 24 hour period (12am - 11:59pm) and should be utilised to reconcile transactions with regular sweep amount.
You can supply month + timezone
query parameters OR you can supply fromDate + toDate
. The former provides you a list of all reports automatically generated by Azupay in the specified month, whilst the latter provides you with a report for the date range specified.
All reports generated by Azupay are available for download via our API using three simple steps:
- Get the list of reports
- Get the report's temporary download URL
- Finally, download the report
Get the list of reports
First, you have to get a list of reports available for a given month:
GET https://api.azupay.com.au/v1/report?clientId=MYBUSINESSID&month=2020-01&timezone=Australia/Sydney
Authorization: SECR_MYBUSINESSID_myapikey
Where:
month
: Reports are for this month. Provide a value in the format YYYY-MMclientId
: Your clientId, in this case it'sMYBUSINESSID
timezone
: The timezone you wish to apply to the dates returned in the response body. Currently, we only support Australia/Sydney
OR you can get the list of reports within a date range (providing a 'from date' and 'to date'):
GET https://api.azupay.com.au/v1/report?clientId=MYBUSINESSID&fromDate=2024-01-02T12%3A11%3A00.999%2B0530&toDate=2024-01-02T12%3A11%3A00.999%2B0530
Authorization: SECR_MYBUSINESSID_myapikey
Where:
clientId
: Your clientId, in this case it'sMYBUSINESSID
fromDate
: the start of the date range for which you specify to search for daily transaction reports intoDate
: the end of the date range for which you specify to search for daily transaction reports in
This request will yield a response like the following:
{
"month": "2020-01",
"reports": [
{
"reportId": "string",
"type": "TXN_V2",
"fromDate": "2020-01-01T00:00:00.004+11:00",
"toDate": "2020-01-01T00:00:00.004+11:00",
"clientId": "string"
}
]
}
Where:
month
: Reports are for this monthreports
: The list of available reportsreports.type
: The type of report. Currently, we supplyTXN_V2
orMT940
(select customers only by request)reports.reportId
: This is the unique ID of the report. You need to parse the response based on the other fieldstype
,fromDate
,toDate
and identify thereportId
you are planning to downloadreports.clientId
: The clientId associated with this report.
Get the report's temporary download URL
Once you have identified the reportId
you are interested in, we can move to the next step
GET https://api.azupay.com.au/v1/report/download?clientId=MYBUSINESSID&reportId=report-id
Authorization: SECR_MYBUSINESSID_myapikey
Where:
clientId
: Your clientId, in this case it'sMYBUSINESSID
reportId
: ThereportId
you identified earlier
This will yield the following response:
{
"reportUrl": "https://azupay.com/reports/1234"
}
Where:
reportUrl
: This is a temporary URL you can use to download the file. It is only valid for a limited amount of time
Download the report
Using the reportUrl
, issue a simple GET
request and download the resulting report file:
GET https://azupay.com/reports/1234
This will yield a response with Content-Type
value of application/octet-stream
.
Daily transaction reports provide a different view from live transaction data that is available on the Azupay client dashboard. Daily transaction reports include all completed/settled transactions made to your business in a 24 hour period (12am - 11:59pm).Transaction search results on the dashboard and exported into a report can also include transactions in other statuses like expired, waiting, return_complete etc.
Updated 3 days ago