Provide Transactions

This endpoint will store consumer data, which is needed to generate reports later. Most reports need a transaction history to work with. This endpoint must be used in case a report should be generated from sources other than Open banking. by Klarna. Any existing list of transactions can be provided and will be used by the report engine.

URL and Request Body Structure of a Provide Transactions call

POST /insights/v1/transactions/save HTTP/1.1
Content-Type: application/json; charset=utf-8
Authorization: Bearer <Token>
Host: <Host>
{
    "insights_consumer_id": ?string,
    "data_retention_minutes": ?int,
    "account": ?ProvideTransactionAccount,
    "transactions": Array<ProvidedTransactions>
}

insights_consumer_id String, optional

Data provided with this call will be stored with this insights_consumer_id, so later reports can be generated using only data for this consumer. If left empty, a new identifier will be generated and returned in the response to this call.

data_retention_minutes int, optional

Depending on the use-case, it might be helpful to store transactions (maybe consolidate transactions for a single consumer from different sources) for some minutes. With the data_retention_minutes this can be determined. If left empty, the default value of 10 minutes will be used.

account ProvideTransactionAccount, optional

The account parameter limits the report to include data from this account.

transactions ProvidedTransactions[], required

The list of transactions to be used for report-generation.

ProvideTransactionAccount

{
    "insights_account_id" : ?string,
    "account_number": ?string,
    "iban": ?string,
    "bank_code": ?string,
    "bic": ?string,
    "holder_name": ?string,
    "holder_address" : ?ProvidedTransactionAddressData
}

insights_account_id String, optional

The UUID generated by Account Insights which represents this account.

account_number String, optional

The account number of the consumer account.

iban String, optional

The IBAN of the consumer account.

bank_code String, optional

The bank code of the consumer's bank.

bic String, optional

The BIC of the consumer's bank.

holder_name String, optional

The account holder's name.

holder_address ProvidedTransactionAddressData, optional

The account holder's address, for details see here.

ProvidedTransactionAddressData

{
    "country": ?string
}

country String, optional

The country code in the ISO 3166-1 alpha-2 format.

ProvidedTransaction

{
    "reference": ?string,
    "date": ?Date,
    "amount" : ?Amount,
    "counter_party": ?ProvidedTransactionCounterPartyAccount
}

reference String, optional

The reference for the transaction.

date Date (String: "YYYY-MM-DD"), optional

The date on which the transaction was booked or the value date if it is a pending transaction.

amount Amount, optional

The amount of the transaction.

counter_party ProvidedTransactionCounterPartyAccount, optional

The account info of the other party involved in the transaction.

ProvidedTransactionCounterPartyAccount

{
    "account_number": ?string,
    "iban": ?string,
    "bank_code": ?string,
    "bic": ?string,
    "holder_name": ?string,
    "holder_address" : ?ProvidedTransactionAddressData
}

account_number String, optional

The account number of the consumer account.

iban String, optional

The IBAN of the consumer account.

bank_code String, optional

The bank code of the consumer's bank.

bic String, optional

The BIC of the consumer's bank.

holder_name String, optional

The account holder's name.

holder_address ProvidedTransactionAddressData, optional

The account holder's address, for details see here.

Response Structure of ProvideTransactions

{
    "data": {
        "insights_consumer_id" : string,
        "insights_account_id" : string
        }
    }
}

data.insights_consumer_id String, always present

The retrieved data was stored with this insights_consumer_id. It can be used to identified this consumer when generating a report later.

data.insights_account_id String, always present

Since consumers could have multiple accounts, using this insights_account_id makes it possible to identify a specific account when generating any insight report.

results matching ""

    No results matching ""