Description

Mangopay’s Reporting Service replaces the legacy reports endpoints. The Reporting Service enables your platform to download large amounts of data in CSV format for accounting or analysis purposes. Two types of report are available, specified in the ReportType:
  • USER_WALLET_TRANSACTIONS – All transactions crediting or debiting user wallets: pay-ins, transfers, conversions, and payouts, as well as refunds of all types and repudiations (from chargebacks).
  • COLLECTED_FEES– Detail of transactions crediting or debiting the fees wallet: transactions of all types (pay-ins, transfers, refunds, payouts, etc.) that have a positive or negative fees amount.

Differences with legacy reports

Report coverage – The USER_WALLET_TRANSACTIONS report provides the same data as the legacy Transactions report. A report serving the same purpose as the legacy Wallets report is planned in future. Any new types of reports developed in future will only be added to the Reporting Service. Webhook-based notification – The Reporting Service introduces two event types for webhook notifications, REPORT_GENERATED and REPORT_FAILED, which replace the legacy system based on a callback URL for each report. Transitional status – The Reporting service also introduces a new transitional Status value, GENERATING, which indicates that the report is being generated and no longer awaiting processing (PENDING). The GENERATING value may be particularly useful when the report contains large volumes of data. Historical data availability – The Reporting Service can return data up to two years in the past. The data availability period may vary for future report types. Expiry – The Reporting Service reports can be downloaded during 31 days, at which point they expire. A new report with the same data can be generated. The expiry date may vary for future report types. Dashboard features – The Reporting Service underpins the reporting features of the Mangopay Dashboard. In the Dashboard, you can generate and manage all reports, and schedule them for regular download. Read more about reports

Attributes

Id
string
Max length: 128 characters (see data formats for details)The unique identifier of the object.
Tag
string
Max. length: 255 charactersCustom data that you can add to this object.For reports, this parameter can be useful to give the report a name.
CreationDate
Unix timestamp
The date and time at which the object was created.
ReportDate
Unix timestamp | null
The date and time at which the report was generated.
Status
string
Returned values: PENDING, READY_FOR_DOWNLOAD, FAILED, EXPIREDThe status of the report:
  • PENDING – The report is being generated.
  • READY_FOR_DOWNLOAD – The report has been created, and can be downloaded.
  • FAILED – The report cannot be generated.
  • EXPIRED – The report was created, but is no longer available for download (it can be re-run to be downloaded again with fresh data).
ResultCode
string
The code indicating the result of the operation. This information is mostly used to handle errors or for filtering purposes.
ResultMessage
string
The explanation of the result code.
DownloadFormat
string
Returned values: CSVThe format in which the report is going to be downloaded.
DownloadURL
string | null
The URL at which the report file can be downloaded when the Status is GENERATED.
ReportType
string
The type of the report:
  • USER_WALLET_TRANSACTIONS – All transactions crediting or debiting user wallets: pay-ins, transfers, conversions, and payouts, as well as refunds of all types and repudiations (from chargebacks).
  • COLLECTED_FEES– Detail of transactions crediting or debiting the fees wallet: transactions of all types (pay-ins, transfers, refunds, payouts, etc.) that have a positive or negative fees amount.
Sort
string
The sorting direction of the CreationDate column. By default, the generated report is sorted by ascending creation date.
AfterDate
Unix timestamp
Possible values: Any date and time (before the BeforeDate) between the present and 24 months ago.The date and time after which the report’s transaction was created, based on the transaction’s CreationDate.Note: The period between the AfterDate and the BeforeDate cannot exceed 12 months.
BeforeDate
Unix timestamp
Possible values: Any date and time (after the AfterDate) between the present and 24 months ago.The date and time before which the report’s transaction was created, based on the transaction’s CreationDate.Note: The period between the AfterDate and the BeforeDate cannot exceed 12 months.
Filters
object
Possible values: Currency, UserId, WalletIdThe filers to apply.If the ReportType is COLLECTED_FEES, only the Currency filter can be used. If the currency is not specified, the report contains data on all currencies.If the ReportType is USER_WALLET_TRANSACTIONS, each filter can be used on its own or in combination, in which case the report data satisfies both filters.
  • UserId and Currency – Report contains all transactions (credited or debited) in the currency where UserId is the AuthorId
  • UserId and WalletId – Report contains all transactions (credited or debited) in all currencies where the UserId is specified as the DebitedWalletId or CreditedWalletId. If the WalletId is not a wallet owned by the UserId, then the report will be empty.
The Currency and WalletId cannot be used together.If no Filters are specified, the report contains all transactions crediting or debiting all user wallets.Caution: The WalletId and UserId values are not validated before the request is launched, so if both are used but don’t correspond (the user doesn’t own the wallet), then the report will be empty.
Columns
array (string)
Possible values: The columns listed in the Reports guide, which differ according to the report type.Default values: The default columns listed in the Reports guide, which differ according to the report type.The data columns to be included in the report.