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, but it can be useful for troubleshooting. The response contains all ledgers that are available for the API keys used, and also the sales units that use this ledger.

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

query Parameters
settlesForRecipientHandles
string
Example: settlesForRecipientHandles=api:123456

Filters the list of ledgers, and only returns the ledger(s) that settle(s) for the given settlesForRecipientHandle. This can either be an ePayment MSN, prefixed by api: (like api:123456), or a Vippsnummer/MyShop number, prefixed by NO:, DK: or FI: depending on country (like NO:654321).

cursor
string
Example: cursor=eyJhZnRlckxlZGdlcklkIjoieHh4eCIsInNldHRsZXNGb3JSZWNpcGllbnRIYW5kbGVzIjpudWxsfQ==

Responses are limited to a set number of rows. If there are more rows available, a cursor is returned in the response body. Pass that cursor value here to fetch the next set of ledgers. When paginating, no other query parameters are 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). See the Access Token API for details about authentication. It is valid for 1 hour in the test environment and 24 hours in the production environment.

Responses

Response samples

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

/report/v2/ledgers

Fetch report by date

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 new data to download. 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>

Responses are limited to a set number of rows. If there are more rows available, a cursor is returned in the response body. Pass that cursor value here to fetch the next set of entries. When paginating, no other pagination query parameters are needed. If you use includeGDPRSensitiveData=true, include it again on paginated requests.

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
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). See the Access Token API for details about authentication. It is valid for 1 hour in the test environment and 24 hours in the production environment.

Responses

Response samples

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

Fetch report by feed

Continuous stream of data. The response always includes cursor and omits hasMore. Upon reaching the current end of the feed, the cursor will never become empty, but items can become an empty list and tryLater can be true. Retry with the same cursor until new data and a new cursor are returned. Unless you need low-latency data, avoid polling too frequently and batch your requests where possible.

path Parameters
ledgerId
required
string

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

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>

Responses are limited to a set number of rows. A cursor is always returned in the response body. Pass that cursor value here to continue consuming the feed. When paginating, no other pagination query parameters are needed. If you use includeGDPRSensitiveData=true, include it again on paginated requests.

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
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). See the Access Token API for details about authentication. It is valid for 1 hour in the test environment and 24 hours in the production environment.

Responses

Response samples

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