logo
Trustly Docs

Reports

Updated 6 days ago

Under the reports, most of them are related to the reports that the service generates with one exception, for bankgirot, we also provide a folder for mandates created by the consumer at the bank.

Reports for billing, mandates, debits and credits are available via SFTP. The reports are available for 12 month from creation and files have a naming convention according to below:

[username]_[scheme]_[day]_[type]_[category].csv.zip
eg for test, bacs, generated day dec-10, daily , debits -> 
test_bacs_2024-01-10_daily_direct_debit_transitions.csv.zip


There are daily reports, where from and to are the same, weekly and monthly reports. All files are reported in CSV format specified under batch csf-format.

Reports are located under the folder

/reports/'scheme'/'year'/'month'/'user''scheme'''type'_'category'.csv.zip

Example file: trustly_bankgirot_2023-12-01_monthly_billing_items.csv.zip

"Order ID","Message ID","End user ID","Type","Count","Created","Transitioned"
4501293578,"6472c348-282f-4464-9ba9-58b9fdff134d","tester","Successful mandate",1,"2023-11-30T18:02:21.475995Z","2023-12-01T00:30:00.40995Z"
7296456249,"d8354110-6047-4de3-bbd2-6e1a850533e7","tester","Successful mandate",1,"2023-11-30T13:46:50.517494Z","2023-12-04T00:30:00.471891Z"
7140026006,"6f91f17f-193a-486e-8e57-29a642281b2f","tester","Successful mandate",1,"2023-12-04T17:35:58.278369Z","2023-12-05T00:30:00.415242Z"

Example file: trustly_bankgirot_2023-12-01_monthly_mandate_transitions.csv.zip

"Order ID","Message ID","End user ID","Reference","Status","Failure reason","Failure details","Account ID","Amount","Currency","Created","Transitioned","Transitions"
7472622143,"c53ed295-24c1-4eb3-863e-c7de72f5ded6","tester",,"Failed","CHECKOUT_TIMEOUT",,,"N/A",,"2023-12-11T06:03:42.532931Z","2023-12-11T06:34:28.092312Z",
5988131268,"72a9d463-6cac-45a9-b4c7-f5695e6ca752","tester","**********6665","Successful",,,"2672607922","N/A",,"2023-12-07T16:08:11.281118Z","2023-12-11T00:30:00.486905Z","[\"Activated\"]"
4883244788,"8105c922-8fc6-4910-b9cb-35640ef90a72","tester",,"Cancelled",,,,"N/A",,"2023-12-05T10:47:54.479135Z","2023-12-05T10:48:19.734216Z",
4397008398,"5991523a-0477-4bde-853a-70a274c8a17b","tester","**********28076","Successful",,,"1326674678","N/A",,"2023-12-04T17:29:19.779894Z","2023-12-05T00:30:00.48104Z","[\"Activated\"]"
7140026006,"6f91f17f-193a-486e-8e57-29a642281b2f","tester","***********1013","Successful",,,"3805670135","N/A",,"2023-12-04T17:35:58.278369Z","2023-12-05T00:30:00.426667Z","[\"Activated\"]"

Example file: trustly_bankgirot_2023-12-01_monthly_debit_payment_transitions.csv.zip

"Order ID","Message ID","End user ID","Reference","Status","Failure reason","Failure details","Account ID","Amount","Currency","Created","Transitioned","Transitions"
4755295954,"ba1df3cf-b42c-4c0f-b664-cc2eb73c6aa2","tester","*********0001GA","Failed","FAILED","BANKGIROT INSUFFICIENT_FUNDS","1304686402","1.00","SEK","2023-09-11T12:12:12.706088Z","2023-09-19T12:30:00.336048Z","[""Failed""]"
4344666554,"4f17bce4-db14-43ef-b725-c32613741391","tester","*********00018Y","Successful",,,"2880023560","1.00","SEK","2023-08-29T07:35:42.639077Z","2023-09-01T12:17:00.382302Z","[\"Successful\"]"

Example file: trustly_bankgirot_2023-12-01_monthly_credit_payment_transitions.csv.zip

"Order ID","Message ID","End user ID","Reference","Status","Failure reason","Failure details","Account ID","Amount","Currency","Created","Transitioned","Transitions"
6406872524,"02173724-29a4-43e7-b907-53cf26d80fcd","""xxx.yyy@trustly.com""","CREDIT000000000Y","Successful",,,"1964406719","1.00","SEK","2023-09-19T06:40:48.85847Z","2023-09-20T09:30:00.324763Z","[""Successful""]"

This report is only available for bankgirot where the consumer has the ability to register their mandate towards your bankgiro-number if you have it configured to be searchable in the internet bank.

If your bankgiro is open for registrations via the internet bank, you need to periodically connect to the sftp and check for new files which contains the information needed to import the mandate.

The general flow is, get the file with mandates, parse it and for each mandate-row, call ImportDirectDebitMandate with the corresponding values. Once this has been completed, the mandate is available for debits/credits and behaves as any other mandate you have.

The files on the sftp will be named as eg 2023-11-01T10:15:30.123456789Z-mandates.csv and an example is shown below.

/reports/bankgirot/internet-bank-created-mandates


Bankgirot example file
"MerchantReference","NationalID","ClearingNumber","AccountNumber","NameAndAddressLine1","NameAndAddressLine2","NameAndAddressLine3","NameAndAddressLine4","AddressPostalCode","AddressCity","InformationFromPayer"
"197106090001", "197106090001", "6000","310902371","Anders Svensson"","some street 1","Stockholm","11100","Customer number 123"