Klarna

List klarna recurring tokens

The user needs to be logged in to use this endpoint, click here to read more.

Produces a list with Klarna recurring tokens. Only tokens marked as valid are returned.

SecurityAuthorization_Code
Responses
200

OK

Response Schema: application/json
Array of objects
400

Bad Request

429

Too Many Requests

500

Internal Server Error

get/v1/customer/payment/klarna/token
Request samples
Response samples
application/json
{
  • "recurringTokens": [
    ]
}

Add Klarna token

The user needs to be logged in to use this endpoint, click here to read more.

Use the id from the response to complete the adding the card by redirecting the customer to loginServer/payment/klarna/token/add?clientId=…&returnUrl=….&errorUrl=…..&transactionId=12378954. The system will redirect the customer to the proper third-party system for the change, and upon success will then redirect to the given returnUrl. If an system error occurs, the given errorUrl will be used instead.

In addition to return url will be returned the result of operation:

  • finished - if token was registered correctly,
  • cancelled - user cancelled the adding the token, token is not added,
  • failed - it was not possible to create a token, adding of token fails,
  • unknown - unknown status of operation,
  • initiated - creation of token was initiated,
  • error - never shall happen, instead shall go to errorUrl.
SecurityAuthorization_Code
Request
Request Body schema: application/json
required
productCode
required
string

Specific product for the token.

Responses
200

OK

Response Schema: application/json
success
boolean

It informs if the token was added.

  • true: The token was added.
  • false: The token was not added.
transactionId
integer

The transactionId

400

Bad Request

429

Too Many Requests

500

Internal Server Error

post/v1/customer/payment/klarna/token
Request samples
application/json
{
  • "productCode": "CO27409"
}
Response samples
application/json
{
  • "success": true,
  • "transactionId": 12378954
}

Remove Klarna token

The user needs to be logged in to use this endpoint, click here to read more.

This API can be used for removing klarna tokens.

SecurityAuthorization_Code
Request
Request Body schema: application/json
required
token
required
string <= 128 characters

Token that shall be marked as deleted.

paymentProviderId
required
integer

Payment provider id for token.

Responses
200

OK

Response Schema: application/json
success
boolean

Informs if token is marked as deleted.

  • true: The token marked as deleted.
  • false: The token may not be marked as deleted.
400

Bad Request

429

Too Many Requests

500

Internal Server Error

patch/v1/customer/payment/klarna/token
Request samples
application/json
{
  • "token": "abcd-efgh",
  • "paymentProviderId": 11
}
Response samples
application/json
{
  • "success": true
}