Welcome to Xendit’s latest documentation. For legacy content, access the previous documentation here or the previous API reference here.

Generate Report

Prev Next
Post
/reports

Request this endpoint to generate the report. You can specify the type and filter the content of the report. The flow of this endpoint is asynchronous. It means Xendit will send callbacks to you after the report is done. Alternatively, you can use the get report endpoint to get the report status and its detail.

Reports Webhook Xendit notifies your system upon the completed or failed report via webhook. You need to provide an URL to receive webhook. Please specify your URL in Webhook Settings in Xendit Dashboard.

The payment notification will be sent as a POST request to the URL you set. Xendit attach x-callback-token header that you can validate against Verification Token in Webhook Settings to verify message authenticity. Please response back with status 200 immediately. Xendit marks webhook event as failed if there is no response within 30s. When events failed, automatic retry will kick-off for the next 24h. Alternatively, you can resend any event in Webhook tab at anytime. You can also receive notification via email every 6h to check your webhook health.

Security
HTTP
Type Basic
Header parameters
for-user-id
string

The sub-account user-id that you want to make this transaction for.

This header is only used if you have access to xenPlatform. See xenPlatform for more information

Body parameters
Expand All
object
type
string Required

The type of report that will be generated

Valid values[ "\"BALANCE_HISTORY\"", "\"TRANSACTIONS\"", "\"UPCOMING_TRANSACTIONS\"", "\"DETAILED_TRANSACTIONS\"" ]
filter
object (Accounts_Operation_API_ReportFilter) Required

Filtering that are applied to report

The combination of from and to must be less than 31 days.

format
string

The format of the report. Available format is CSV.

currency
string

Accepted currency in Xendit

Valid values[ "\"IDR\"", "\"PHP\"", "\"USD\"", "\"VND\"", "\"THB\"" ]
report_version
string

Report version indicates which version of report you need. This parameter is only applicable to Transaction Report.

Version value <> changelog: VERSION_0: Original version VERSION_1: Includes Settlement Status, Actual Settlement Time, and Estimated Settlement Time VERSION_2: Includes Early Settlement Fee Columns, swapped Payment ID with Product ID

Default"VERSION_0"
Responses
200

Successful operation

getReport
{
  "id": "report_5c1b34a2-6ceb-4c24-aba9-c836bac82b28",
  "type": "BALANCE_HISTORY",
  "status": "PENDING",
  "filter": {
    "from": "2021-06-23T04:01:55.574Z",
    "to": "2021-06-24T04:01:55.574Z"
  },
  "format": "CSV",
  "currency": "IDR",
  "business_id": "5f34f60535ba7c1c0eed846a",
  "created": "2021-06-24T04:01:55.570Z",
  "updated": "2021-06-24T04:01:55.570Z"
}
Expand All
object
type
string

The type of report that will be generated

Valid values[ "\"BALANCE_HISTORY\"", "\"TRANSACTIONS\"", "\"UPCOMING_TRANSACTIONS\"", "\"DETAILED_TRANSACTIONS\"" ]
filter
object (Accounts_Operation_API_ReportFilter)

Filtering that are applied to report

The combination of from and to must be less than 31 days.

format
string

The format of the report. Available format is CSV.

currency
string

Accepted currency in Xendit

Valid values[ "\"IDR\"", "\"PHP\"", "\"USD\"", "\"VND\"", "\"THB\"" ]
report_version
string

Report version indicates which version of report you need. This parameter is only applicable to Transaction Report.

Version value <> changelog: VERSION_0: Original version VERSION_1: Includes Settlement Status, Actual Settlement Time, and Estimated Settlement Time VERSION_2: Includes Early Settlement Fee Columns, swapped Payment ID with Product ID

Default"VERSION_0"
404

The provided id does not exist. Please review the id and try again

object
error_code
string
Valid values[ "\"RATE_LIMIT_EXCEEDED\"" ]
message
string
errors
Array
OneOf
string
string
object
object
Callbacks
Post
/{report_webhook_url}
Body parameters
Report Generation Completed
{
  "event": "reports.completed",
  "id": "report_5c1b34a2-6ceb-4c24-aba9-c836bac82b28",
  "type": "BALANCE_HISTORY",
  "status": "COMPLETED",
  "filter": {
    "from": "2021-06-23T04:01:55.574Z",
    "to": "2021-06-24T04:01:55.574Z"
  },
  "format": "CSV",
  "currency": "IDR",
  "business_id": "5f34f60535ba7c1c0eed846a",
  "created": "2021-06-24T04:01:55.570Z",
  "updated": "2021-06-24T04:01:55.570Z"
}
Report Generation Failed
{
  "event": "reports.failed",
  "id": "report_5c1b34a2-6ceb-4c24-aba9-c836bac82b28",
  "type": "BALANCE_HISTORY",
  "status": "FAILED",
  "filter": {
    "from": "2021-06-23T04:01:55.574Z",
    "to": "2021-06-24T04:01:55.574Z"
  },
  "format": "CSV",
  "currency": "IDR",
  "business_id": "5f34f60535ba7c1c0eed846a",
  "created": "2021-06-24T04:01:55.570Z",
  "updated": "2021-06-24T04:01:55.570Z"
}
Expand All
object
event
string

The type of the event for the report generation.

Valid values[ "\"reports.completed\"", "\"reports.failed\"" ]
Examplereports.completed
id
string

Report ID

type
string

The type of report that will be generated

Valid values[ "\"BALANCE_HISTORY\"", "\"TRANSACTIONS\"", "\"UPCOMING_TRANSACTIONS\"", "\"DETAILED_TRANSACTIONS\"" ]
filter
object (Accounts_Operation_API_ReportFilter)

Filtering that are applied to report

The combination of from and to must be less than 31 days.

format
string

The format of the report. Available format is CSV.

url
string

URL to download after report is completed. The file to download will only be accessible for 24 hours. When the url is expired, you will need to send a new request to generate the report.

currency
string

Accepted currency in Xendit

Valid values[ "\"IDR\"", "\"PHP\"", "\"USD\"", "\"VND\"", "\"THB\"" ]
business_id
string

Unique ID generated by Xendit for the particular file

created
string

The time when the report request is created at UTC+0.

updated
string

The time when the report is updated at UTC+0.

Responses
200

OK