Skip to main content

Report API (2.0)

Download OpenAPI specification:Download

The Report API provides data for payments for accounting purposes.

For detailed information about payments, the payment API (such as the eCom, ePayment API or Recurring API) should be used.

This API is primarily for accounting partners who will use the API to integrate with their accounting systems, allowing them to provide the accounting information to their merchants.

For details, see the Report API Guide.

/settlement/v1

Get ledgers

Returns the ledgers you have access to.

If you are integrating a single merchant it may be enough to hit this endpoint once manually to identify the ledgerId, and then put that in your configuration. If you are integrating for an accounting system or similar, you should call this endpoint periodically in order to synchronize the list of ledgers you have access to.

There is no need to specify the merchant or sales unit. The response contains all ledgers that are available for the API keys used.

The settlesForRecipientHandles part of the response looks a bit different for ePayment/eCom sales units and Vippsnummer/MyShop. For ePayment and eCom it looks like this:

{
  "settlesForRecipientHandles": [ "api:123455" ]
}

while for a Vippsnummer and MyShop (VM-number) you will get:

{
  "settlesForRecipientHandles": [ "NO:123455" ]
}

It is possible to have merchant configurations where settlements for more than one ePayment MSN in the same settlements, in this case the list has more than one element. This is not a typical configuration and for the majority merchants the lists above only has one element.

The full response example below displays the ePayment and eCom case.

query Parameters
settlesForRecipientHandles
string
Example: settlesForRecipientHandles=api:123456

Filters for ledgers that settles for the given settlesForRecipientHandle.

cursor
string
Example: cursor=eyJhZnRlckxlZGdlcklkIjoieHh4eCIsInNldHRsZXNGb3JSZWNpcGllbnRIYW5kbGVzIjpudWxsfQ==

We limit the amount of rows returned to reduce the amount of data we need to process on each request. If the total number of rows is greater than that amount we return a cursor in addition to the rows in the body. This cursor given can be used with this parameter to fetch the next set of ledgers. If this is used, no other parameters is needed.

header Parameters
Authorization
required
string
Example: eyJ0eXAiOiJKV1QiLCJhbGciOiJSUzI1Ni <truncated>

The access token is a base64-encoded string that is required for all API calls. It is a JWT (JSON Web Token). The access token is fetched from the POST:/accesstoken/get endpoint. It is valid for 1 hour in the test environment and 24 hours in the production environment.

Vipps-System-Name
string <= 30 characters
Example: woocommerce

The name of the ecommerce solution. One word in lowercase letters is good. See HTTP headers.

Vipps-System-Version
string <= 30 characters
Example: 5.4.0

The version number of the ecommerce solution. See HTTP headers.

Vipps-System-Plugin-Name
string <= 30 characters
Example: vipps-woocommerce

The name of the ecommerce plugin (if applicable). One word in lowercase letters is good. See HTTP headers.

Vipps-System-Plugin-Version
string <= 30 characters
Example: 1.2.1

The version number of the ecommerce plugin (if applicable). See HTTP headers.

Responses

Response samples

Content type
application/json
{
  • "cursor": "eyJhZnRlckxlZGdlcklkIjoie",
  • "items": [
    ]
}

/report/v2/ledgers

Fetch report by date

Complete report of entries on an account for a given "ledger date". A "ledger date" normally lasts from midnight to midnight in the timezone of the merchant; but it can be configured to other cutoffs such as 04:00 to 04:00. The caller should periodically poll for a report for the next date to download, and interpret HTTP 404 as a signal to try again later. You can get two different types of ledgers with this endpoint. The funds ledger, which tracks the sales, refunds, and a total of fees for the time period, and the fees ledger, which provides details about the fees you have been charged.

path Parameters
ledgerId
required
string

Ledger ID provided by GET:/settlement/v1/ledgers.

ledgerDate
required
string^\d{4}-\d{2}-\d{2}

Date in format YYYY-MM-DD.

topic
required
string
Enum: "funds" "fees"

funds provides the funds ledger which tracks the sales, refunds, and a total of fees for the time period. fees provides the fees ledger with details about the fees you have been charged.

query Parameters
cursor
string
Example: cursor=eyJhZnRlckxlZGdlcklkIjoie <truncated>

We limit the amount of rows returned to reduce the amount of data we need to process on each request. If the total number of rows is greater than that amount we return a cursor in addition to the rows in the body. This cursor given can be used with this parameter to fetch the next set of ledgers. If this is used, no other parameters is needed.

includeGDPRSensitiveData
boolean
Example: includeGDPRSensitiveData=true

When set to true, the funds and fees endpoints return the text that the user entered, name, and masked phone number for in-person payments (like Vippsnummer and MyShop). See GDPR data.

header Parameters
Vipps-System-Name
string <= 30 characters
Example: woocommerce

The name of the ecommerce solution. One word in lowercase letters is good. See HTTP headers.

Vipps-System-Version
string <= 30 characters
Example: 5.4.0

The version number of the ecommerce solution. See HTTP headers.

Vipps-System-Plugin-Name
string <= 30 characters
Example: vipps-woocommerce

The name of the ecommerce plugin (if applicable). One word in lowercase letters is good. See HTTP headers.

Vipps-System-Plugin-Version
string <= 30 characters
Example: 1.2.1

The version number of the ecommerce plugin (if applicable). See HTTP headers.

Responses

Response samples

Content type
application/json
{
  • "cursor": "eyJhZnRlckxlZGdlcklkIjoie",
  • "hasMore": false,
  • "tryLater": false,
  • "items": [
    ]
}

Fetch report by feed

Continuous stream of data. Upon reaching the end of the feed, the cursor will not become empty and items can become an empty list. One should retry to fetch the same cursor until new data and a new cursor will be returned. Unless in the need of data with low latency try not to poll the endpoint too often and effectively batch your reports.

path Parameters
ledgerId
required
string

Ledger ID provided by GET:/settlement/v1/ledgers

topic
required
string
Enum: "funds" "fees"

One of funds, fees

query Parameters
cursor
string
Example: cursor=eyJhZnRlckxlZGdlcklkIjoie <truncated>

We limit the amount of rows returned to reduce the amount of data we need to process on each request. If the total number of rows is greater than that amount we return a cursor in addition to the rows in the body. This cursor given can be used with this parameter to fetch the next set of ledgers. If this is used, no other parameters is needed.

includeGDPRSensitiveData
boolean
Example: includeGDPRSensitiveData=true

When set to true, the funds and fees endpoints return the text that the user entered, name, and masked phone number for in-person payments (like Vippsnummer and MyShop). See GDPR data.

header Parameters
Vipps-System-Name
string <= 30 characters
Example: woocommerce

The name of the ecommerce solution. One word in lowercase letters is good. See HTTP headers.

Vipps-System-Version
string <= 30 characters
Example: 5.4.0

The version number of the ecommerce solution. See HTTP headers.

Vipps-System-Plugin-Name
string <= 30 characters
Example: vipps-woocommerce

The name of the ecommerce plugin (if applicable). One word in lowercase letters is good. See HTTP headers.

Vipps-System-Plugin-Version
string <= 30 characters
Example: 1.2.1

The version number of the ecommerce plugin (if applicable). See HTTP headers.

Responses

Response samples

Content type
application/json
{
  • "cursor": "eyJhZnRlckxlZGdlcklkIjoie",
  • "hasMore": false,
  • "tryLater": false,
  • "items": [
    ]
}