Download OpenAPI specification:Download
Access to Account API specification
Create a consent session by providing email and permissions.
Consent session response.
Validation of request parameters failed.
The client does not have access rights to the content. This could be caused by many things - an invalid certificate, missing permission or an attempted access to resources that the TPP has no access to. The error message and code should give more context for the cause of the error.
Could not initiate consent session.
{- "email": "sven.svenson@klarna.com",
- "postal_code": "10115",
- "permission": [
- "AIS"
]
}
{- "id": "04d2bd77-f310-4c45-b435-a0bb588697ef",
- "status": "AWAITING_APPROVAL",
- "consent_id": "null"
}
Get the status of a consent session.
Consent session response.
Validation of request parameters failed.
Authorization information is missing or invalid.
The client does not have access rights to the content.
Could not get consent session.
curl -i -X GET \ 'https://api.klarna.com/v2/consent-sessions/{consent_session_id}' \ -H 'X-Request-ID: string'
{- "id": "04d2bd77-f310-4c45-b435-a0bb588697ef",
- "status": "APPROVED",
- "consent_id": "06e11107-c9c1-466a-b686-2223161692d0"
}
Get the list of accounts of a given user.
Accounts response.
Validation of request parameters failed.
Authorization information is missing or invalid.
The client does not have access rights to the content.
Could not get accounts.
curl -i -X GET \ https://api.klarna.com/v2/accounts \ -H 'X-Request-ID: string' \ -H 'consent-id: string'
{- "accounts": [
- {
- "id": "135d9376-b529-44f1-b5a4-bc54f54c9785",
- "type": "CURRENT",
- "account_holder_id": "c11ee70f-0769-4a73-9c7c-1b000b3d8756",
- "account_number": "null",
- "iban": "DE2635638985986393786474",
- "bic": "KLRNDEBE",
- "holder_name": "Sven Svenson",
- "holder_address": "Chausseestraße 117, Berlin",
- "bank_name": "Bank Name",
- "bank_address": "Chausseestraße 117, Berlin",
- "sort_code": "10010300",
- "balance": {
- "amount": 4000,
- "currency": "EUR"
}
}
]
}
Get the account details of a given account.
Account response.
Validation of request parameters failed.
Authorization information is missing or invalid.
The client does not have access rights to the content.
Could not get account.
curl -i -X GET \ 'https://api.klarna.com/v2/accounts/{account_id}' \ -H 'X-Request-ID: string' \ -H 'consent-id: string'
{- "id": "135d9376-b529-44f1-b5a4-bc54f54c9785",
- "type": "CURRENT",
- "account_holder_id": "c11ee70f-0769-4a73-9c7c-1b000b3d8756",
- "account_number": "null",
- "iban": "DE2635638985986393786474",
- "bic": "KLRNDEBE",
- "holder_name": "Sven Svenson",
- "holder_address": "Chausseestraße 117, Berlin",
- "bank_name": "Bank Name",
- "bank_address": "Chausseestraße 117, Berlin",
- "sort_code": "10010300",
- "balance": {
- "amount": 4000,
- "currency": "EUR"
}
}
Get the account balance for a given account.
Account balance response.
Validation of request parameters failed.
Authorization information is missing or invalid.
The client does not have access rights to the content.
Could not get account balance.
curl -i -X GET \ 'https://api.klarna.com/v2/accounts/{account_id}/balance' \ -H 'X-Request-ID: string' \ -H 'consent-id: string'
{- "amount": 4000,
- "currency": "EUR"
}
Get the transactions for a given account.
Paginated transactions response.
Validation of request parameters failed.
Authorization information is missing or invalid.
The client does not have access rights to the content.
Could not get account transactions.
curl -i -X GET \ 'https://api.klarna.com/v2/accounts/{account_id}/transactions?start_at=string&end_at=string&page_number=0&page_size=20' \ -H 'X-Request-ID: string' \ -H 'consent-id: string'
{- "account_id": "66d3b648-f5f4-414e-8a3d-5fb6e1a6d05c",
- "transactions": [
- {
- "id": "3d20a6d3-1d21-4560-bb3b-cf9f4912d65c",
- "amount": {
- "amount": 4000,
- "currency": "EUR"
}, - "balance_after_transaction": {
- "amount": 4000,
- "currency": "EUR"
}, - "incomplete": false,
- "created_at": "2020-09-15T08:03:10.273Z",
- "status": "COMPLETED",
- "transaction_details": {
- "type": "OUTGOING_TRANSACTION",
- "iban": "DE89370400440532013000",
- "bic": "NTSBDEB1XXX",
- "is_atm_withdrawal": false,
- "merchant_amount": {
- "amount": 4000,
- "currency": "EUR"
}, - "merchant_name": "Zara Fashion",
- "merchant_country": "DEU",
- "merchant_city": "Berlin",
- "merchant_category_code": "5411",
- "foreign_exchange_rate": 1,
- "sepa_transaction_type": "DIRECT_DEBIT"
}, - "other_party": "Max Mustermann",
- "reference_text": "reference"
}
], - "page_info": {
- "page_number": 0,
- "page_size": 0,
- "total_elements": 0,
- "total_pages": 0
}
}
Confirm of the available funds for an amount and a given email in a given currency.
Fund confirmation response.
The requested account has a different currency.
Account not approved for the consent-id.
The requested account does not exist.
{- "amount": 300,
- "currency": "EUR",
- "email": "sven.svenson@klarna.com"
}
{- "result": true
}
Initiate a standard or standing order payment.
Initiated payment response.
Validation of request parameters failed.
Authorization information is missing or invalid.
The client does not have access rights to the content.
Could not initiate payment.
{- "amount": 5000,
- "currency": "EUR",
- "email": "sven.svenson@klarna.com",
- "postal_code": "10115",
- "reference": "Reference",
- "to": {
- "iban": "SE2635638985986393786474",
- "bic": "KLRNSESSXXX",
- "recipient_name": "Sven Svenson"
}, - "standing_order": {
- "start_date": "2020-06-12",
- "end_date": "2020-10-12",
- "frequency": "MONTHLY"
}
}
{- "id": "60e5d557-964c-43ab-a19f-0c7d29bd9d84",
- "status": "AWAITING_APPROVAL"
}
Get the payment details of a given payment.
Payment response.
Validation of request parameters failed.
Authorization information is missing or invalid.
The client does not have access rights to the content.
Could not find payment.
curl -i -X GET \ 'https://api.klarna.com/v2/payments/{payment_id}' \ -H 'X-Request-ID: string'
{- "id": "60e5d557-964c-43ab-a19f-0c7d29bd9d84",
- "status": "APPROVED",
- "sender_details": {
- "name": "Sven Svenson",
- "iban": "SE2635638985986393786474"
}
}
This will only revoke payments with status AWAITING_APPROVAL
Success
Validation of request parameters failed.
Authorization information is missing or invalid.
The client does not have access rights to the content.
Could not find payment.
curl -i -X DELETE \ 'https://api.klarna.com/v2/payments/{payment_id}' \ -H 'X-Request-ID: string'