The Report object

The Reportobject gives the possibility to download huge lists of transactions to CSV format for accounting or analysis purposes. This can be done either from the API or Dashboard.

You can choose certain filters including:

  • A date range (BeforeDate and AfterDate) - note that the range can’t be more than 6 months, and must be < 13 months ago
  • Min/Max DebitedFunds
  • Min/Max Fees
  • A WalletId
  • A UserId
  • A transaction Type (PAYIN, PAYOUT or TRANSFER)
  • A transaction Status (CREATED, SUCCEEDED or FAILED)
  • A transaction Nature (REGULAR, REFUND, REPUDIATION or SETTLEMENT)
  • A ResultCode

In each case, you can specify multiple values if you wish.

You also get to choose what datas you want to see (Columns) for each transaction - eg you might just be interested in seeing CreationDate, AuthorId, DebitedFunds and CardType for example.

A report can be requested and then we’ll update it’s Status as soon as it’s ready to download - the wait time is normally only a couple of seconds though. We’ll also ping a particular URL (CallbackURL) if you specified one - just like for hook notifications.

Note that reports expire after 24 hours (ie they’ll be no longer available) but you can “rerun” the same report from the Dashboard very easily.

Parameters

Id
string

string:

Maximum length is 255 characters

The item's ID

CreationDate
timestamp

timestamp

When the item was created

Tag
string

string:

Maximum length is 255 characters

Custom data that you can add to this item

ReportDate
timestamp

timestamp

The date when the report was executed

DownloadURL
string

string:

Maximum length is 255 characters

The URL to download the report

CallbackURL
string

string:

Maximum length is 255 characters

A URL that we will ping when the report is ready to download (works in a similar way to the hooks)

DownloadFormat
DownloadFormat

DownloadFormat:

CSV

The file format for the report download

The format of the report download

ReportType
ReportType

ReportType:

TRANSACTIONS

The type of report

The type of report

Sort
ColumnAndDirection

ColumnAndDirection:

The column to sort against and direction, separated by a :

The column to sort against and direction

Preview
bool

bool:

true, false

Whether the report should be limited to the first 10 lines (and therefore quicker to execute)

Filters
Filters

Filters:

View Sub-parameters

An object of various filters for the report

Filters.BeforeDate
timestamp

timestamp

To return only resources that have CreationDate BEFORE this date

Filters.AfterDate
timestamp

timestamp

To return only resources that have CreationDate AFTER this date

Filters.Type
list

list

The type of the transaction

Filters.Status
list

list

The status of the transaction

Filters.Nature
list

list

The nature of the transaction

Filters.MinDebitedFundsAmount
int

int

The minimum amount of DebitedFunds

Filters.MinDebitedFundsCurrency
CurrencyIso

CurrencyIso:

EUR, USD, GBP, PLN, CHF, NOK, SEK, DKK, CAD, ZAR, XXX

ISO 4217 format

The currency for the minimum amount of DebitedFunds

Filters.MaxDebitedFundsAmount
int

int

The maximum amount of DebitedFunds

Filters.MaxDebitedFundsCurrency
CurrencyIso

CurrencyIso:

EUR, USD, GBP, PLN, CHF, NOK, SEK, DKK, CAD, ZAR, XXX

ISO 4217 format

The currency for the maximum amount of DebitedFunds

Filters.MinFeesAmount
int

int

The minimum amount of Fees

Filters.MinFeesCurrency
CurrencyIso

CurrencyIso:

EUR, USD, GBP, PLN, CHF, NOK, SEK, DKK, CAD, ZAR, XXX

ISO 4217 format

The currency for the minimum amount of Fees

Filters.MaxFeesAmount
int

int

The maximum amount of Fees

Filters.MaxFeesCurrency
CurrencyIso

CurrencyIso:

EUR, USD, GBP, PLN, CHF, NOK, SEK, DKK, CAD, ZAR, XXX

ISO 4217 format

The currency for the maximum amount of Fees

Filters.AuthorId
string

string:

Maximum length is 255 characters

A user's ID

Filters.WalletId
string

string:

Maximum length is 255 characters

The ID of a wallet

Columns
list

list

A list of columns/infos to show in the report - you can choose from: Alias, AuthorId, BankAccountId, BankWireRef, CardId, CardType, Country, CreationDate, CreditedFundsAmount, CreditedFundsCurrency, CreditedUserId, CreditedWalletId, Culture, DebitedFundsAmount, DebitedFundsCurrency, DebitedWalletId, DeclaredDebitedFundsAmount, DeclaredDebitedFundsCurrency, DeclaredFeesAmount, DeclaredFeesCurrency, ExecutionDate, ExecutionType, ExpirationDate, FeesAmount, FeesCurrency, Id, Nature, PaymentType, PreauthorizationId, ResultCode, ResultMessage, Status, Tag, Type, WireReference

ResultCode
string

string:

Maximum length is 255 characters

The result code

ResultMessage
string

string:

Maximum length is 255 characters

A verbal explanation of the ResultCode

{
"Id": "8494514",
"CreationDate": 12926321,
"Tag": "custom meta",
"ReportDate": 1463496101,
"DownloadURL": "http://reports.mangopay.com/jHSYUHJKU9876RFsjz.csv",
"CallbackURL": "http://www.my-site.com/callbackURL/",
"DownloadFormat": "CSV",
"ReportType": "TRANSACTIONS",
"Sort": "CreationDate:DESC",
"Preview": false,
"Filters": {
"BeforeDate": 1463440221,
"AfterDate": 1431817821,
"Type": [ "PAYIN" ],
"Status": [ "SUCCEEDED" ],
"Nature": [ "REGULAR" ],
"MinDebitedFundsAmount": 430,
"MinDebitedFundsCurrency": "EUR",
"MaxDebitedFundsAmount": 8790,
"MaxDebitedFundsCurrency": "EUR",
"MinFeesAmount": 120,
"MinFeesCurrency": "EUR",
"MaxFeesAmount": 450,
"MaxFeesCurrency": "EUR",
"AuthorId": "8494514",
"WalletId": "8494559"
},
"Columns": [ "Id", "CreationDate" ],
"ResultCode": "000000",
"ResultMessage": "The transaction was successful"
}

Create a Transaction Report

POST .../v2.01/ClientId

The ID of your client account

/reports/transactions/

Parameters

Tag
string

string:

Maximum length is 255 characters

optional

Custom data that you can add to this item

CallbackURL
string

string:

Maximum length is 255 characters

optional

A URL that we will ping when the report is ready to download (works in a similar way to the hooks)

DownloadFormat
DownloadFormat

DownloadFormat:

CSV

The file format for the report download

optional

The format of the report download

Sort
ColumnAndDirection

ColumnAndDirection:

The column to sort against and direction, separated by a :

optional

The column to sort against and direction

Preview
bool

bool:

true, false

optional

Whether the report should be limited to the first 10 lines (and therefore quicker to execute)

Filters
Filters

Filters:

View Sub-parameters

optional

An object of various filters for the report

Filters.BeforeDate
timestamp

timestamp

optional

To return only resources that have CreationDate BEFORE this date

Filters.AfterDate
timestamp

timestamp

optional

To return only resources that have CreationDate AFTER this date

Filters.Type
list

list

optional

The type of the transaction

Filters.Status
list

list

optional

The status of the transaction

Filters.Nature
list

list

optional

The nature of the transaction

Filters.MinDebitedFundsAmount
int

int

optional

The minimum amount of DebitedFunds

Filters.MinDebitedFundsCurrency
CurrencyIso

CurrencyIso:

EUR, USD, GBP, PLN, CHF, NOK, SEK, DKK, CAD, ZAR, XXX

ISO 4217 format

optional

The currency for the minimum amount of DebitedFunds

Filters.MaxDebitedFundsAmount
int

int

optional

The maximum amount of DebitedFunds

Filters.MaxDebitedFundsCurrency
CurrencyIso

CurrencyIso:

EUR, USD, GBP, PLN, CHF, NOK, SEK, DKK, CAD, ZAR, XXX

ISO 4217 format

optional

The currency for the maximum amount of DebitedFunds

Filters.MinFeesAmount
int

int

optional

The minimum amount of Fees

Filters.MinFeesCurrency
CurrencyIso

CurrencyIso:

EUR, USD, GBP, PLN, CHF, NOK, SEK, DKK, CAD, ZAR, XXX

ISO 4217 format

optional

The currency for the minimum amount of Fees

Filters.MaxFeesAmount
int

int

optional

The maximum amount of Fees

Filters.MaxFeesCurrency
CurrencyIso

CurrencyIso:

EUR, USD, GBP, PLN, CHF, NOK, SEK, DKK, CAD, ZAR, XXX

ISO 4217 format

optional

The currency for the maximum amount of Fees

Filters.AuthorId
string

string:

Maximum length is 255 characters

optional

A user's ID

Filters.WalletId
string

string:

Maximum length is 255 characters

optional

The ID of a wallet

Columns
list

list

optional

A list of columns/infos to show in the report - you can choose from: Alias, AuthorId, BankAccountId, BankWireRef, CardId, CardType, Country, CreationDate, CreditedFundsAmount, CreditedFundsCurrency, CreditedUserId, CreditedWalletId, Culture, DebitedFundsAmount, DebitedFundsCurrency, DebitedWalletId, DeclaredDebitedFundsAmount, DeclaredDebitedFundsCurrency, DeclaredFeesAmount, DeclaredFeesCurrency, ExecutionDate, ExecutionType, ExpirationDate, FeesAmount, FeesCurrency, Id, Nature, PaymentType, PreauthorizationId, ResultCode, ResultMessage, Status, Tag, Type, WireReference

  • View
  • Code
    A code sample is not available
  • Run
  • View
  • Code
    A code sample is not available
  • Run
POST .../reports/transactions/ HTTP/1.1
Body Parameters :
{
"Tag": "custom meta",
"CallbackURL": "http://www.my-site.com/callbackURL/",
"DownloadFormat": "CSV",
"Sort": "CreationDate:DESC",
"Preview": false,
"Filters": {
"BeforeDate": 1463440221,
"AfterDate": 1431817821,
"Type": [ "PAYIN" ],
"Status": [ "SUCCEEDED" ],
"Nature": [ "REGULAR" ],
"MinDebitedFundsAmount": 430,
"MinDebitedFundsCurrency": "EUR",
"MaxDebitedFundsAmount": 8790,
"MaxDebitedFundsCurrency": "EUR",
"MinFeesAmount": 120,
"MinFeesCurrency": "EUR",
"MaxFeesAmount": 450,
"MaxFeesCurrency": "EUR",
"AuthorId": "8494514",
"WalletId": "8494559"
},
"Columns": [ "Id", "CreationDate" ]
}
POST .../reports/transactions/ HTTP/1.1
Body Parameters :
{
"Tag": "",
"CallbackURL": "",
"DownloadFormat": "",
"Sort": "",
"Preview": "",
"Filters": {
"BeforeDate": ,
"AfterDate": ,
"Type": [ "" ],
"Status": [ "" ],
"Nature": [ "" ],
"MinDebitedFundsAmount": ,
"MinDebitedFundsCurrency": "",
"MaxDebitedFundsAmount": ,
"MaxDebitedFundsCurrency": "",
"MinFeesAmount": ,
"MinFeesCurrency": "",
"MaxFeesAmount": ,
"MaxFeesCurrency": "",
"AuthorId": "",
"WalletId": ""
},
"Columns": [ "", "" ]
}

View a Report

GET .../v2.01/ClientId

The ID of your client account

/reports/ReportId

The Id of a Report

/
  • View
  • Code
    A code sample is not available
  • Run
  • View
  • Code
    A code sample is not available
  • Run
GET .../reports/:ReportId/ HTTP/1.1
GET .../reports// HTTP/1.1

List all Reports

GET .../v2.01/ClientId

The ID of your client account

/reports/

Get parameters

Page
int

int

optional

The page number of results you wish to return

Per_Page
int

int

optional

The number of results to return per page

Sort
ColumnAndDirection

ColumnAndDirection:

The column to sort against and direction, separated by a :

optional

The column to sort against and direction - only CreationDate (or Date for the events) is available and ASC or DESC for the direction

BeforeDate
timestamp

timestamp

optional

To return only resources that have CreationDate BEFORE this date

AfterDate
timestamp

timestamp

optional

To return only resources that have CreationDate AFTER this date

  • View
  • Code
    A code sample is not available
  • Run
  • View
  • Code
    A code sample is not available
  • Run
GET .../reports/ HTTP/1.1
Get Parameters :
{
"Page": 1,
"Per_Page": 25,
"Sort": "CreationDate:DESC",
"BeforeDate": 1463440221,
"AfterDate": 1431817821
}
GET .../reports/ HTTP/1.1
Get Parameters :
{
"Page": ,
"Per_Page": ,
"Sort": "",
"BeforeDate": ,
"AfterDate":
}