{
"Tag": "Created using Mangopay API Postman Collection",
"DownloadFormat": "CSV",
"CallbackURL": null,
"Sort": "CreationDate:ASC",
"Preview": false,
"Filters": {
"BeforeDate": 1658317644,
"AfterDate": 1655725644,
"Type": [],
"ResultCode": [],
"Status": [],
"Nature": [],
"WalletId": null,
"AuthorId": null,
"MinDebitedFundsAmount": null,
"MinDebitedFundsCurrency": null,
"MaxDebitedFundsAmount": null,
"MaxDebitedFundsCurrency": null,
"MinFeesAmount": null,
"MinFeesCurrency": null,
"MaxFeesAmount": null,
"MaxFeesCurrency": null
},
"Columns": [
"Id",
"Tag",
"CreationDate",
"ExecutionDate",
"AuthorId",
"CreditedUserId",
"DebitedFundsAmount",
"DebitedFundsCurrency",
"CreditedFundsAmount",
"CreditedFundsCurrency",
"FeesAmount",
"FeesCurrency",
"Status",
"ResultCode",
"ResultMessage",
"Type",
"Nature",
"CreditedWalletId",
"DebitedWalletId"
]
}
<?php
require_once 'vendor/autoload.php';
use MangoPay\MangoPayApi;
use MangoPay\Libraries\ResponseException as MGPResponseException;
use MangoPay\Libraries\Exception as MGPException;
$api = new MangoPayApi();
$api->Config->ClientId = 'your-client-id';
$api->Config->ClientPassword = 'your-api-key';
$api->Config->TemporaryFolder = 'tmp/';
try {
$reportRequest = new \MangoPay\ReportRequest();
$reportRequest->ReportType = \MangoPay\ReportType::Transactions;
$reportRequest->CallbackURL = 'http://example.com';
$reportRequest->Tag = 'Created using Mangopay PHP SDK';
$reportRequest->Filters = [
'BeforeDate' => 1658838931,
'AfterDate' => 1656246931,
'Type' => ['PAYIN', 'PAYOUT'],
'ResultCode' => ['000000'],
'Status' => ['SUCCEEDED'],
'Nature' => ['REGULAR'],
'MinDebitedFundsAmount' => null,
'MinDebitedFundsCurrency' => 'EUR',
'MaxDebitedFundsAmount' => null,
'MaxDebitedFundsCurrency' => 'EUR',
'MinFeesAmount' => 0,
'MinFeesCurrency' => 'EUR',
'MaxFeesAmount' => 100000,
'MaxFeesCurrency' => 'EUR',
];
$reportRequest->Columns = [
'Id',
'Tag',
'CreationDate',
'ExecutionDate',
'AuthorId',
'CreditedUserId',
'DebitedFundsAmount',
'DebitedFundsCurrency',
'CreditedFundsAmount',
'CreditedFundsCurrency',
'FeesAmount',
'FeesCurrency',
'Status',
'ResultCode',
'ResultMessage',
'Type',
'Nature',
'CreditedWalletId',
'DebitedWalletId',
];
$response = $api->Reports->Create($reportRequest);
print_r($response);
} catch(MGPResponseException $e) {
print_r($e);
} catch(MGPException $e) {
print_r($e);
}
require 'mangopay'
MangoPay.configure do |client|
client.preproduction = true
client.client_id = 'your-client-id'
client.client_apiKey = 'your-api-key'
client.log_file = File.join(Dir.pwd, 'mangopay.log')
end
myReport = {
ReportType: 'transactions',
Tag: 'Created using Mangopay Ruby SDK',
DownloadFormat: 'CSV',
CallbackURL: 'http://example.com',
Sort: 'CreationDate: ASC',
Preview: false,
Filters: {
BeforeDate: 1658838931,
AfterDate: 1656246931,
Type: ['PAYIN', 'PAYOUT'],
ResultCode: ['000000'],
Status: ['SUCCEEDED'],
Nature: ['REGULAR'],
WalletId: nil,
AuthorId: nil,
MinDebitedFundsAmount: nil,
MinDebitedFundsCurrency: 'EUR',
MaxDebitedFundsAmount: nil,
MaxDebitedFundsCurrency: 'EUR',
MinFeesAmount: 0,
MinFeesCurrency: 'EUR',
MaxFeesAmount: 100000,
MaxFeesCurrency: 'EUR'
},
Columns: [
'Id',
'Tag',
'CreationDate',
'ExecutionDate',
'AuthorId',
'CreditedUserId',
'DebitedFundsAmount',
'DebitedFundsCurrency',
'CreditedFundsAmount',
'CreditedFundsCurrency',
'FeesAmount',
'FeesCurrency',
'Status',
'ResultCode',
'ResultMessage',
'Type',
'Nature',
'CreditedWalletId',
'DebitedWalletId'
]
}
createTransactionsReport(myReport)
from pprint import pprint
import mangopay
mangopay.client_id='your-client-id'
mangopay.apikey='your-api-key'
from mangopay.api import APIRequest
handler = APIRequest(sandbox=True)
from mangopay.resources import ReportTransactions
from mangopay.utils import ReportTransactionsFilters
transactions_report = ReportTransactions(
tag = 'Created using Mangopay Python SDK',
download_format = 'CSV',
callback_url = 'http://example.com',
sort = 'CreationDate: ASC',
preview = False,
filters = ReportTransactionsFilters(
status = ['SUCCEEDED'],
nature = ['REGULAR'],
wallet_id = None,
author_id = None,
min_debited_funds_amount = 0,
min_debited_funds_currency = 'EUR',
max_debited_funds_amount = 1000000,
max_debited_funds_currency = 'EUR',
),
columns = [
'Id',
'Tag',
'CreationDate',
'ExecutionDate',
'AuthorId',
'CreditedUserId',
'DebitedFundsAmount',
'DebitedFundsCurrency',
'CreditedFundsAmount',
'CreditedFundsCurrency',
'FeesAmount',
'FeesCurrency',
'Status',
'ResultCode',
'ResultMessage',
'Type',
'Nature',
'CreditedWalletId',
'DebitedWalletId'
]
)
create_report = transactions_report.create()
pprint(create_report._data)
using MangoPay.SDK;
using MangoPay.SDK.Core.Enumerations;
using MangoPay.SDK.Entities.POST;
using Newtonsoft.Json;
class Program
{
static async Task Main(string[] args)
{
MangoPayApi api = new MangoPayApi();
api.Config.ClientId = "your-client-id";
api.Config.ClientPassword = "your-api-key";
var userId = "user_m_01J2TZ261WZNDM0ZDRWGDYA4GN";
var walletId = "wlt_m_01J30991BXBB7VF28PBS82EWD3";
var report = new ReportRequestPostDTO(ReportType.TRANSACTIONS) {
Filters = {
AuthorId = userId,
WalletId = walletId,
MinDebitedFundsAmount = 500,
MinDebitedFundsCurrency = CurrencyIso.EUR,
MaxDebitedFundsAmount = 50000,
MaxDebitedFundsCurrency = CurrencyIso.EUR
},
Columns = [
"Id",
"Tag",
"CreationDate",
"ExecutionDate",
"AuthorId",
"CreditedUserId",
"DebitedFundsAmount",
"DebitedFundsCurrency",
"CreditedFundsAmount",
"CreditedFundsCurrency",
"FeesAmount",
"FeesCurrency",
"Status",
"ResultCode",
"ResultMessage",
"Type",
"Nature",
"CreditedWalletId",
"DebitedWalletId"
],
CallbackURL = "http://example.com",
Tag = "Created using the Mangopay .NET SDK"
};
var createReport = await api.Reports.CreateAsync(report);
string prettyPrint = JsonConvert.SerializeObject(createReport, Formatting.Indented);
Console.WriteLine(prettyPrint);
}
}
{
"Id": "report_m_01JFA0JQQJ1X6W6VT6042SASTC",
"CreationDate": 1734429204,
"Tag": "Created using Mangopay API Postman Collection",
"ReportDate": null,
"Status": "PENDING",
"DownloadFormat": "CSV",
"DownloadURL": null,
"CallbackURL": null,
"ReportType": "TRANSACTIONS",
"Sort": "CreationDate:ASC",
"Preview": false,
"Filters": {
"BeforeDate": 1658317644,
"AfterDate": 1655725644,
"Type": [],
"ResultCode": [],
"Status": [],
"Nature": [],
"WalletId": null,
"AuthorId": null,
"MinDebitedFundsAmount": null,
"MinDebitedFundsCurrency": null,
"MaxDebitedFundsAmount": null,
"MaxDebitedFundsCurrency": null,
"MinFeesAmount": null,
"MinFeesCurrency": null,
"MaxFeesAmount": null,
"MaxFeesCurrency": null
},
"Columns": [
"Id",
"Tag",
"CreationDate",
"ExecutionDate",
"AuthorId",
"CreditedUserId",
"DebitedFundsAmount",
"DebitedFundsCurrency",
"CreditedFundsAmount",
"CreditedFundsCurrency",
"FeesAmount",
"FeesCurrency",
"Status",
"ResultCode",
"ResultMessage",
"Type",
"Nature",
"CreditedWalletId",
"DebitedWalletId"
],
"ResultCode": null,
"ResultMessage": null
}
Legacy reports
Create a Transactions Report
Generate a legacy Transactions Report
POST
/
v2.01
/
{ClientId}
/
reports
/
transactions
{
"Tag": "Created using Mangopay API Postman Collection",
"DownloadFormat": "CSV",
"CallbackURL": null,
"Sort": "CreationDate:ASC",
"Preview": false,
"Filters": {
"BeforeDate": 1658317644,
"AfterDate": 1655725644,
"Type": [],
"ResultCode": [],
"Status": [],
"Nature": [],
"WalletId": null,
"AuthorId": null,
"MinDebitedFundsAmount": null,
"MinDebitedFundsCurrency": null,
"MaxDebitedFundsAmount": null,
"MaxDebitedFundsCurrency": null,
"MinFeesAmount": null,
"MinFeesCurrency": null,
"MaxFeesAmount": null,
"MaxFeesCurrency": null
},
"Columns": [
"Id",
"Tag",
"CreationDate",
"ExecutionDate",
"AuthorId",
"CreditedUserId",
"DebitedFundsAmount",
"DebitedFundsCurrency",
"CreditedFundsAmount",
"CreditedFundsCurrency",
"FeesAmount",
"FeesCurrency",
"Status",
"ResultCode",
"ResultMessage",
"Type",
"Nature",
"CreditedWalletId",
"DebitedWalletId"
]
}
<?php
require_once 'vendor/autoload.php';
use MangoPay\MangoPayApi;
use MangoPay\Libraries\ResponseException as MGPResponseException;
use MangoPay\Libraries\Exception as MGPException;
$api = new MangoPayApi();
$api->Config->ClientId = 'your-client-id';
$api->Config->ClientPassword = 'your-api-key';
$api->Config->TemporaryFolder = 'tmp/';
try {
$reportRequest = new \MangoPay\ReportRequest();
$reportRequest->ReportType = \MangoPay\ReportType::Transactions;
$reportRequest->CallbackURL = 'http://example.com';
$reportRequest->Tag = 'Created using Mangopay PHP SDK';
$reportRequest->Filters = [
'BeforeDate' => 1658838931,
'AfterDate' => 1656246931,
'Type' => ['PAYIN', 'PAYOUT'],
'ResultCode' => ['000000'],
'Status' => ['SUCCEEDED'],
'Nature' => ['REGULAR'],
'MinDebitedFundsAmount' => null,
'MinDebitedFundsCurrency' => 'EUR',
'MaxDebitedFundsAmount' => null,
'MaxDebitedFundsCurrency' => 'EUR',
'MinFeesAmount' => 0,
'MinFeesCurrency' => 'EUR',
'MaxFeesAmount' => 100000,
'MaxFeesCurrency' => 'EUR',
];
$reportRequest->Columns = [
'Id',
'Tag',
'CreationDate',
'ExecutionDate',
'AuthorId',
'CreditedUserId',
'DebitedFundsAmount',
'DebitedFundsCurrency',
'CreditedFundsAmount',
'CreditedFundsCurrency',
'FeesAmount',
'FeesCurrency',
'Status',
'ResultCode',
'ResultMessage',
'Type',
'Nature',
'CreditedWalletId',
'DebitedWalletId',
];
$response = $api->Reports->Create($reportRequest);
print_r($response);
} catch(MGPResponseException $e) {
print_r($e);
} catch(MGPException $e) {
print_r($e);
}
require 'mangopay'
MangoPay.configure do |client|
client.preproduction = true
client.client_id = 'your-client-id'
client.client_apiKey = 'your-api-key'
client.log_file = File.join(Dir.pwd, 'mangopay.log')
end
myReport = {
ReportType: 'transactions',
Tag: 'Created using Mangopay Ruby SDK',
DownloadFormat: 'CSV',
CallbackURL: 'http://example.com',
Sort: 'CreationDate: ASC',
Preview: false,
Filters: {
BeforeDate: 1658838931,
AfterDate: 1656246931,
Type: ['PAYIN', 'PAYOUT'],
ResultCode: ['000000'],
Status: ['SUCCEEDED'],
Nature: ['REGULAR'],
WalletId: nil,
AuthorId: nil,
MinDebitedFundsAmount: nil,
MinDebitedFundsCurrency: 'EUR',
MaxDebitedFundsAmount: nil,
MaxDebitedFundsCurrency: 'EUR',
MinFeesAmount: 0,
MinFeesCurrency: 'EUR',
MaxFeesAmount: 100000,
MaxFeesCurrency: 'EUR'
},
Columns: [
'Id',
'Tag',
'CreationDate',
'ExecutionDate',
'AuthorId',
'CreditedUserId',
'DebitedFundsAmount',
'DebitedFundsCurrency',
'CreditedFundsAmount',
'CreditedFundsCurrency',
'FeesAmount',
'FeesCurrency',
'Status',
'ResultCode',
'ResultMessage',
'Type',
'Nature',
'CreditedWalletId',
'DebitedWalletId'
]
}
createTransactionsReport(myReport)
from pprint import pprint
import mangopay
mangopay.client_id='your-client-id'
mangopay.apikey='your-api-key'
from mangopay.api import APIRequest
handler = APIRequest(sandbox=True)
from mangopay.resources import ReportTransactions
from mangopay.utils import ReportTransactionsFilters
transactions_report = ReportTransactions(
tag = 'Created using Mangopay Python SDK',
download_format = 'CSV',
callback_url = 'http://example.com',
sort = 'CreationDate: ASC',
preview = False,
filters = ReportTransactionsFilters(
status = ['SUCCEEDED'],
nature = ['REGULAR'],
wallet_id = None,
author_id = None,
min_debited_funds_amount = 0,
min_debited_funds_currency = 'EUR',
max_debited_funds_amount = 1000000,
max_debited_funds_currency = 'EUR',
),
columns = [
'Id',
'Tag',
'CreationDate',
'ExecutionDate',
'AuthorId',
'CreditedUserId',
'DebitedFundsAmount',
'DebitedFundsCurrency',
'CreditedFundsAmount',
'CreditedFundsCurrency',
'FeesAmount',
'FeesCurrency',
'Status',
'ResultCode',
'ResultMessage',
'Type',
'Nature',
'CreditedWalletId',
'DebitedWalletId'
]
)
create_report = transactions_report.create()
pprint(create_report._data)
using MangoPay.SDK;
using MangoPay.SDK.Core.Enumerations;
using MangoPay.SDK.Entities.POST;
using Newtonsoft.Json;
class Program
{
static async Task Main(string[] args)
{
MangoPayApi api = new MangoPayApi();
api.Config.ClientId = "your-client-id";
api.Config.ClientPassword = "your-api-key";
var userId = "user_m_01J2TZ261WZNDM0ZDRWGDYA4GN";
var walletId = "wlt_m_01J30991BXBB7VF28PBS82EWD3";
var report = new ReportRequestPostDTO(ReportType.TRANSACTIONS) {
Filters = {
AuthorId = userId,
WalletId = walletId,
MinDebitedFundsAmount = 500,
MinDebitedFundsCurrency = CurrencyIso.EUR,
MaxDebitedFundsAmount = 50000,
MaxDebitedFundsCurrency = CurrencyIso.EUR
},
Columns = [
"Id",
"Tag",
"CreationDate",
"ExecutionDate",
"AuthorId",
"CreditedUserId",
"DebitedFundsAmount",
"DebitedFundsCurrency",
"CreditedFundsAmount",
"CreditedFundsCurrency",
"FeesAmount",
"FeesCurrency",
"Status",
"ResultCode",
"ResultMessage",
"Type",
"Nature",
"CreditedWalletId",
"DebitedWalletId"
],
CallbackURL = "http://example.com",
Tag = "Created using the Mangopay .NET SDK"
};
var createReport = await api.Reports.CreateAsync(report);
string prettyPrint = JsonConvert.SerializeObject(createReport, Formatting.Indented);
Console.WriteLine(prettyPrint);
}
}
{
"Id": "report_m_01JFA0JQQJ1X6W6VT6042SASTC",
"CreationDate": 1734429204,
"Tag": "Created using Mangopay API Postman Collection",
"ReportDate": null,
"Status": "PENDING",
"DownloadFormat": "CSV",
"DownloadURL": null,
"CallbackURL": null,
"ReportType": "TRANSACTIONS",
"Sort": "CreationDate:ASC",
"Preview": false,
"Filters": {
"BeforeDate": 1658317644,
"AfterDate": 1655725644,
"Type": [],
"ResultCode": [],
"Status": [],
"Nature": [],
"WalletId": null,
"AuthorId": null,
"MinDebitedFundsAmount": null,
"MinDebitedFundsCurrency": null,
"MaxDebitedFundsAmount": null,
"MaxDebitedFundsCurrency": null,
"MinFeesAmount": null,
"MinFeesCurrency": null,
"MaxFeesAmount": null,
"MaxFeesCurrency": null
},
"Columns": [
"Id",
"Tag",
"CreationDate",
"ExecutionDate",
"AuthorId",
"CreditedUserId",
"DebitedFundsAmount",
"DebitedFundsCurrency",
"CreditedFundsAmount",
"CreditedFundsCurrency",
"FeesAmount",
"FeesCurrency",
"Status",
"ResultCode",
"ResultMessage",
"Type",
"Nature",
"CreditedWalletId",
"DebitedWalletId"
],
"ResultCode": null,
"ResultMessage": null
}
Note – Report expiration dateA report expires after 24 hours (i.e., you can no longer download it after this period). You can still generate a new report with the same filters and information easily.
Note –
BeforeDate value restrictionTo ensure that data provided on each report are up-to-date, the BeforeDate parameter cannot be greater than the report creation date minus 5 minutes.
If it is, BeforeDate will be automatically set according to this constraint.Body parameters
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.
string
Possible values:
CSVThe format of the report file.string
Max. length: 255 charactersThe URL to which the notification indicating that the report is ready to be downloaded will be sent.
string
Possible values:
CreationDate:ASC, CreationDate:DESCDefault value: CreationDate:ASCThe sort direction based on transaction creation date.boolean
Whether the report is limited to the first 10 lines (and therefore quicker to generate).
object
The filtering parameters to optimize the report.
Show properties
Show properties
Unix timestamp
Allowed values: Any date between today’s date and 36 months in the past.The date before which the transaction was created (based on the transaction’s
CreationDate parameter).Caution: The time range between the BeforeDate and the AfterDate cannot exceed 6 months.Unix timestamp
The date after which the transaction was created (based on the transaction’s
Caution: The time range between the
CreationDate parameter).Caution: The time range between the
BeforeDate and the AfterDate cannot exceed 6 months.array
Allowed values:
PAYIN, TRANSFER, CONVERSION, PAYOUTThe transaction types to be taken into account.array
The transaction result codes to be taken into account.
array
The transaction statuses to be taken into account.
array
Allowed values:
REGULAR, REPUDIATION, REFUND, SETTLEMENTThe transaction natures to be taken into account.- REGULAR – Relative to most of the transactions (pay-ins, payouts, and transfers) in a usual workflow.
- REPUDIATION – Automatic withdrawal of funds from the platform’s repudiation wallet as part of the dispute process (when the user has requested a chargeback).
- REFUND – Reimbursement of a transaction to the user (pay-in refund), to a wallet (transfer refund), or of a payout (payout refund, only initiated by Mangopay).
- SETTLEMENT – Transfer made to the repudiation wallet by the platform to settle a lost dispute.
string
The unique identifier of the wallet that is to be taken into account.
string
The unique identifier of the user at the source of the transaction.
integer
The debited funds amount above which the transactions are taken into account.
string
Allowed values: The three-letter ISO 4217 code (EUR, GBP, etc.) of a supported currency (depends on feature, contract, and activation settings).The currency of the
MinDebitedFundsAmount value.integer
The debited funds amount below which the transactions are taken into account.
string
Allowed values: The three-letter ISO 4217 code (EUR, GBP, etc.) of a supported currency (depends on feature, contract, and activation settings).The currency of the
MaxDebitedFundsAmount value.integer
The fees amount below which the transactions are taken into account.
string
Allowed values: The three-letter ISO 4217 code (EUR, GBP, etc.) of a supported currency (depends on feature, contract, and activation settings).The currency of the
MinFeesAmount value.integer
The fees amount above which the transactions are taken into account.
string
Allowed values: The three-letter ISO 4217 code (EUR, GBP, etc.) of a supported currency (depends on feature, contract, and activation settings).The currency of the
MaxFeesAmount value.array
Allowed values: The
Columns listed in the Reports article, which differ according to the report type.The information to be included in the report.Responses
200
200
string
Max length: 128 characters (see data formats for details)The unique identifier of the object.
Unix timestamp
The date and time at which the object was created.
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.
Unix timestamp | null
The date and time at which the report was generated.
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).
string
Returned values:
CSVThe format in which the report is going to be downloaded.string | null
The URL at which the report file can be downloaded when the
Status is GENERATED.string
Max. length: 255 charactersThe URL to which the notification indicating that the report is ready to be downloaded will be sent.
string
The type of the report, indicating whether it lists transactions or wallets.
string
The sorting direction of the CreationDate column. By default, the generated report is sorted by ascending creation date.
boolean
Whether the report is limited to the first 10 lines (and therefore quicker to generate).
object
The filtering parameters to optimize the report.
Show properties
Show properties
Unix timestamp
Returned values: Any date between today’s date and 36 months in the past.The date before which the transaction was created (based on the transaction’s
CreationDate parameter).Caution: The time range between the BeforeDate and the AfterDate cannot exceed 6 months.Unix timestamp
The date after which the transaction was created (based on the transaction’s
Caution: The time range between the
CreationDate parameter).Caution: The time range between the
BeforeDate and the AfterDate cannot exceed 6 months.array
The transaction types to be taken into account.
array
The transaction result codes to be taken into account.
array
The transaction statuses to be taken into account.
array
Returned values:
REGULAR, REPUDIATION, REFUND, SETTLEMENTThe transaction natures to be taken into account.REGULAR– Relative to most of the transactions (pay-ins, payouts, and transfers) in a usual workflow.REPUDIATION– Automatic withdrawal of funds from the platform’s repudiation wallet as part of the dispute process (when the user has requested a chargeback).REFUND– Reimbursement of a transaction to the user (pay-in refund), to a wallet (transfer refund), or of a payout (payout refund, only initiated by Mangopay).SETTLEMENT– Transfer made to the repudiation wallet by the platform to settle a lost dispute.
string
The unique identifier of the wallet that is to be taken into account.
string
The unique identifier of the user at the source of the transaction.
integer
The debited funds amount above which the transactions are taken into account.
string
Returned values: The three-letter ISO 4217 code (EUR, GBP, etc.) of a supported currency (depends on feature, contract, and activation settings).The currency of the
MinDebitedFundsAmount value.integer
The debited funds amount below which the transactions are taken into account.
string
Returned values: The three-letter ISO 4217 code (EUR, GBP, etc.) of a supported currency (depends on feature, contract, and activation settings).The currency of the
MaxDebitedFundsAmount value.integer
The fees amount below which the transactions are taken into account.
string
Returned values: The three-letter ISO 4217 code (EUR, GBP, etc.) of a supported currency (depends on feature, contract, and activation settings).The currency of the
MinFeesAmount value.integer
The fees amount above which the transactions are taken into account.
string
Returned values: The three-letter ISO 4217 code (EUR, GBP, etc.) of a supported currency (depends on feature, contract, and activation settings).The currency of the
MaxFeesAmount value.array
Returned values: The
Columns listed in the Reports article, which differ according to the report type.The information to be included in the report.string
The code indicating the result of the operation. This information is mostly used to handle errors or for filtering purposes.
string
The explanation of the result code.
400 - AfterDate must be within past 36 months
400 - AfterDate must be within past 36 months
{
"Message": "One or several required parameters are missing or incorrect. An incorrect resource ID also raises this kind of error.",
"Type": "param_error",
"Id": "3b84cf5d-1195-4753-9ae2-0922e35dbfd4",
"Date": 1716558597.0,
"errors": {
"Filters.AfterDate": "This report type can only be done for the last 36 months."
}
}
{
"Id": "report_m_01JFA0JQQJ1X6W6VT6042SASTC",
"CreationDate": 1734429204,
"Tag": "Created using Mangopay API Postman Collection",
"ReportDate": null,
"Status": "PENDING",
"DownloadFormat": "CSV",
"DownloadURL": null,
"CallbackURL": null,
"ReportType": "TRANSACTIONS",
"Sort": "CreationDate:ASC",
"Preview": false,
"Filters": {
"BeforeDate": 1658317644,
"AfterDate": 1655725644,
"Type": [],
"ResultCode": [],
"Status": [],
"Nature": [],
"WalletId": null,
"AuthorId": null,
"MinDebitedFundsAmount": null,
"MinDebitedFundsCurrency": null,
"MaxDebitedFundsAmount": null,
"MaxDebitedFundsCurrency": null,
"MinFeesAmount": null,
"MinFeesCurrency": null,
"MaxFeesAmount": null,
"MaxFeesCurrency": null
},
"Columns": [
"Id",
"Tag",
"CreationDate",
"ExecutionDate",
"AuthorId",
"CreditedUserId",
"DebitedFundsAmount",
"DebitedFundsCurrency",
"CreditedFundsAmount",
"CreditedFundsCurrency",
"FeesAmount",
"FeesCurrency",
"Status",
"ResultCode",
"ResultMessage",
"Type",
"Nature",
"CreditedWalletId",
"DebitedWalletId"
],
"ResultCode": null,
"ResultMessage": null
}
{
"Tag": "Created using Mangopay API Postman Collection",
"DownloadFormat": "CSV",
"CallbackURL": null,
"Sort": "CreationDate:ASC",
"Preview": false,
"Filters": {
"BeforeDate": 1658317644,
"AfterDate": 1655725644,
"Type": [],
"ResultCode": [],
"Status": [],
"Nature": [],
"WalletId": null,
"AuthorId": null,
"MinDebitedFundsAmount": null,
"MinDebitedFundsCurrency": null,
"MaxDebitedFundsAmount": null,
"MaxDebitedFundsCurrency": null,
"MinFeesAmount": null,
"MinFeesCurrency": null,
"MaxFeesAmount": null,
"MaxFeesCurrency": null
},
"Columns": [
"Id",
"Tag",
"CreationDate",
"ExecutionDate",
"AuthorId",
"CreditedUserId",
"DebitedFundsAmount",
"DebitedFundsCurrency",
"CreditedFundsAmount",
"CreditedFundsCurrency",
"FeesAmount",
"FeesCurrency",
"Status",
"ResultCode",
"ResultMessage",
"Type",
"Nature",
"CreditedWalletId",
"DebitedWalletId"
]
}
<?php
require_once 'vendor/autoload.php';
use MangoPay\MangoPayApi;
use MangoPay\Libraries\ResponseException as MGPResponseException;
use MangoPay\Libraries\Exception as MGPException;
$api = new MangoPayApi();
$api->Config->ClientId = 'your-client-id';
$api->Config->ClientPassword = 'your-api-key';
$api->Config->TemporaryFolder = 'tmp/';
try {
$reportRequest = new \MangoPay\ReportRequest();
$reportRequest->ReportType = \MangoPay\ReportType::Transactions;
$reportRequest->CallbackURL = 'http://example.com';
$reportRequest->Tag = 'Created using Mangopay PHP SDK';
$reportRequest->Filters = [
'BeforeDate' => 1658838931,
'AfterDate' => 1656246931,
'Type' => ['PAYIN', 'PAYOUT'],
'ResultCode' => ['000000'],
'Status' => ['SUCCEEDED'],
'Nature' => ['REGULAR'],
'MinDebitedFundsAmount' => null,
'MinDebitedFundsCurrency' => 'EUR',
'MaxDebitedFundsAmount' => null,
'MaxDebitedFundsCurrency' => 'EUR',
'MinFeesAmount' => 0,
'MinFeesCurrency' => 'EUR',
'MaxFeesAmount' => 100000,
'MaxFeesCurrency' => 'EUR',
];
$reportRequest->Columns = [
'Id',
'Tag',
'CreationDate',
'ExecutionDate',
'AuthorId',
'CreditedUserId',
'DebitedFundsAmount',
'DebitedFundsCurrency',
'CreditedFundsAmount',
'CreditedFundsCurrency',
'FeesAmount',
'FeesCurrency',
'Status',
'ResultCode',
'ResultMessage',
'Type',
'Nature',
'CreditedWalletId',
'DebitedWalletId',
];
$response = $api->Reports->Create($reportRequest);
print_r($response);
} catch(MGPResponseException $e) {
print_r($e);
} catch(MGPException $e) {
print_r($e);
}
require 'mangopay'
MangoPay.configure do |client|
client.preproduction = true
client.client_id = 'your-client-id'
client.client_apiKey = 'your-api-key'
client.log_file = File.join(Dir.pwd, 'mangopay.log')
end
myReport = {
ReportType: 'transactions',
Tag: 'Created using Mangopay Ruby SDK',
DownloadFormat: 'CSV',
CallbackURL: 'http://example.com',
Sort: 'CreationDate: ASC',
Preview: false,
Filters: {
BeforeDate: 1658838931,
AfterDate: 1656246931,
Type: ['PAYIN', 'PAYOUT'],
ResultCode: ['000000'],
Status: ['SUCCEEDED'],
Nature: ['REGULAR'],
WalletId: nil,
AuthorId: nil,
MinDebitedFundsAmount: nil,
MinDebitedFundsCurrency: 'EUR',
MaxDebitedFundsAmount: nil,
MaxDebitedFundsCurrency: 'EUR',
MinFeesAmount: 0,
MinFeesCurrency: 'EUR',
MaxFeesAmount: 100000,
MaxFeesCurrency: 'EUR'
},
Columns: [
'Id',
'Tag',
'CreationDate',
'ExecutionDate',
'AuthorId',
'CreditedUserId',
'DebitedFundsAmount',
'DebitedFundsCurrency',
'CreditedFundsAmount',
'CreditedFundsCurrency',
'FeesAmount',
'FeesCurrency',
'Status',
'ResultCode',
'ResultMessage',
'Type',
'Nature',
'CreditedWalletId',
'DebitedWalletId'
]
}
createTransactionsReport(myReport)
from pprint import pprint
import mangopay
mangopay.client_id='your-client-id'
mangopay.apikey='your-api-key'
from mangopay.api import APIRequest
handler = APIRequest(sandbox=True)
from mangopay.resources import ReportTransactions
from mangopay.utils import ReportTransactionsFilters
transactions_report = ReportTransactions(
tag = 'Created using Mangopay Python SDK',
download_format = 'CSV',
callback_url = 'http://example.com',
sort = 'CreationDate: ASC',
preview = False,
filters = ReportTransactionsFilters(
status = ['SUCCEEDED'],
nature = ['REGULAR'],
wallet_id = None,
author_id = None,
min_debited_funds_amount = 0,
min_debited_funds_currency = 'EUR',
max_debited_funds_amount = 1000000,
max_debited_funds_currency = 'EUR',
),
columns = [
'Id',
'Tag',
'CreationDate',
'ExecutionDate',
'AuthorId',
'CreditedUserId',
'DebitedFundsAmount',
'DebitedFundsCurrency',
'CreditedFundsAmount',
'CreditedFundsCurrency',
'FeesAmount',
'FeesCurrency',
'Status',
'ResultCode',
'ResultMessage',
'Type',
'Nature',
'CreditedWalletId',
'DebitedWalletId'
]
)
create_report = transactions_report.create()
pprint(create_report._data)
using MangoPay.SDK;
using MangoPay.SDK.Core.Enumerations;
using MangoPay.SDK.Entities.POST;
using Newtonsoft.Json;
class Program
{
static async Task Main(string[] args)
{
MangoPayApi api = new MangoPayApi();
api.Config.ClientId = "your-client-id";
api.Config.ClientPassword = "your-api-key";
var userId = "user_m_01J2TZ261WZNDM0ZDRWGDYA4GN";
var walletId = "wlt_m_01J30991BXBB7VF28PBS82EWD3";
var report = new ReportRequestPostDTO(ReportType.TRANSACTIONS) {
Filters = {
AuthorId = userId,
WalletId = walletId,
MinDebitedFundsAmount = 500,
MinDebitedFundsCurrency = CurrencyIso.EUR,
MaxDebitedFundsAmount = 50000,
MaxDebitedFundsCurrency = CurrencyIso.EUR
},
Columns = [
"Id",
"Tag",
"CreationDate",
"ExecutionDate",
"AuthorId",
"CreditedUserId",
"DebitedFundsAmount",
"DebitedFundsCurrency",
"CreditedFundsAmount",
"CreditedFundsCurrency",
"FeesAmount",
"FeesCurrency",
"Status",
"ResultCode",
"ResultMessage",
"Type",
"Nature",
"CreditedWalletId",
"DebitedWalletId"
],
CallbackURL = "http://example.com",
Tag = "Created using the Mangopay .NET SDK"
};
var createReport = await api.Reports.CreateAsync(report);
string prettyPrint = JsonConvert.SerializeObject(createReport, Formatting.Indented);
Console.WriteLine(prettyPrint);
}
}
Was this page helpful?
⌘I