Skip to Content
API OverviewAccounts

Accounts API

The Accounts API allows Third Party Providers (TPPs) to access account information on behalf of authorized users. This API requires the PSP_AI (Account Information) scope.

Capabilities

List Accounts

Retrieve a list of all accounts accessible to the authenticated user.

GET /accounts

Each account includes:

FieldRequiredDescription
idYesUnique account identifier used in other API calls
nameYesHuman-readable account name
currencyYesAccount currency (ISO 4217 alpha-3, e.g., DKK, SEK, NOK)
bbanYesNational Basic Bank Account Number
ibanNoInternational Bank Account Number
swiftNoSWIFT/BIC code
balanceAmountYesCurrent account balance
balanceReservedAmountYesAmount reserved for pending transactions
balanceAvailableAmountYesAvailable spending amount (balance + credit limit - reserved)
creditLimitAmountNoAuthorized credit limit (if applicable)
typeYesAccount type (only CHECKING accounts are available via PSD2)
supportsPaymentsYesWhether payments can be initiated from this account
supportsTransfersYesWhether credit transfers can be initiated from this account
ownerNameNoFull name of the account owner

Only checking accounts are exposed through the Open Banking API. Savings accounts and other account types are not accessible.

List Transactions

Retrieve transaction history for a specific account.

GET /accounts/{accountId}/transactions

Query Parameters

ParameterTypeDescription
limitnumberMaximum transactions to return (max 500, default 100)
offsetnumberPagination offset for retrieving additional pages
fromdatetimeInclude only transactions after this ISO-8601 timestamp
todatetimeInclude only transactions before this ISO-8601 timestamp

If you send a date without a time component (e.g., 2025-01-01), it defaults to 2025-01-01T12:00:00.000.

Response Structure

The response is a TransactionsResponse wrapper object:

FieldTypeDescription
offsetnumberThe offset used in pagination
limitnumberThe limit requested
fromdatetimeThe from date requested (if any)
todatetimeThe to date requested (if any)
transactionsTransaction[]Array of transaction objects

The offset is the amount of transactions “skipped”, if you have 10 transactions, and limit is 10 and you have offset 1 you get the last 9 transactions.

Transaction Properties

Each transaction includes:

FieldDescription
idUnique transaction identifier
transactionTimeISO-8601 timestamp when the transaction was initiated (e.g., the moment a card was swiped or a transfer was created). Present on all transactions including pending ones
postingTimeISO-8601 timestamp when the transaction was settled and funds were moved on the account. null for pending/authorized transactions that have not yet settled
billingAmountAmount object ({ amount, currency }) — the actual billed amount in the account’s currency
transactionAmountAmount object ({ amount, currency }) — the original transaction amount (may differ for foreign currency). Can be null in cases where the payment was never reserved on the account
currencyExchangeCurrencyExchange object with currency (string), targetCurrency (string), and exchangeRate (number)
titleTransaction description
typeTransaction type: dkPaymentSlip, domesticCreditTransfer, card, direct-debit, or unknown
domesticCreditTransferInfoObject with recipientBBAN (string, BBAN of the recipient, 11-14 chars) and message (string, optional). Present for domestic credit transfer transactions
cardTransactionInfoObject with merchantName (string) and merchantCategoryCode (number). Present for card transactions
statusStatus: future, financial, authorization, interim, failed_authorization, declined, initiated, or unknown
accountIdParent account identifier

Transactions are returned with negative amounts for debits and positive amounts for credits.

Billing amount vs. transaction amount

A transaction carries two amount fields:

  • transactionAmount — the amount in the original currency of the payment (e.g., EUR 20 for a purchase at a European shop). Can be null in some special cases for example when the payment was never reserved on the account, such as certain direct settlements.
  • billingAmount — the amount that was actually posted to the account, in the currency of the posting. For foreign-currency transactions this is the converted amount after exchange.

When both currencies are the same, the two values will match. When they differ, the currencyExchange object provides the conversion details.

Always prefer billingAmount — it is the authoritative figure for balance calculations and represents what actually entered or left the account.

Example: A card payment made for 20 EUR:

{ "billingAmount": { "amount": -149.0, "currency": "DKK" }, "transactionAmount": { "amount": -20.0, "currency": "EUR" }, "currencyExchange": { "currency": "EUR", "targetCurrency": "DKK", "exchangeRate": 7.45 } }
Mapping properties for transaction fields

Here is a mapping of our statuses, to codes of the ISO 20022 data table:

Lunar StatusClosest ISO 20022Rationale
initiatedRCVD / PDNGTransaction received/pending
authorizationACTC / PDNGAwaiting authorization
interimACSPIn process, not yet settled
financialACSC / ACCCSettled/completed
futurePDNGScheduled for a future date
failed_authorizationRJCTAuthorization failed
declinedRJCTRejected
unknownA fault that isn’t described above, contact Lunar

Mapping to NextGenPSD2 (Berlin Group) fields:

Lunar uses transactionTime and postingTime as full ISO-8601 timestamps. The NextGenPSD2 spec uses bookingDate, valueDate, and transactionDate as date-only (ISODate) fields. The mapping between them depends on the transaction status:

bookingDate“The date when an entry is posted to an account on the ASPSP’s books.”

  • Maps to postingTime. Both represent when the transaction was recorded on the account.
  • null for pending transactions, just as bookingDate is absent for pending entries in NextGen.

valueDate“The date at which assets become available to the account owner in case of a credit, or cease to be available in case of a debit. If entry status is pending, refers to an expected/requested value date.”

  • For settled transactions (financial status): maps to postingTime. Lunar does not distinguish between the booking date and the value date — settlement, booking, and funds availability happen at the same time.
  • For future/scheduled transactions (future status): maps to transactionTime, which holds the scheduled execution date — equivalent to the “expected/requested value date” in NextGen.
  • For other pending transactions (authorization, interim, initiated): Lunar does not expose an expected value date. There is no direct equivalent.

transactionDate (NextGen card transactions only)“Date of the actual card transaction.”

  • Maps to transactionTime. Both represent when the transaction was initiated (e.g., the moment a card was swiped or a transfer was created).

    Reconciliation guidance:

  • Use postingTime for matching against bank statements and cash-flow reconciliation — this is when the account balance actually changed. It corresponds to bookingDate in NextGenPSD2.

  • Use transactionTime to determine when the transaction was initiated, e.g., for dispute timelines or user-facing activity logs.

  • For pending transactions (authorization, interim, initiated), only transactionTime is available. postingTime is populated once the transaction reaches financial status.

  • For future/scheduled transactions, transactionTime represents the expected execution date and can be used as an anticipated settlement date.

Get Transaction by ID

Retrieve a single transaction by its identifier.

GET /accounts/{accountId}/transactions/{transactionId}

Path Parameters

ParameterTypeDescription
accountIdstringThe account identifier
transactionIdstringThe transaction identifier

Headers

HeaderRequiredDescription
X-LanguageNoLanguage preference

Returns a single Transaction object (same structure as in the list endpoint).

Funds Confirmation

Check whether a specific amount is available in an account. This is useful before initiating a payment to ensure it won’t fail due to insufficient funds.

GET /funds-confirmation

Request Body

{ "accountId": "account-uuid", "amount": 100.0, "currency": "DKK" }

Response

{ "fundsAvailable": true }

Funds confirmation requires the PSP_PI (Payment Initiation) scope, not PSP_AI.

Required Scopes

EndpointRequired Scope
GET /accountsPSP_AI
GET /accounts/{accountId}/transactionsPSP_AI
GET /accounts/{accountId}/transactions/{transactionId}PSP_AI
GET /funds-confirmationPSP_PI

Error Handling

Each endpoint defines its own set of error responses:

Endpoint400404500
GET /accounts
GET /accounts/{accountId}/transactions
GET /accounts/{accountId}/transactions/{transactionId}
GET /funds-confirmation
StatusDescription
400Invalid request parameters
404Resource not found
500Internal server error

Error responses include an errorCode and message for debugging.

Last updated on