Duplicate transactions
Less than to read
When a transaction import request is initiated, the Provider API (PAPI) will use the date range of the transactions provided in the transaction file. It’ll then check Banking Service for each bank account in the import and report back the number of transactions in the given range.
This highlights the number of potential duplicate transactions on each day, as a warning (not an error). The user can still confirm the transactions. However, this gives them a chance to address any potential duplicate transactions and remove them from their import file. Or they can proceed to the /confirm endpoint.
Potential duplicate transactions example
Potential duplicate transactions will show on the transaction import object (via GET), in the errorDetails array as ‘warn’.
{
_id: "11111-00000-00000-00000-22222",
companyId: "aaaaa-00000-00000-00000-bbbbb",
organisationId: "ccccc-12345-00000-00000-ddddd",
bankId: "11111-22222-33333-44444-55555",
fileFormat: "CAMT053",
fileName: "april_imports.CAMT053",
fileUploaded: true,
description: "John Doe - Uploading transactions for the last 2 weeks of April 2020",
status: "complete",
dateStyle: "littleEndian",
apiType: "multi",
bankAccounts: [
{
accountIdentifier: "SE376000000000048112451",
id: "1ce96c9c-07ed-418f-a6cb-eefa57c6579a",
transactionSign: "original",
countryCode: "GBR",
bankIdentifier: ""
}
],
statusMonitor: {
pollAttempts: 4,
pollFirstAttempt: "2021-01-21T10:13:22Z"
pollLastAttempt: "2021-01-21T12:25:36Z"
},
s3FilePath: "test/aaaaa-00000-00000-00000-bbbbb/11111-00000-00000-00000-22222",
statement: {
id: "aaaaa-bbbbb-ccccc-ddddd-eeeee",
summary: {
transactionCount: 370,
transactionDebitSum: 2698,
transactionCreditSum: 1675,
transactionRangeStartDate: "2020-02-18T10:13:22Z",
transactionRangeEndDate: "2020-12-23T13:22:19Z",
}
},
errorDetails: [
{
severity: 'warn',
details: {
'2020-03-11': 20,
'2019-01-01': 3
},
code: 'PossibleDuplicatedTransactions',
message: 'One or more transactions matching imported transaction dates were found on your account',
target: 1ce96c9c-07ed-418f-a6cb-eefa57c6579a
}
]
}
In this example, the errorDetails section shows the bank account provided for this transaction import already has 20 transactions on 2020-03-11 and 3 transactions on 2019-01-01. These dates are within the bounds of the uploaded transaction file, and have therefore been output as potential duplicates for the bank account.