Skip to main content

Reports

Get reconciliation report

Description

Call this endpoint to get Reconciliation report for a specified date.
The report includes the Svea payout to merchant's bank account on a specific date and the transactions included in the payout.
In Production environment, Reports can be send through Email, FTP on a daily basis.

Endpoint

Method: GET
/api/v2/reports?date={Date}&includeWithholding={IncludeWithholding}

Sample Code

Reconciliation Report Example
using Microsoft.Extensions.DependencyInjection;

internal static class GetReport
{
internal static async Task GetReportAsync(string reportDate, bool includeWithholding)
{
var services = new ServiceCollection();
services.AddHttpClient("MyApiClient", client =>
{
client.BaseAddress = new Uri("http://paymentadminapistage.svea.com/api/");
});

var serviceProvider = services.BuildServiceProvider();
var httpClientFactory = serviceProvider.GetRequiredService<IHttpClientFactory>();
var httpClient = httpClientFactory.CreateClient("MyApiClient");

// Add authorization header
Authentication.CreateAuthenticationToken(out string token, out string timestamp);
httpClient.DefaultRequestHeaders.Add("Authorization", token);
httpClient.DefaultRequestHeaders.Add("Timestamp", timestamp);

var apiUrl = string.Format("v2/reports?date={0}&includeWithholding={1}", reportDate, includeWithholding);

try
{
HttpResponseMessage response = await httpClient.GetAsync(apiUrl);

// Check if the request was successful
if (response.IsSuccessStatusCode)
{
string responseData = await response.Content.ReadAsStringAsync();
Console.WriteLine("Response: " + responseData);
}
else
{
Console.WriteLine("Failed to retrieve data. Status code: " + response.StatusCode);
}
}
catch (HttpRequestException ex)
{
Console.WriteLine("Error: " + ex.Message);
}
}
}

Prerequisite

  • Reports activated for the merchant
  • Merchant using Svea Checkout
  • Merchant using Svea as payment facilitator
  • Stage Environment

    • The data in Stage is fake/dummy data.
    • The test orders created won't match with the Report data.
    • Data in stage can be retrieved only for following dates - 2020-03-05, 2020-03-06, 2020-03-07 .

Request parameters

ParameterDescriptionType

Date required

Date for the report in ISO 8601 format. e.g - 2024-01-01String
IncludeWithholding

Specify if the rows with RowType OpeningBalanceDebt and ClosingBalanceDebt should be included in the report data or not.

Boolean

Response

ParameterDescriptionType
TotalNrOfRowsTotal number of rows for all clients.Int
ClientReportsList of clientReports List of ClientReport which contains report rows per client.

Client Report

ParameterDescriptionType
clientIdMerchant IdInt
recipientTaxIdClient’s tax identification number.String
paymentReportPayment Report DetailspaymentReport Object
rowsList of Transactions included in the Reconciliation Report.List of Rows Object
reconciliationDateThe date of processing the Reconciliation Report.Date

Payment Report

ParameterDescriptionType
sveaPaidAmountExcludingWithholdingSvea paid amount excluding Opening balanceLong
sveaPaidAmountIncludingWithholdingSvea paid amount including Opening balanceLong
openingBalanceDebtOpening balanceLong
closingBalanceDebtClosing balance for the dayLong
nominalAmount

Total of Svea Paid Amount from individual Transactions Rows

Long
feeAmountExcludingVatSvea FeesLong
feeVatAmountVat Amount for the Svea FeeLong
numberOfRowsNo of TransactionsLong
currencyCurrency for the MerchantString
vatGroupsList of Svea Fee VAT percentage and AmountList of vatPercent, vatAmount

Rows

ParameterDescriptionType
sveaCustomerIdInternal Customer numberLong
customerNameCustomer NameLong
externalOrderNoOrder Number for the transaction in Merchant systemLong
orderDateOrder date of the transactionLong
sveaOrderNoSvea Order-ID for the OrderLong
sveaCheckoutId

Checkout OrderId for the Order , if the Order was created through Svea Checkout

Long
nominalAmountOrder AmountLong
sveaPaidAmountOrder Amount - Svea FeeLong
totalFeeAmountExcludingVatSvea Fee excluding VATLong
totalFeeVatAmountSvea Fee AmountLong
paymentTypePayment method of the transactionString
currencyCurrency for the transactionString
destinationCurrency
exchangeRate
commentAny comments about the transactionString
deliveryIdDeliveryId for the transactionString
creditId

If the transaction is a credit , the field will have the creditId.

String
rowTypeList of RowType
feesFee TypeList of Fees
reconciliationDateReconciliation report Date.Date

RowType

List of Rowtype
DebtPayment
ManualKickback
ManualRegression
ClosingBalanceDebt
OpeningBalanceDebt
BoughtAdminInvoice
ManualWitholding
Interest
Purchase
Fee
Manual
SveaFee
ManualBalanceDebt
Regression
ManualCredit
Credit
ManualOrder
SveaInvoice
CreatedInvoice
ManualDeposit
ManualChargeback
Kickback

Fees

List of Fees
Deviation
Reminder
Correction
DueDate
Admin
Kickback
Deposit
Service
Interest
Reminder
LegalAction
Credit
Collection
Postage
Dismissed

Response Code

CodeHttpStatusCodeDescription
200SuccessReconciliation report retrieved.
404Not FoundReport not generated.
400BadRequest
Reason:
  • Date not in correct format.
  • Date is today or later.
  • Report not activated for client(s).
403ForbiddenMerchant is not authorized to retrieve information.
401UnauthorizedMerchant is not authorized to retrieve information.