Klarna Payments

REST API

Klarna Payments offers 3 payment options:

Klarna takes full credit and fraud risk and guarantees payments.

Klarna accepts only physical persons as consumers.
Countries and Currencies

Countries

Austria, Denmark, Finland, Germany, Netherlands, Norway, Sweden, Switzerland, UK

Currencies

CHF, DKK, EUR, GBP, NOK, SEK

Product Availability
Country Available Payment Options

Austria

Pay now, Pay later

Denmark

Pay now, Pay later, Financing (Slice it)

Finland

Pay now, Pay later, Financing (Slice it)

Germany

Pay now, Pay later, Financing (Slice it)

Netherlands

Pay now, Pay later

Norway

Pay now, Pay later, Financing (Slice it)

Sweden

Pay now, Pay later, Financing (Slice it)

Switzerland

Pay now, Pay later

UK

Pay now, Pay later, Financing (Slice it)

Supported Country/Currency/Locale Combinations
Country of Consumer’s Address Currency Locale

AT

EUR

de-at, en-at

CH

CHF

de-ch, fr-ch, it-ch, en-ch

DK

DKK

da-dk, en-dk

DE

EUR

de-de, en-de

FI

EUR

fi-fi, sv-fi, en-fi

GB

GBP

en-gb

NL

EUR

nl-nl, en-nl

NO

NOK

nb-no, en-no

SE

SEK

sv-se, en-se

Communication Formats

This table illustrates how Klarna Pay Now, Pay Later and Financing (Slice it) notifications are encoded and which formats and methods can be used for requests and responses.

Requests/Responses

Format

XML, JSON

Methods

POST, GET

IPN Encodement

Please follow the instructions given at Instant Payment Notification to set up IPN.

Test Credentials

URLs (Endpoints)

for transaction type authorization

https://api-test.wirecard.com/engine/rest/paymentmethods/

for transaction types

  • adjust-authorization

  • void-authorization

  • capture-authorization

  • refund-capture

https://api-test.wirecard.com/engine/rest/payments/

Merchant Account ID (MAID)

f570c123-62f1-4a0d-8688-d999a05d50d4

Username

16390-testing

Password

3!3013=D3fD8X7

Secret Key

0fb50d2c-8ab5-4d53-ac69-b707b1319148

Transaction Types

Transaction types available for Klarna Pay now, Pay later, Financing (Slice it):

Transaction Type Description Link to Fields/Samples

authorization

Performs an order risk check and an order reservation. Once an order is reserved, the payment is guaranteed.

authorization fields
authorization samples

adjust-authorization

Updates/adds additional information to a preceding authorization. You can only adjust authorizations that have not yet been captured.

adjust‑authorization fields
adjust‑authorization samples

void-authorization

Cancels a total order amount or a partial order amount that has not been captured before. Once canceled, no further operations on the order are possible.

void‑authorization fields
void‑authorization samples

capture-authorization

Full or partial capture of a reserved order. Once captured, the invoice is generated and sent to the consumer. Klarna pays the order amount to you according to the agreed billing period.

capture‑authorization fields
capture‑authorization samples

refund-capture

Full or partial refund of a captured order amount.

refund‑capture fields
refund‑capture samples

authorization/pending-authorization

Klarna performs a risk check before accepting an order.

Furthermore, Klarna flags some orders for additional review and transmits fraud_status pending to Wirecard Payment Gateway. For this status, Wirecard Payment Gateway uses the transaction type pending-authorization and creates the final authorization transaction once Klarna has completed this additional risk check.

If Klarna accepts the order, it guarantees the payment once the authorized amount is captured.

authorization/pending-authorization Workflow
Klarnav2 workflow authorization
  1. Consumer checks out products.

  2. → Send an authorization request to Wirecard Payment Gateway. This request must contain order data (e.g. amount, order number, order items), consumer data (e.g. name, billing and shipping address, client IP address).

  3. Wirecard Payment Gateway forwards the request to Klarna.

  4. Klarna creates a session token and sends it to Wirecard Payment Gateway.

  5. Wirecard Payment Gateway creates a pending-authorization transaction.

  6. Klarna performs a basic risk check:

    • If Klarna accepts the order, it guarantees the payment once the authorization has been captured.

    • If Klarna does not accept the order, the authorization is rejected with a corresponding error code.

    • In some cases, Klarna performs an advanced risk check.

  7. Wirecard Payment Gateway forwards the risk check result (with the corresponding status code) to you:

    • Basic risk check ok:
      Wirecard Payment Gateway sends you an authorization success response and an Instant Payment Notification (IPN).

    • Basic risk check failed:
      Wirecard Payment Gateway sends you an authorization failure response and an IPN.

    • Advanced risk check necessary:
      The authorization is pending during the advanced risk check. The payment cannot be immediately authorized. Wirecard Payment Gateway sends you a pending-authorization response and an IPN.

  8. → Inform your consumer on the payment process outcome.

  9. If Klarna performs an advanced risk check:

    9.1 Klarna sends the advanced risk check result to Wirecard Payment Gateway.
    9.2 Wirecard Payment Gateway processes the advanced risk check result and sends you an authorization response and an IPN.

    Wirecard Payment Gateway retrieves the risk check result every 2 hours.

    If you do not receive an IPN after 26 hours (e.g. due to a technical error), you can check the status of a pending-authorization by using the feature Retrieve Transaction by Request ID.

    • If the advanced risk has been completed, Wirecard Payment Gateway returns the new authorization transaction with the response.

    • Otherwise, Wirecard Payment Gateway returns the HTTP code 404. Please contact Wirecard Merchant Support

    9.3 → Inform your consumer on the payment process outcome.

authorization/pending-authorization Fields

Fields can be mandatory (M) or optional (O).

Field Request Response Data Type Size Description

merchant-account-id

M

M

Alphanumeric

36

A unique identifier assigned to every merchant account (by Wirecard).

request-id

M

M

Alphanumeric

150

A unique identifier assigned by the merchant to each request. Used when searching for or referencing it later.

As the request ID must be unique, {{$guid}} serves as a placeholder; Postman uses it to generate a random request-id for testing.

Allowed characters: [a-z0-9-\_].

transaction-type

M

M

Alphanumeric

30

The requested transaction type. Set this field to authorization.

requested-amount

M

M

Numeric

18,3

Total order amount to be reserved. The number of decimal places depends on the currency.
The requested amount must be equal to the amount sum of all order items.

Use , (comma) as separator.

requested-amount@currency

M

M

Alphanumeric

3

The currency of the requested/contested transaction amount.
Format: 3-character abbreviation according to ISO 4217.

payment-methods.
payment-method@name

M

M

Alphanumeric

15

The name of the payment method used for the transaction.

Possible values:

  • klarna-finance for payment in installments (Financing/Slice it)

  • klarna-debit for Klarna direct debit (Pay now)

  • klarna-transfer for Klarna bank transfer (Pay now)

  • klarna-paylater for Klarna payment on invoive (Pay later)

order-number

O

O

Alphanumeric

255

Order number of the merchant.
If set, it shows as "order number" on Klarna's payment confirmation page.

locale

M

M

Alphanumeric

5

A 5-letter code which indicates what language the payment page is rendered in (RFC 1766).

transaction-id

-

M

Alphanumeric

36

A unique identifier assigned for every transaction. Generated by Wirecard. Used when searching for or referencing it later.

transaction-state

-

M

Alphanumeric

12

Transaction status.
Possible values:

  • success

  • failed

completion-time-stamp

-

M

DateTime

The timestamp documents the time and date when the transaction was completed.

notifications.
notification-url

O

O

Alphanumeric

256

The URL to which Wirecard Payment Gateway sends an Instant Payment Notification (IPN) for pending reservations or the transaction outcome. It overwrites the notification URL that is set up in your merchant configuration.

account-holder.

Contains consumer data.

date-of-birth

O

O

Date

Consumer’s date of birth.
Format: Klarna accepts only dd-MM-YYYY or YYYY-MM-dd.
If you provide a different format, Klarna prompts the consumer to enter their birth date during the payment process.

first-name

O

O

Alphanumeric

32

Consumer’s first name.

last-name

O

O

Alphanumeric

32

Consumer’s last name.

email

O

O

Alphanumeric

64

Consumer’s email address.

gender

O

O

Alphanumeric

1

Consumer’s gender.

phone

O

O

Alphanumeric

32

Consumer’s phone number.
Phone numbers need to be validated. Click here for details.

account-holder.address.

Consumer’s address.

street1

O

O

Alphanumeric

128

Street of the consumer’s address.

street2

O

O

Alphanumeric

128

House number of the consumer’s address.

city

O

O

Alphanumeric

32

City of the consumer’s address.

country

M

M

Alphanumeric

3

Country code of the consumer’s address.

postal-code

O

O

Alphanumeric

16

Postal/ZIP code of the consumer’s address.

shipping.

Consumer’s shipping information.

first-name

O

O

Alphanumeric

32

Recipient’s first name.

last-name

O

O

Alphanumeric

32

Recipient’s last name.

email

O

O

Alphanumeric

64

Recipient’s email address.

phone

O

O

Alphanumeric

32

Recipient’s phone number.
Phone numbers need to be validated. Click here for details.

shipping.address.

Consumer’s shipping address.

street1

O

O

Alphanumeric

128

Street of the recipient’s address.

street2

O

O

Alphanumeric

128

House number of the recipient’s address.

house-extension

O

O

Alphanumeric

32

House extension of the recipient’s address.

city

O

O

Alphanumeric

32

City of the recipient’s address.

country

O

O

Alphanumeric

3

Country code of the recipient’s address.

postal-code

O

O

Alphanumeric

16

Postal/ZIP code of the recipient’s address.

order-items.order-item.

Description of a specific order item.

quantity

M

M

Numeric

n/a

Total number of this item in the shopping basket.

description

O

O

Alphanumeric

1024

Description of the item in the shopping basket.

article-number

O

O

Alphanumeric

256

EAN or other merchant-side article identifier.

name

M

M

Alphanumeric

256

Name of the item in the shopping basket.

amount

M

M

Numeric

18,3

Item’s price per unit.

Use , (comma) as separator.

amount@currency

M

M

Alphanumeric

3

Currency of this item’s price. Must match the order currency (requested amount currency).
Format: 3-character abbreviation according to ISO 4217.

tax-rate

O

O

Numeric

5,2

Item’s tax rate per unit in percent.
M if tax-amount is specified.

tax-amount

O

O

Numeric

5,2

Item’s tax value per unit.
M if tax-rate is specified.

discount

O

O

Numeric

18,3

The discount value for one order item.
Use , (comma) as separator.

type

O

O

Alphanumeric

n/a

Order item type.
Possible values:

  • shipment_fee

  • handling_fee

  • discount

  • physical

  • sales_tax

  • digital

  • gift_card

  • store_credit

If not specified, type is treated as a regular article.

statuses.status.

Contains information on the status of a specific transaction.

code

-

M

Alphanumeric

12

Transaction status code.

description

-

M

Alphanumeric

256

Transaction status message.

severity

-

M

Alphanumeric

20

The definition of the status message. Possible values:

  • information

  • warning

  • error

@provider-code

-

O

Alphanumeric

34

Original Klarna error code.

@provider-message

-

O

Alphanumeric

Error message to be shown to the consumer as required by Klarna.

@provider-transaction-id

-

O

Alphanumeric

36

Klarna reservation number.

additional-provider-data.provider-data

Contains max. 1 additional data item for Klarna.

request

O

-

Alphanumeric

Content should be an object containing any of the keys and sub objects described in https://developers.klarna.com/api/#payments-api-create-a-new-credit-session serialised to JSON.
E.g.
{"marketplace_seller_info":[{"product_category":"Women''s Fashion","product_name":"Women Sweatshirt"}]}

authorization Samples
authorization Request
<?xml version="1.0" encoding="utf-8" standalone="yes"?>
<payment xmlns="http://www.elastic-payments.com/schema/payment">
    <merchant-account-id>f570c123-62f1-4a0d-8688-d999a05d50d4</merchant-account-id>
    <request-id>{{$guid}}</request-id>
    <transaction-type>authorization</transaction-type>
    <requested-amount currency="EUR">15</requested-amount>
    <account-holder>
        <address>
            <country>DE</country>
        </address>
    </account-holder>
    <order-items>
        <order-item>
            <name>Item 1</name>
            <article-number>1</article-number>
            <amount currency="EUR">20.0</amount>
            <quantity>1</quantity>
        </order-item>
        <order-item>
            <name>Item 5</name>
            <amount currency="EUR">5.0</amount>
            <quantity>1</quantity>
            <type>discount</type>
        </order-item>
    </order-items>
    <payment-methods>
        <payment-method name="klarna-finance"/>
    </payment-methods>
    <locale>en</locale>
    <success-redirect-url>https://demoshop-test.wirecard.com/demoshop/#/success</success-redirect-url>
</payment>
authorization Response
<?xml version="1.0" encoding="UTF-8" standalone="yes"?>
<payment xmlns="http://www.elastic-payments.com/schema/payment">
    <merchant-account-id>f570c123-62f1-4a0d-8688-d999a05d50d4</merchant-account-id>
    <transaction-id>e0c56c7a-69a1-4dd0-bb38-de68c83d4af0</transaction-id>
    <request-id>da11b5a8-db5f-4c81-a5f9-0e5b9a70f845</request-id>
    <transaction-type>authorization</transaction-type>
    <transaction-state>success</transaction-state>
    <completion-time-stamp>2019-12-20T09:47:35.000Z</completion-time-stamp>
    <statuses>
        <status code="201.0000" description="The resource was successfully created." severity="information"/>
    </statuses>
    <requested-amount currency="EUR">15</requested-amount>
    <account-holder>
        <address>
            <country>DE</country>
        </address>
    </account-holder>
    <order-items>
        <order-item>
            <name>Item 1</name>
            <article-number>1</article-number>
            <amount currency="EUR">20.0</amount>
            <quantity>1</quantity>
        </order-item>
        <order-item>
            <name>Item 5</name>
            <amount currency="EUR">5.0</amount>
            <quantity>1</quantity>
            <type>discount</type>
        </order-item>
    </order-items>
    <payment-methods>
        <payment-method url="https://api-test.wirecard.com:443/engine/notification/klarna/lightBoxPaymentPage?category=pay_over_time&amp;client_token=eyJhbGciOiJSUzI1NiJ9.ewogICJzZXNzaW9uX2lkIiA6ICI2NGE4MzA1ZS04NzYwLTcyOWItYmIyZC03ZTA0ZDgwMTY1ZWQiLAogICJiYXNlX3VybCIgOiAiaHR0cHM6Ly9rbGFybmEtcGF5bWVudHMtZXUucGxheWdyb3VuZC5rbGFybmEuY29tIiwKICAiZGVzaWduIiA6ICJrbGFybmEiLAogICJsYW5ndWFnZSIgOiAiZW4iLAogICJwdXJjaGFzZV9jb3VudHJ5IiA6ICJERSIsCiAgInRyYWNlX2Zsb3ciIDogZmFsc2UsCiAgImVudmlyb25tZW50IiA6ICJwbGF5Z3JvdW5kIiwKICAibWVyY2hhbnRfbmFtZSIgOiAiUGxheWdyb3VuZCBEZW1vIE1lcmNoYW50IiwKICAic2Vzc2lvbl90eXBlIiA6ICJQQVlNRU5UUyIsCiAgImNsaWVudF9ldmVudF9iYXNlX3VybCIgOiAiaHR0cHM6Ly9ldnQucGxheWdyb3VuZC5rbGFybmEuY29tIiwKICAiZXhwZXJpbWVudHMiIDogWyBdCn0.KWlqrnDIrsg3I1B8ZScExUBqBD9160vPRs6ibZZRVEC4Eb3M46fphUWX6MJ2ULV3z4FPUKc3Rubllst_PiW_CAie2LJu-BSz5AUQ_XWRh3G4bEwGpmvl5RM4BAWqL2X_j7T8mop0dHp9-MrWck--xwTCYFPuPfGO1e0OVx7iqzbNm4iiWe3zNo_GVsV7exkBLtOw1i-VCiAGglRNHLPfjtmWhAV82Uk2govf7NenUi5L1aStheBkC54ZEJbfe7CUQgNUiN32bWqo8V75Flc27l1O-BcYp5sbB-KMkrUFGyEmsvFv-PSr8k-TWmH1RD14wkT1owbFBO38dUcwOI4ZMg&amp;session=64a8305e-8760-729b-bb2d-7e04d80165ed&amp;locale=en" name="klarna-finance"/>
    </payment-methods>
    <success-redirect-url>https://demoshop-test.wirecard.com/demoshop/#/success</success-redirect-url>
    <locale>en</locale>
</payment>
To proceed with a successful authorization transaction, take the URL from <payment-method url="http://…​"> from the response, replace &amp; with & and redirect your consumer to this URL.
authorization Notification XML
<?xml version="1.0" encoding="UTF-8" standalone="yes"?>
<payment xmlns="http://www.elastic-payments.com/schema/payment">
    <merchant-account-id>f570c123-62f1-4a0d-8688-d999a05d50d4</merchant-account-id>
    <transaction-id>e0c56c7a-69a1-4dd0-bb38-de68c83d4af0</transaction-id>
    <request-id>da11b5a8-db5f-4c81-a5f9-0e5b9a70f845</request-id>
    <transaction-type>authorization</transaction-type>
    <transaction-state>success</transaction-state>
    <completion-time-stamp>2019-10-02T09:41:21.000+02:00</completion-time-stamp>
    <statuses>
        <status code="201.0000" description="guaranteed:The resource was successfully created." severity="information"/>
    </statuses>
    <requested-amount currency="EUR">10.000000</requested-amount>
    <parent-transaction-id>ee03b6d1-15a3-47b1-b7bc-2b25d1a5e04e</parent-transaction-id>
    <account-holder>
        <address>
            <country>DE</country>
        </address>
    </account-holder>
    <order-items>
        <order-item>
            <name>Item 1</name>
            <amount currency="EUR">10.000000</amount>
            <quantity>1</quantity>
        </order-item>
    </order-items>
    <notifications>
        <notification url="http://127.0.0.1:9301/merchant/rest/success"/>
    </notifications>
    <payment-methods>
        <payment-method name="klarna-paylater"/>
    </payment-methods>
    <api-id>---</api-id>
    <locale>en</locale>
</payment>
adjust-authorization

Use this transaction type to update a preceding authorization or to add new information to it.

You can update

  • order amount,

  • billing address

  • shipping address.

  • You can only adjust authorizations that have not yet been captured or canceled.

  • Multiple updates are possible.

If the change of an authorization increases the total order amount, Klarna performs another risk check. A new risk check can lead to a rejection of the authorization adjustment request. In this case, the initial authorization is still valid and can be updated, captured or canceled.

To refer to a specific authorization or adjust-authorization, you need the parent-transaction-id, which is the transaction-id of the preceding authorization or adjust-authorization.

adjust-authorization Workflow
Klarnav2 workflow adjustAuthorization
  1. → Send an adjust-authorization request. This request must contain the parent-transaction-id. Enter the transaction-id of the preceding authorization or adjust-authorization response.

  2. Wirecard Payment Gateway updates the initial (or already adjusted) authorization and forwards the request to Klarna.

  3. Klarna updates order amount and/or address and returns the result of the adjustment.

  4. Wirecard Payment Gateway sends you the adjust-authorization response which contains the status code.

  5. → Process the adjust-authorization response.

adjust-authorization Fields

Fields can be mandatory (M) or optional (O).

Field Request Response Data Type Size Description

merchant-account-id

O

M

Alphanumeric

36

A unique identifier assigned to every merchant account (by Wirecard).

request-id

M

M

Alphanumeric

150

A unique identifier assigned by the merchant to each request. Used when searching for or referencing it later.

As the request ID must be unique, {{$guid}} serves as a placeholder; Postman uses it to generate a random request-id for testing.

Allowed characters: [a-z0-9-\_].

parent-transaction-id

M

M

Alphanumeric

36

Enter the transaction-id of the preceding authorization or adjust-authorization.

transaction-type

M

M

Alphanumeric

30

The requested transaction type. Set this field to adjust-authorization.

requested-amount

M

M

Numeric

18,3

Total order amount to be reserved. The number of decimal places depends on the currency.
The requested amount must be equal to the sum of all order item amounts. It must not exceed the amount of the preceding authorization.

Use , (comma) as separator.

requested-amount@currency

M

M

Alphanumeric

3

The currency of the requested/contested transaction amount.
Format: 3-character abbreviation according to ISO 4217.

order-detail

O

O

Alphanumeric

Description of the update/change.

payment-methods.
payment-method@name

O

M

Alphanumeric

15

The name of the payment method used for the transaction.

Possible values:

  • klarna-finance for payment in installments (Financing/Slice it)

  • klarna-debit for Klarna direct debit (Pay now)

  • klarna-transfer for Klarna bank transfer (Pay now)

  • klarna-paylater for Klarna payment on invoive (Pay later)

locale

-

M

Alphanumeric

5

A 5-letter code which indicates what language the payment page is rendered in (RFC 1766).

transaction-id

-

M

Alphanumeric

36

A unique identifier assigned for every transaction. Generated by Wirecard. Used when searching for or referencing it later.

transaction-state

-

M

Alphanumeric

12

Transaction status.
Possible values:

  • success

  • failed

completion-time-stamp

-

M

DateTime

The timestamp documents the time and date when the transaction was completed.

notifications.
notification-url

O

O

Alphanumeric

256

The URL to which Wirecard Payment Gateway sends an Instant Payment Notification (IPN) for pending reservations or the transaction outcome. It overwrites the notification URL that is set up in your merchant configuration.

account-holder.

Contains consumer data.

date-of-birth

-

O

Date

Consumer’s date of birth.
Format: Klarna accepts only dd-MM-YYYY or YYYY-MM-dd.
If you provide a different format, Klarna prompts the consumer to enter their birth date during the payment process.

first-name

O

O

Alphanumeric

32

Consumer’s first name.

last-name

O

O

Alphanumeric

32

Consumer’s last name.

email

O

O

Alphanumeric

64

Consumer’s email address.

gender

-

O

Alphanumeric

1

Consumer’s gender.

phone

O

O

Alphanumeric

32

Consumer’s phone number.
Phone numbers need to be validated. Click here for details.

account-holder.address.

Consumer’s address.

street1

O

O

Alphanumeric

128

Street of the consumer’s address.

street2

O

O

Alphanumeric

128

House number of the consumer’s address.

city

O

O

Alphanumeric

32

City of the consumer’s address.

country

O

M

Alphanumeric

3

Country code of the consumer’s address.

postal-code

O

O

Alphanumeric

16

Postal/ZIP code of the consumer’s address.

shipping.

Consumer’s shipping information.

first-name

O

O

Alphanumeric

32

Recipient’s first name.

last-name

O

O

Alphanumeric

32

Recipient’s last name.

email

O

O

Alphanumeric

64

Recipient’s email address.

phone

O

O

Alphanumeric

32

Recipient’s phone number.
Phone numbers need to be validated. Click here for details.

shipping.address.

Consumer’s shipping address.

street1

O

O

Alphanumeric

128

Street of the recipient’s address.

street2

O

O

Alphanumeric

128

House number of the recipient’s address.

house-extension

-

O

Alphanumeric

32

House extension of the recipient’s address.

city

O

O

Alphanumeric

32

City of the recipient’s address.

country

O

O

Alphanumeric

3

Country code of the recipient’s address.

postal-code

O

O

Alphanumeric

16

Postal/ZIP code of the recipient’s address.

order-items.order-item.

Description of a specific order item.

name

M

M

Alphanumeric

256

Name of the item in the shopping basket.

description

O

O

Alphanumeric

1024

Description of the item in the shopping basket.

article-number

O

O

Alphanumeric

256

EAN or other merchant-side article identifier.

quantity

M

M

Numeric

n/a

Total number of this item in the shopping basket.

amount

M

M

Numeric

18,3

Item’s price per unit.

Use , (comma) as separator.

amount@currency

M

M

Alphanumeric

3

Currency of this item’s price. Must match the order currency (requested amount currency).
Format: 3-character abbreviation according to ISO 4217.

type

M

M

Alphanumeric

n/a

Order item type.
Possible values:

  • shipment_fee

  • handling_fee

  • discount

  • physical

  • sales_tax

  • digital

  • gift_card

  • store_credit

tax-rate

O

O

Numeric

5,2

Item’s tax rate per unit in percent.
M if tax-amount is specified.

tax-amount

O

O

Numeric

5,2

Item’s tax value per unit.
M if tax-rate is specified.

discount

O

O

Numeric

18,3

The discount value for one order item.
Use , (comma) as separator.

statuses.status.

Contains information on the status of a specific transaction.

code

-

M

Alphanumeric

12

Transaction status code.

description

-

M

Alphanumeric

256

Transaction status message.

severity

-

M

Alphanumeric

20

The definition of the status message. Possible values:

  • information

  • warning

  • error

adjust-authorization Samples
adjust-authorization Request
<?xml version="1.0" encoding="utf-8" standalone="yes"?>
<payment xmlns="http://www.elastic-payments.com/schema/payment">
    <merchant-account-id>f570c123-62f1-4a0d-8688-d999a05d50d4</merchant-account-id>
    <request-id>{{$guid}}</request-id>
    <transaction-type>adjust-authorization</transaction-type>
    <requested-amount currency="EUR">14</requested-amount>
    <parent-transaction-id>{{txnId}}</parent-transaction-id>
    <order-items>
        <order-item>
            <name>Item 1</name>
            <amount currency="EUR">7.0</amount>
            <quantity>1</quantity>
            <type>handling_fee</type>
        </order-item>
        <order-item>
            <name>Item 1</name>
            <article-number>Item 2</article-number>
            <amount currency="EUR">7.0</amount>
            <quantity>1</quantity>
            <type>handling_fee</type>
        </order-item>
    </order-items>
    <payment-methods>
        <payment-method name="klarna-paylater"/>
    </payment-methods>
</payment>
{{txnId}} serves as placeholder. Enter the transaction-id of the preceding authorization or adjust-authorization.
adjust-authorization Response
<?xml version="1.0" encoding="UTF-8" standalone="yes"?>
<payment xmlns="http://www.elastic-payments.com/schema/payment" self="https://api-test.wirecard.com:443/engine/rest/merchants/f570c123-62f1-4a0d-8688-d999a05d50d4/payments/972baaa9-8444-47cc-aab5-ca5888d396d6">
    <merchant-account-id ref="https://api-test.wirecard.com:443/engine/rest/config/merchants/f570c123-62f1-4a0d-8688-d999a05d50d4">f570c123-62f1-4a0d-8688-d999a05d50d4</merchant-account-id>
    <transaction-id>972baaa9-8444-47cc-aab5-ca5888d396d6</transaction-id>
    <request-id>3cca916b-6f4b-4e9b-9d47-778e529d6a95</request-id>
    <transaction-type>adjust-authorization</transaction-type>
    <transaction-state>success</transaction-state>
    <completion-time-stamp>2019-12-20T09:57:10.000Z</completion-time-stamp>
    <statuses>
        <status code="201.0000" description="guaranteed:The resource was successfully created." severity="information"/>
    </statuses>
    <requested-amount currency="EUR">14</requested-amount>
    <order-items>
        <order-item>
            <name>Item 1</name>
            <amount currency="EUR">7.0</amount>
            <quantity>1</quantity>
            <type>handling_fee</type>
        </order-item>
        <order-item>
            <name>Item 1</name>
            <article-number>Item 2</article-number>
            <amount currency="EUR">7.0</amount>
            <quantity>1</quantity>
            <type>handling_fee</type>
        </order-item>
    </order-items>
    <payment-methods>
        <payment-method name="klarna-paylater"/>
    </payment-methods>
    <api-id>elastic-api</api-id>
</payment>
void-authorization

Use this transaction type to cancel an order, e.g. if the goods or services are not available or the consumer wants to cancel their order. We recommend to cancel authorizations to avoid any influence on risk decisions for further payments.

You can cancel

  • only authorized amounts that have not yet been completely captured.

  • the total order amount.

  • a partial order amount. If the order has been partially captured, a void-authorization cancels only the part of the preceding authorization that has not yet been captured.

Once canceled, you can no longer process the order. The initial authorization/reservation is no longer valid.

To refer to a specific authorization, adjust-authorization or pending-authorization, you need the parent-transaction-id, which is the transaction-id of the preceding transaction.

void-authorization Workflow
Klarnav2 workflow voidAuthorization
  1. → Send a void-authorization request. This request must contain the parent-transaction-id. Enter the transaction-id of the preceding authorization, adjust-authorization or pending-authorization that is to be canceled.

  2. Wirecard Payment Gateway checks if parts of this order have already been captured:

    • If yes: Wirecard Payment Gateway sends a void-authorization request for the uncaptured order items to Klarna.

    • If no: Wirecard Payment Gateway sends a void-authorization request for the total order amount to Klarna.

  3. Klarna approves or rejects the void request and returns the result.

  4. Wirecard Payment Gateway sends you the void-authorization response which contains the status code.

  5. → Process the void-authorization response.

void-authorization Fields

Fields can be mandatory (M) or optional (O).

Field Request Response Data Type Size Description

merchant-account-id

O

M

Alphanumeric

36

A unique identifier assigned to every merchant account (by Wirecard).

request-id

M

M

Alphanumeric

150

A unique identifier assigned by the merchant to each request. Used when searching for or referencing it later.

As the request ID must be unique, {{$guid}} serves as a placeholder; Postman uses it to generate a random request-id for testing.

Allowed characters: [a-z0-9-\_].

parent-transaction-id

M

M

Alphanumeric

36

Enter the transaction-id of the preceding authorization, adjust-authorization or pending-authorization.

transaction-type

M

M

Alphanumeric

30

The requested transaction type. Set this field to void-authorization.

requested-amount

-

M

Numeric

18,3

Total order amount to be reserved. The number of decimal places depends on the currency.
The requested amount must be equal to the amount sum of all order items.

Use , (comma) as separator.

requested-amount@currency

-

M

Alphanumeric

3

The currency of the requested/contested transaction amount.
Format: 3-character abbreviation according to ISO 4217.

order-detail

-

O

Alphanumeric

Description of the cancelation.

payment-methods.
payment-method@name

O

M

Alphanumeric

15

The name of the payment method used for the transaction.

Possible values:

  • klarna-finance for payment in installments (Financing/Slice it)

  • klarna-debit for Klarna direct debit (Pay now)

  • klarna-transfer for Klarna bank transfer (Pay now)

  • klarna-paylater for Klarna payment on invoive (Pay later)

locale

-

M

Alphanumeric

5

A 5-letter code which indicates what language the payment page is rendered in (RFC 1766).

transaction-id

-

M

Alphanumeric

36

A unique identifier assigned for every transaction. Generated by Wirecard. Used when searching for or referencing it later.

transaction-state

-

M

Alphanumeric

12

Transaction status.
Possible values:

  • success

  • failed

completion-time-stamp

-

M

DateTime

The timestamp documents the time and date when the transaction was completed.

notifications.
notification-url

O

M

Alphanumeric

256

The URL to which Wirecard Payment Gateway sends an Instant Payment Notification (IPN) for pending reservations or the transaction outcome. It overwrites the notification URL that is set up in your merchant configuration.

order-items.order-item.

Description of a specific order item.

name

-

M

Alphanumeric

256

Name of the item in the shopping basket.

description

-

O

Alphanumeric

1024

Description of the item in the shopping basket.

article-number

-

O

Alphanumeric

256

EAN or other merchant-side article identifier.

quantity

-

M

Numeric

n/a

Total number of this item in the shopping basket.

amount

-

M

Numeric

18,3

Item’s price per unit.

Use , (comma) as separator.

amount@currency

-

M

Alphanumeric

3

Currency of this item’s price. Must match the order currency (requested amount currency).
Format: 3-character abbreviation according to ISO 4217.

type

-

O

Alphanumeric

n/a

Order item type.
Possible values:

  • shipment_fee

  • handling_fee

  • discount

  • physical

  • sales_tax

  • digital

  • gift_card

  • store_credit

tax-rate

-

O

Numeric

5,2

Item’s tax rate per unit in percent.

tax-amount

-

O

Numeric

5,2

Item’s tax value per unit.

discount

-

O

Numeric

18,3

The discount value for one order item.
Use , (comma) as separator.

account-holder.

Contains consumer data.

date-of-birth

-

O

Date

Consumer’s date of birth.
Format: Klarna accepts only dd-MM-YYYY or YYYY-MM-dd.
If you provide a different format, Klarna prompts the consumer to enter their birth date during the payment process.

first-name

-

O

Alphanumeric

32

Consumer’s first name.

last-name

-

O

Alphanumeric

32

Consumer’s last name.

email

-

O

Alphanumeric

64

Consumer’s email address.

gender

-

O

Alphanumeric

1

Consumer’s gender.

phone

-

O

Alphanumeric

32

Consumer’s phone number.
Phone numbers need to be validated. Click here for details.

account-holder.address.

Consumer’s address.

street1

-

O

Alphanumeric

128

Street of the consumer’s address.

street2

-

O

Alphanumeric

128

House number of the consumer’s address.

city

-

O

Alphanumeric

32

City of the consumer’s address.

country

-

M

Alphanumeric

3

Country code of the consumer’s address.

postal-code

-

O

Alphanumeric

16

Postal/ZIP code of the consumer’s address.

shipping.

Consumer’s shipping information.

first-name

-

O

Alphanumeric

32

Recipient’s first name.

last-name

-

O

Alphanumeric

32

Last name of the recipient.

email

-

O

Alphanumeric

64

Email address of the recipient.

phone

-

O

Alphanumeric

32

The phone number of the recipient.
Phone numbers need to be validated. Click here for details.

shipping.address.

Consumer’s shipping address.

street1

-

O

Alphanumeric

128

Street of the recipient’s address.

street2

-

O

Alphanumeric

128

House number of the recipient’s address.

house-extension

-

O

Alphanumeric

32

House extension of the recipient’s address.

city

-

O

Alphanumeric

32

City of the recipient’s address.

country

-

O

Alphanumeric

3

Country code of the recipient’s address.

postal-code

-

O

Alphanumeric

16

Postal/ZIP code of the recipient’s address.

statuses.status.

Contains information on the status of a specific transaction.

code

-

M

Alphanumeric

12

Transaction status code.

description

-

M

Alphanumeric

256

Transaction status message.

severity

-

M

Alphanumeric

20

The definition of the status message. Possible values:

  • information

  • warning

  • error

void-authorization Samples
void-authorization Request
<?xml version="1.0" encoding="utf-8" standalone="yes"?>
<payment xmlns="http://www.elastic-payments.com/schema/payment">
    <merchant-account-id>f570c123-62f1-4a0d-8688-d999a05d50d4</merchant-account-id>
    <request-id>{{$guid}}</request-id>
    <transaction-type>void-authorization</transaction-type>
    <parent-transaction-id>{{txnId}}</parent-transaction-id>
</payment>
{{txnId}} serves as placeholder. Enter the transaction-id of the preceding authorization, adjust-authorization or pending-authorization that is to be canceled.
void-authorization Response
<?xml version="1.0" encoding="UTF-8" standalone="yes"?>
<payment xmlns="http://www.elastic-payments.com/schema/payment" self="https://api-test.wirecard.com:443/engine/rest/merchants/f570c123-62f1-4a0d-8688-d999a05d50d4/payments/a3268b6b-3077-4c9e-a5ab-bd11e7bfb9ef">
    <merchant-account-id ref="api-test.wirecard.com:443/engine/rest/config/merchants/f570c123-62f1-4a0d-8688-d999a05d50d4">f570c123-62f1-4a0d-8688-d999a05d50d4</merchant-account-id>
    <transaction-id>a3268b6b-3077-4c9e-a5ab-bd11e7bfb9ef</transaction-id>
    <request-id>e54fd185-b40b-43b1-8739-89dc10089eea</request-id>
    <transaction-type>void-authorization</transaction-type>
    <transaction-state>success</transaction-state>
    <completion-time-stamp>2019-12-20T10:16:32.000Z</completion-time-stamp>
    <statuses>
        <status code="201.0000" description="guaranteed:The resource was successfully created." severity="information"/>
    </statuses>
    <requested-amount currency="EUR">0</requested-amount>
    <parent-transaction-id>972baaa9-8444-47cc-aab5-ca5888d396d6</parent-transaction-id>
    <order-items>
        <order-item>
            <name>Item 1</name>
            <amount currency="EUR">7.000000</amount>
            <quantity>1</quantity>
            <type>handling_fee</type>
        </order-item>
        <order-item>
            <name>Item 1</name>
            <article-number>Item 2</article-number>
            <amount currency="EUR">7.000000</amount>
            <quantity>1</quantity>
            <type>handling_fee</type>
        </order-item>
    </order-items>
    <payment-methods>
        <payment-method name="klarna-paylater"/>
    </payment-methods>
    <parent-transaction-amount currency="EUR">14.000000</parent-transaction-amount>
    <api-id>elastic-api</api-id>
</payment>
capture-authorization

When the goods or services are ready to be delivered, you have to capture an authorized order fully or partially.

  • You cannot add new articles.

  • You cannot change the price of the ordered items, otherwise the capture-authorization transaction will be rejected.

  • Every partial capture triggers the creation and sending of a new payment instruction.

Once an authorized amount is captured, the due date for payment is set. The default payment due date is 14 days after capturing.

Klarna pays you the order amount according to the agreed billing period.

To refer to a specific authorization, you need the parent-transaction-id, which is the transaction-id of the preceding authorization or adjust-authorization response.

Klarna sends payment instructions (containing bank account details) per email to your consumer.

capture-authorization Workflow
Klarnav2 workflow captureAuthorization
  1. → Send an capture-authorization request. This request must contain the parent-transaction-id. Enter the transaction-id of the preceding authorization or adjust-authorization response.

    • If the capture-authorization request does not contain order items, Wirecard Payment Gateway captures the total order amount, i.e. all order items of the preceding authorization transaction are captured and must be delivered.

    • Multiple partial captures are possible by sending capture-authorization requests with order items to be captured.

  2. Wirecard Payment Gateway forwards the request to Klarna.

  3. Klarna returns the capture result.

  4. Wirecard Payment Gateway sends you the capture-authorization response which contains the status code.

  5. → Process the capture-authorization response.

capture-authorization Fields

Fields can be mandatory (M) or optional (O).

Field Request Response Data Type Size Description

merchant-account-id

O

M

Alphanumeric

36

A unique identifier assigned to every merchant account (by Wirecard).

request-id

M

M

Alphanumeric

150

A unique identifier assigned by the merchant to each request. Used when searching for or referencing it later.

As the request ID must be unique, {{$guid}} serves as a placeholder; Postman uses it to generate a random request-id for testing.

Allowed characters: [a-z0-9-\_].

parent-transaction-id

M

M

Alphanumeric

36

Enter the transaction-id of the preceding authorization or adjust-authorization.

transaction-type

M

M

Alphanumeric

30

The requested transaction type. Set this field to capture-authorization.

requested-amount

M

M

Numeric

18,3

Total order amount to be captured. The number of decimal places depends on the currency.

The requested amount must be equal to the amount sum of all order items.

The sum of all capture-authorization transactions must not exceed the amount of the preceding authorization or adjust-authorization transaction.

Use , (comma) as separator.

requested-amount@currency

M

M

Alphanumeric

3

The currency of the requested/contested transaction amount.
Format: 3-character abbreviation according to ISO 4217.

order-detail

O

O

Alphanumeric

Message or other important information for the consumer, shown on the payment instructions.
Requires a setting in your merchant configuration.

payment-methods.
payment-method@name

O

M

Alphanumeric

15

The name of the payment method used for the transaction.

Possible values:

  • klarna-finance for payment in installments (Financing/Slice it)

  • klarna-debit for Klarna direct debit (Pay now)

  • klarna-transfer for Klarna bank transfer (Pay now)

  • klarna-paylater for Klarna payment on invoive (Pay later)

locale

-

M

Alphanumeric

5

A 5-letter code which indicates what language the payment page is rendered in (RFC 1766).

transaction-id

-

M

Alphanumeric

36

A unique identifier assigned for every transaction. Generated by Wirecard. Used when searching for or referencing it later.

transaction-state

-

M

Alphanumeric

12

Transaction status.
Possible values:

  • success

  • failed

completion-time-stamp

-

M

DateTime

The timestamp documents the time and date when the transaction was completed.

notifications.
notification-url

O

O

Alphanumeric

256

The URL to which Wirecard Payment Gateway sends an Instant Payment Notification (IPN) for the transaction outcome. It overwrites the notification URL that is set up in your merchant configuration.

order-items.order-item.

Description of a specific order item.

name

M

M

Alphanumeric

256

Name of the item in the shopping basket.

description

O

O

Alphanumeric

1024

Description of the item in the shopping basket.

article-number

O

O

Alphanumeric

256

EAN or other merchant-side article identifier.

quantity

M

M

Numeric

n/a

Total number of this item in the shopping basket.

amount

M

M

Numeric

18,3

Item’s price per unit.

Use , (comma) as separator.

amount@currency

M

M

Alphanumeric

3

Currency of this item’s price. Must match the order currency (requested amount currency).
Format: 3-character abbreviation according to ISO 4217.

type

M

M

Alphanumeric

n/a

Order item type.
Possible values:

  • shipment_fee

  • handling_fee

  • discount

  • physical

  • sales_tax

  • digital

  • gift_card

  • store_credit

tax-rate

O

O

Numeric

5,2

Item’s tax rate per unit in percent.

tax-amount

O

O

Numeric

5,2

Item’s tax value per unit.

discount

O

O

Numeric

18,3

The discount value for one order item.
Use , (comma) as separator.

account-holder.

Contains consumer data.

date-of-birth

-

O

Date

Consumer’s date of birth.
Format: Klarna accepts only dd-MM-YYYY or YYYY-MM-dd.
If you provide a different format, Klarna prompts the consumer to enter their birth date during the payment process.

first-name

-

O

Alphanumeric

32

Consumer’s first name.

last-name

-

O

Alphanumeric

32

Consumer’s last name.

email

-

O

Alphanumeric

64

Consumer’s email address.

gender

O

Alphanumeric

1

Consumer’s gender.

phone

-

O

Alphanumeric

32

Consumer’s phone number.
Phone numbers need to be validated. Click here for details.

account-holder.address.

Consumer’s address.

street1

-

O

Alphanumeric

128

Street of the consumer’s address.

street2

-

O

Alphanumeric

128

House number of the consumer’s address.

city

-

O

Alphanumeric

32

City of the consumer’s address.

country

-

M

Alphanumeric

3

Country code of the consumer’s address.

postal-code

-

O

Alphanumeric

16

Postal/ZIP code of the consumer’s address.

shipping.

Consumer’s shipping information.

first-name

-

O

Alphanumeric

32

Recipient’s first name.

last-name

-

O

Alphanumeric

32

Recipient’s last name.

email

-

O

Alphanumeric

64

Recipient’s email address.

phone

-

O

Alphanumeric

32

Recipient’s phone number.
Phone numbers need to be validated. Click here for details.

tracking-number

O

O

Alphanumeric

64

The delivery tracking number for this order.

shipping.address.

Consumer’s shipping address.

street1

-

O

Alphanumeric

128

Street of the recipient’s address.

street2

-

O

Alphanumeric

128

House number of the recipient’s address.

house-extension

-

O

Alphanumeric

32

House extension of the recipient’s address.

city

-

O

Alphanumeric

32

City of the recipient’s address.

country

-

O

Alphanumeric

3

Country code of the recipient’s address.

postal-code

-

O

Alphanumeric

16

Postal/ZIP code of the recipient’s address.

statuses.status.

Contains information on the status of a specific transaction.

code

M

Alphanumeric

12

Transaction status code.

description

M

Alphanumeric

256

Transaction status message.

severity

M

Alphanumeric

20

The definition of the status message. Possible values:

  • information

  • warning

  • error

capture-authorization Samples
capture-authorization Request
<?xml version="1.0" encoding="utf-8" standalone="yes"?>
<payment xmlns="http://www.elastic-payments.com/schema/payment">
    <merchant-account-id>f570c123-62f1-4a0d-8688-d999a05d50d4</merchant-account-id>
    <request-id>{{$guid}}</request-id>
    <transaction-type>capture-authorization</transaction-type>
    <requested-amount currency="EUR">10</requested-amount>
    <parent-transaction-id>{{txnId}}</parent-transaction-id>
    <order-items>
        <order-item>
            <name>Item 1</name>
            <article-number>Item 1</article-number>
            <amount currency="EUR">3.0</amount>
            <quantity>2</quantity>
            <type>sales_tax</type>
        </order-item>
        <order-item>
            <name>Item 2</name>
            <article-number>Item 2</article-number>
            <amount currency="EUR">4.0</amount>
            <quantity>1</quantity>
            <type>sales_tax</type>
        </order-item>
    </order-items>
    <payment-methods>
        <payment-method name="klarna-paylater"/>
    </payment-methods>
</payment>
{{txnId}} serves as placeholder. Enter the transaction-id of the preceding authorization or adjust-authorization.
capture-authorization Response
<?xml version="1.0" encoding="UTF-8" standalone="yes"?>
<payment xmlns="http://www.elastic-payments.com/schema/payment" self="https://api-test.wirecard.com:443/engine/rest/merchants/f570c123-62f1-4a0d-8688-d999a05d50d4/payments/08a771ab-5bd3-471a-b23b-2ac4ad5d080c">
    <merchant-account-id ref="https://api-test.wirecard.com:443/engine/rest/config/merchants/f570c123-62f1-4a0d-8688-d999a05d50d4">f570c123-62f1-4a0d-8688-d999a05d50d4</merchant-account-id>
    <transaction-id>08a771ab-5bd3-471a-b23b-2ac4ad5d080c</transaction-id>
    <request-id>5586e95e-45e9-4e7c-a203-b7ed95de7012</request-id>
    <transaction-type>capture-authorization</transaction-type>
    <transaction-state>success</transaction-state>
    <completion-time-stamp>2019-12-20T10:09:43.000Z</completion-time-stamp>
    <statuses>
        <status code="201.0000" description="guaranteed:The resource was successfully created." severity="information"/>
    </statuses>
    <requested-amount currency="EUR">10</requested-amount>
    <parent-transaction-id>972baaa9-8444-47cc-aab5-ca5888d396d6</parent-transaction-id>
    <order-items>
        <order-item>
            <name>Item 1</name>
            <article-number>Item 1</article-number>
            <amount currency="EUR">3.0</amount>
            <quantity>2</quantity>
            <type>sales_tax</type>
        </order-item>
        <order-item>
            <name>Item 2</name>
            <article-number>Item 2</article-number>
            <amount currency="EUR">4.0</amount>
            <quantity>1</quantity>
            <type>sales_tax</type>
        </order-item>
    </order-items>
    <payment-methods>
        <payment-method name="klarna-paylater"/>
    </payment-methods>
    <parent-transaction-amount currency="EUR">14.000000</parent-transaction-amount>
    <api-id>elastic-api</api-id>
</payment>
refund-capture

Use this transaction type to trigger repayment if a consumer returns all or some items.

You can refund

  • the total order amount: If you do not send order items within the refund-capture request, the total order amount will be refunded.

  • a partial order amount: Send the returned order items information within the refund-capture request to trigger a partial order amount.

You cannot

  • bundle refunds. You have to create a refund-capture transaction for each capture-authorization transaction separately.

  • change the price of the ordered items, otherwise the refund-capture transaction will be rejected.

To refer to a specific capture-authorization, you need the parent-transaction-id, which is the transaction-id of the preceding capture-authorization response.

refund-capture Workflow
Klarnav2 workflow refundAuthorization
  1. → Send a refund-capture request. This request must contain the parent-transaction-id. Enter the transaction-id of the preceding capture-authorization response.

    • If the refund-capture request does not contain order items, Wirecard Payment Gateway refunds the total order amount, i.e. all order items of the preceding capture-authorization transaction are refunded.

  2. Wirecard Payment Gateway forwards the request to Klarna.

  3. Klarna returns the refund result.

  4. Wirecard Payment Gateway sends you the refund-capture response which contains the status code.

  5. → Process the refund-capture response.

refund-capture Fields

Fields can be mandatory (M) or optional (O).

Field Request Response Data Type Size Description

merchant-account-id

O

M

Alphanumeric

36

A unique identifier assigned to every merchant account (by Wirecard).

request-id

M

M

Alphanumeric

150

A unique identifier assigned by the merchant to each request. Used when searching for or referencing it later.

As the request ID must be unique, {{$guid}} serves as a placeholder; Postman uses it to generate a random request-id for testing.

Allowed characters: [a-z0-9-\_].

parent-transaction-id

M

M

Alphanumeric

36

Enter the transaction-id of the preceding capture-authorization.

transaction-type

M

M

Alphanumeric

30

The requested transaction type. Set this field to refund-capture.

requested-amount

M

M

Numeric

18,3

Total order amount to be reserved. The number of decimal places depends on the currency.

The requested amount must not exceed the amount of the preceding capture-authorization transaction.

Use , (comma) as separator.

requested-amount@currency

M

M

Alphanumeric

3

The currency of the requested/contested transaction amount.
Format: 3-character abbreviation according to ISO 4217.

order-detail

O

O

Alphanumeric

Detailed description of the (reason for the) refund.

payment-methods.
payment-method@name

O

M

Alphanumeric

15

The name of the payment method used for the transaction.

Possible values:

  • klarna-finance for payment in installments (Financing/Slice it)

  • klarna-debit for Klarna direct debit (Pay now)

  • klarna-transfer for Klarna bank transfer (Pay now)

  • klarna-paylater for Klarna payment on invoive (Pay later)

locale

-

M

Alphanumeric

5

A 5-letter code which indicates what language the payment page is rendered in (RFC 1766).

transaction-id

-

M

Alphanumeric

36

A unique identifier assigned for every transaction. Generated by Wirecard. Used when searching for or referencing it later.

transaction-state

-

M

Alphanumeric

12

Transaction status.
Possible values:

  • success

  • failed

completion-time-stamp

-

M

DateTime

The timestamp documents the time and date when the transaction was completed.

notifications.
notification-url

M

M

Alphanumeric

256

The URL to which Wirecard Payment Gateway sends an Instant Payment Notification (IPN) for pending reservations or the transaction outcome. It overwrites the notification URL that is set up in your merchant configuration.

order-items.order-item.

Description of a specific order item.

name

M

M

Alphanumeric

256

Name of the item to be refunded.

description

O

O

Alphanumeric

1024

Description of the item to be refunded.

quantity

M

M

Numeric

n/a

Total number of this item to be refunded.

article-number

M

M

Alphanumeric

256

EAN or other merchant-side article identifier.

amount

M

M

Numeric

18,3

Item’s price per unit.

Use , (comma) as separator.

amount@currency

M

M

Alphanumeric

3

Currency of this item’s price. Must match the order currency (requested amount currency).
Format: 3-character abbreviation according to ISO 4217.

type

M

M

Alphanumeric

n/a

Order item type.
Possible values:

  • shipment_fee

  • handling_fee

  • discount

  • physical

  • sales_tax

  • digital

  • gift_card

  • store_credit

tax-rate

O

O

Numeric

5,2

Item’s tax rate per unit in percent.

tax-amount

O

O

Numeric

5,2

Item’s tax value per unit.

discount

O

O

Numeric

18,3

The discount value for one order item.
Use , (comma) as separator.

account-holder.

Contains consumer data.

date-of-birth

-

O

Date

Consumer’s date of birth.
Format: Klarna accepts only dd-MM-YYYY or YYYY-MM-dd.
If you provide a different format, Klarna prompts the consumer to enter their birth date during the payment process.

first-name

-

O

Alphanumeric

32

Consumer’s first name.

last-name

-

O

Alphanumeric

32

Consumer’s last name.

email

-

O

Alphanumeric

64

Consumer’s email address.

gender

O

Alphanumeric

1

Consumer’s gender.

phone

-

O

Alphanumeric

32

Consumer’s phone number.
Phone numbers need to be validated. Click here for details.

account-holder.address.

Consumer’s address.

street1

-

O

Alphanumeric

128

Street of the consumer’s address.

street2

-

O

Alphanumeric

128

House number of the consumer’s address.

city

-

O

Alphanumeric

32

City of the consumer’s address.

country

-

M

Alphanumeric

3

Country code of the consumer’s address.

postal-code

-

O

Alphanumeric

16

Postal/ZIP code of the consumer’s address.

shipping.

Consumer’s shipping information.

first-name

-

O

Alphanumeric

32

Recipient’s first name.

last-name

-

O

Alphanumeric

32

Recipient’s last name.

email

-

O

Alphanumeric

64

Recipient’s email address.

phone

-

O

Alphanumeric

32

Recipient’s phone number.
Phone numbers need to be validated. Click here for details.

tracking-number

O

O

Alphanumeric

64

The delivery tracking number for this order.

shipping.address.

Consumer’s shipping address.

street1

-

O

Alphanumeric

128

Street of the recipient’s address.

street2

-

O

Alphanumeric

128

House number of the recipient’s address.

house-extension

-

O

Alphanumeric

32

House extension of the recipient’s address.

city

-

O

Alphanumeric

32

City of the recipient’s address.

country

-

O

Alphanumeric

3

Country code of the recipient’s address.

postal-code

-

O

Alphanumeric

16

Postal/ZIP code of the recipient’s address.

statuses.status.

Contains information on the status of a specific transaction.

code

-

M

Alphanumeric

12

Transaction status code.

description

-

M

Alphanumeric

256

Transaction status message.

severity

-

M

Alphanumeric

20

The definition of the status message. Possible values:

  • information

  • warning

  • error

refund-capture Samples
refund-capture Request
<?xml version="1.0" encoding="utf-8" standalone="yes"?>
<payment xmlns="http://www.elastic-payments.com/schema/payment">
    <merchant-account-id>f570c123-62f1-4a0d-8688-d999a05d50d4</merchant-account-id>
    <request-id>{{$guid}}</request-id>
    <transaction-type>refund-capture</transaction-type>
    <requested-amount currency="EUR">10</requested-amount>
    <parent-transaction-id>{{txnId}}</parent-transaction-id>
    <order-items>
        <order-item>
            <name>Item 1</name>
            <article-number>Item 1</article-number>
            <amount currency="EUR">15.0</amount>
            <quantity>1</quantity>
            <type>physical</type>
        </order-item>
        <order-item>
            <name>Item 5</name>
            <amount currency="EUR">5.0</amount>
            <quantity>1</quantity>
            <type>discount</type>
        </order-item>
    </order-items>
    <payment-methods>
        <payment-method name="klarna-paylater"/>
    </payment-methods>
</payment>
{{txnId}} serves as placeholder. Enter the transaction-id of the preceding capture-authorization.
refund-capture Response
<?xml version="1.0" encoding="UTF-8" standalone="yes"?>
<payment xmlns="http://www.elastic-payments.com/schema/payment" self="https://api-test.wirecard.com:443/engine/rest/merchants/f570c123-62f1-4a0d-8688-d999a05d50d4/payments/5e722fe7-b5d1-4bed-8100-a770902bf12c">
    <merchant-account-id ref="https://api-test.wirecard.com:443/engine/rest/config/merchants/f570c123-62f1-4a0d-8688-d999a05d50d4">f570c123-62f1-4a0d-8688-d999a05d50d4</merchant-account-id>
    <transaction-id>5e722fe7-b5d1-4bed-8100-a770902bf12c</transaction-id>
    <request-id>4ada1324-fa2d-4851-9d36-b4ad4bef4821</request-id>
    <transaction-type>refund-capture</transaction-type>
    <transaction-state>success</transaction-state>
    <completion-time-stamp>2019-12-20T10:26:50.000Z</completion-time-stamp>
    <statuses>
        <status code="201.0000" description="guaranteed:The resource was successfully created." severity="information"/>
    </statuses>
    <requested-amount currency="EUR">10</requested-amount>
    <parent-transaction-id>5068a6d6-df1e-481a-9ec1-fba55576d27a</parent-transaction-id>
    <order-items>
        <order-item>
            <name>Item 1</name>
            <article-number>Item 1</article-number>
            <amount currency="EUR">15.0</amount>
            <quantity>1</quantity>
            <type>physical</type>
        </order-item>
        <order-item>
            <name>Item 5</name>
            <amount currency="EUR">5.0</amount>
            <quantity>1</quantity>
            <type>discount</type>
        </order-item>
    </order-items>
    <payment-methods>
        <payment-method name="klarna-paylater"/>
    </payment-methods>
    <parent-transaction-amount currency="EUR">10.000000</parent-transaction-amount>
    <api-id>elastic-api</api-id>
</payment>
Phone Number Validation

According to Klarna developer guidelines, you have to validate phone numbers in order to meet the requirements provided in the table below. As Klarna declines phone numbers that do not adhere to the required format, be sure to check the phone numbers before sending the request.

Country Cellular Landline

Austria

  • Numbers start with 0650 to 0653, 0655, 0657, 0659 to 0661, 0663 to 0699.
    Remove number’s leading zero when using country code.

  • Country code prefix is optional (0043 or +43).

  • Area codes for landline numbers start with 01, 02, 03, 04, 05, 06 (unless cell) or 07, followed by a number of 4-13 digits.
    Remove area code’s leading zero when using country code.

  • Country code prefix is optional (0043 or +43).

Denmark

  • Numbers have 8 digits.

  • Numbers start with 20-29, 30, 31, 40-42, 50-53, 60, 61 71 or 81.

  • Country code prefix is optional (0045 or +45).

  • Numbers have 8 digits.

  • Numbers start with 32-39, 43-49, 54-59, 62-69, 72-79, 82-89, 96-99.

  • Country code prefix is optional (0045 or +45).

Finland

  • Numbers have 6-12 digits.

  • Numbers start with 040-049 or 050.
    Remove number’s leading zero when using country code.

  • Country code prefix is optional (00358 or +358).

  • Numbers have 6-12 digits.

  • Numbers start with 01-03, 05-09.
    Remove number’s leading zero when using country code.

  • Country code prefix is optional (00358 or +358).

Germany

  • Numbers have 8-12 digits.

  • Numbers start with 015-017.
    Remove number’s leading zero when using country code.

  • Country code prefix is optional (0049 or +49).

  • Numbers have 4-12 digits.

  • Numbers start with 010-014, 018-019, 02-09.
    Remove number’s leading zero when using country code.

  • Country code prefix is optional (0049 or +49).

Netherlands

  • Numbers have 9-10 digits.

  • Numbers start with 06.
    Remove number’s leading zero when using country code.

  • Country code prefix is optional (0031 or +31).

  • Numbers have 9-10 digits.

  • Numbers start with 01-05, 07-08.
    Remove number’s leading zero when using country code.

  • Country code prefix is optional (0031 or +31).

Norway

  • Numbers have 8 digits.

  • Numbers start with 40-49 or 90-99.

  • Country code prefix is optional (0047 or +47).

  • Numbers have 8 digits.

  • Numbers start with 2, 3, 5-8.

  • Country code prefix is optional (0047 or +47).

Sweden

  • Numbers have 7-13 digits.

  • Numbers start with 010, 070, 072, 073, 076.
    Remove number’s leading zero when using country code.

  • Country code prefix is optional (0046 or +46).

  • Numbers have 7-13 digits.

  • Numbers start with 011-019, 02-06, 071, 075, 077-079, 08-09.
    Remove number’s leading zero when using country code.

  • Country code prefix is optional (0046 or +46).


For transaction type details which are not given here, see Appendix B: Transaction Types.

Wirecard Payment Page v2

Here you find all the information for integrating Klarna Payments into your Hosted and Embedded Payment Page.

Want to know more about Wirecard Payment Page v2 (WPP v2)?
Visit one of our integration guides (Hosted Payment Page, Embedded Payment Page) for a quick explanation and a step-by-step guide.

All WPP v2 integrations share a common process flow for creating payments.

Below, we provide a sample request for the available transaction type authorization, including a field list with short descriptions.

Below, we provide a field list with short descriptions.

For more details on the redirect-url, see the Configuring Redirects and IPNs for WPP v2 section.

For response verification examples, see the WPP v2 Security section.

About Klarna Payments

Klarna Payments offer 3 payment options for consumers to pay when and how they prefer to:

  • Pay now:

    • Quick and easy direct payments with

      • direct debit
        payment-method name: klarna-debit

      • bank transfer
        payment-method name: klarna-transfer.

    • Support for recurring payments and subscriptions.

    • Type of Online Bank Transfer.

  • Pay later:

    • Payment on invoice. Consumers pay for goods or services 14 - 60 days after receipt.

    • payment-method name: klarna-paylater

    • Type of Offline Bank Transfer.

  • Financing (Slice it):

    • Consumers pay for received goods or services in equal monthly installments.

    • payment-method name: klarna-finance

    • Type of Offline Bank Transfer.

Klarna takes full credit and fraud risk and guarantees payments.

Countries and Currencies

Countries

Austria, Denmark, Finland, Germany, Netherlands, Norway, Sweden, Switzerland, UK

Currencies

DKK, EUR, GBP, NOK, SEK

Transaction Type authorization

With Klarna Payments you can use the transaction types authorization and auto-sale which both trigger an authorization.

An authorization reserves the specified amount from the account holder’s bank account for a later transfer. It performs an order risk check and an order reservation. Once an order is reserved, the payment is guaranteed.

Test Credentials

URL (Endpoint)

https://wpp-test.wirecard.com/api/payment/register

Merchant Account ID (MAID)

f570c123-62f1-4a0d-8688-d999a05d50d4

Username

16390-testing

Password

3!3013=D3fD8X7

Sample Workflow

For a successful transaction:

  1. Create a payment session (initial request).

  2. Redirect the consumer to the payment page (initial response URL).

  3. Highly recommended: Parse and process the payment response.

We provide JSON examples for each step of this process. You can find them below.

Request Headers

Authorization

Use username and password as given in your Wirecard contract to base64-encode the authorization.

For example for user:password the authorization header is:

Authorization: Basic dXNlcjpwYXNzd29yZA==

Content-Type

For JSON requests the content type header is:

Content-Type: application/json;charset=UTF-8
1. Create a Payment Session (Initial Request)
{
    "payment": {
        "merchant-account-id": {
            "value": "f570c123-62f1-4a0d-8688-d999a05d50d4"
        },
        "request-id": "{{$guid}}",
        "transaction-type": "authorization",
        "requested-amount": {
            "value": "1.23",
            "currency": "EUR"
        },
        "account-holder": {
            "first-name": "Paul",
            "last-name": "Peterson",
            "email": "paul@peterson.com",
            "date-of-birth": "1980-01-01",
            "phone": "+421123456789",
            "address": {
                "street1": "Mullerstrasse 137",
                "city": "Berlin",
                "state": "Berlin",
                "country": "DE",
                "postal-code": "13353"
            }
        },
        "payment-methods": {
            "payment-method": [
                {
                    "name": "klarna-paylater"
                }
            ]
        },
        "shipping": {
            "first-name": "Paul",
            "last-name": "Peterson",
            "phone": "+421123456789",
            "address": {
                "street1": "Mullerstrasse 137",
                "city": "Berlin",
                "state": "Berlin",
                "country": "DE",
                "postal-code": "13353"
            },
            "email": "paul@peterson.com"
        },
        "ip-address": "127.0.0.1",
        "success-redirect-url": "https://demoshop-test.wirecard.com/demoshop/#/success",
        "fail-redirect-url": "https://demoshop-test.wirecard.com/demoshop/#/error",
        "order-items": {
            "order-item": [
                {
                    "name": "Name 1",
                    "description": "Description 1",
                    "article-number": "123456",
                    "amount": {
                        "value": "1.23",
                        "currency": "EUR"
                    },
                    "quantity": "1"
                }
            ]
        },
        "locale": "DE"
    }
}

Field (JSON)

Data Type

Mandatory/
Optional

Size

Description

merchant-account-id

value

String

Mandatory

36

A unique identifier assigned to every merchant account (by Wirecard).

request-id

String

Mandatory

150

A unique identifier assigned by the merchant to each request. Used when searching for or referencing it later.

As the request ID must be unique, {{$guid}} serves as a placeholder; Postman uses it to generate a random request-id for testing.

Allowed characters: [a-z0-9-\_].

transaction-type

String

Mandatory

30

The requested transaction type. Available transaction types for Klarna Payments:

  • authorization

  • auto-sale

Both trigger an authorization.

requested-amount

currency

String

Mandatory

3

The currency of the requested/contested transaction amount.
Format: 3-character abbreviation according to ISO 4217.

value

Numeric

Mandatory

18.3

The full amount that is requested/contested in a transaction. The number of decimal places depends on the currency.
The requested amount must be equal to the amount sum of all order items.

Use . (decimal point) as separator.

account-holder

date-of-birth

String

Optional

n/a

Consumer’s date of birth.
Format: Klarna accepts only dd-MM-YYYY or YYYY-MM-dd.
If you provide a different format, Klarna prompts the consumer to enter their birth date during the payment process.

first-name

String

Optional

32

Consumer’s first name.

last-name

String

Optional

32

Consumer’s last name.

email

String

Optional

64

Consumer’s email address.

gender

String

Optional

1

Consumer’s gender.

phone

String

Mandatory

32

Consumer’s phone number.
Phone numbers need to be validated. Click here for details.

address

street1

String

Optional

128

Street of the consumer’s address.

street2

String

Optional

128

House number of the consumer’s address.

city

String

Optional

32

City of the consumer’s address.

country

String

Mandatory

3

Country code of the consumer’s address.

postal-code

String

Optional

16

Postal/ZIP code of the consumer’s address.

shipping

first-name

String

Optional

32

First name of the recipient.

last-name

String

Optional

32

Last name of the recipient.

email

String

Optional

64

Email address of the recipient.

phone

String

Mandatory

32

The phone number of the recipient.
Phone numbers need to be validated. Click here for details.

address

street1

String

Optional

128

Street of the recipient’s address.

street2

String

Optional

128

House number of the recipient’s address.

house-extension

String

Optional

32

House extension of the recipient’s address.

city

String

Optional

32

City of the recipient’s address.

country

String

Optional

3

Country code of the recipient’s address.

postal-code

String

Optional

16

Postal/ZIP code of the recipient’s address.

order-number

String

Optional

255

Order number of the merchant.
If set, it shows as "order number" on Klarna’s confirmation page.

locale

String

Mandatory

2

A 2-letter code which indicates what language the payment page is rendered in (ISO 639-1).

order-items

order-item

quantity

Numeric

Mandatory

n/a

Total number of this item in the shopping basket.

description

String

Optional

1024

Description of the item in the shopping basket.

article-number

String

Optional

256

EAN or other merchant-side article identifier.

name

String

Mandatory

256

Name of the item in the shopping basket.

amount

value

Numeric

Mandatory

18.3

Item’s price per unit.

Use . (decimal point) as separator.

currency

String

Mandatory

3

Currency of this item’s price. Must match the order currency (requested amount currency).
Format: 3-character abbreviation according to ISO 4217.

tax-rate

Numeric

Optional

5.2

Item’s tax rate per unit in percent.
Mandatory if tax-amount is specified.

tax-amount

Numeric

Optional

5.2

Item’s tax value per unit.
Mandatory if tax-rate is specified.

discount

Numeric

Optional

18.3

The discount value for one order item.
Use . (decimal point) as separator.

type

String

Optional

n/a

Order item type.
Possible values:

  • shipment_fee

  • handling_fee

  • discount

  • physical

  • sales_tax

  • digital

  • gift_card

  • store_credit

If not specified, type is treated as a regular article.

notification-url

String

Optional

256

The URL to which Wirecard Payment Gateway sends the transaction outcome.

success-redirect-url

String

Mandatory

2000

The URL to which the consumer is redirected after a successful payment, e.g. https://demoshop-test.wirecard.com/demoshop/#/success

fail-redirect-url

String

Mandatory

2000

The URL to which the consumer is redirected after a failed payment, e.g. https://demoshop-test.wirecard.com/demoshop/#/error

cancel-redirect-url

String

Mandatory

2000

The URL to which the consumer is redirected after having canceled a payment, e.g. https://demoshop-test.wirecard.com/demoshop/#/cancel

payment-methods

payment-method

name

String

Mandatory

15

The name of the payment method used for the transaction.

Possible values:

  • klarna-finance for payment in installments (Financing/Slice it)

  • klarna-debit for Klarna direct debit (Pay now)

  • klarna-transfer for Klarna bank transfer (Pay now)

  • klarna-paylater for Klarna payment on invoive (Pay later)

Phone Number Validation

Both the consumer’s phone number and the phone number that corresponds to the shipping address are mandatory.

According to Klarna developer guidelines, you have to validate phone numbers in order to meet the requirements provided in the table below. As Klarna declines phone numbers that do not adhere to the required format, be sure to check the phone numbers before sending the request.

Country Cellular Landline

Austria

  • Numbers start with 0650 to 0653, 0655, 0657, 0659 to 0661, 0663 to 0699.
    Remove number’s leading zero when using country code.

  • Country code prefix is optional (0043 or +43).

  • Area codes for landline numbers start with 01, 02, 03, 04, 05, 06 (unless cell) or 07, followed by a number of 4-13 digits.
    Remove area code’s leading zero when using country code.

  • Country code prefix is optional (0043 or +43).

Denmark

  • Numbers have 8 digits.

  • Numbers start with 20-29, 30, 31, 40-42, 50-53, 60, 61 71 or 81.

  • Country code prefix is optional (0045 or +45).

  • Numbers have 8 digits.

  • Numbers start with 32-39, 43-49, 54-59, 62-69, 72-79, 82-89, 96-99.

  • Country code prefix is optional (0045 or +45).

Finland

  • Numbers have 6-12 digits.

  • Numbers start with 040-049 or 050.
    Remove number’s leading zero when using country code.

  • Country code prefix is optional (00358 or +358).

  • Numbers have 6-12 digits.

  • Numbers start with 01-03, 05-09.
    Remove number’s leading zero when using country code.

  • Country code prefix is optional (00358 or +358).

Germany

  • Numbers have 8-12 digits.

  • Numbers start with 015-017.
    Remove number’s leading zero when using country code.

  • Country code prefix is optional (0049 or +49).

  • Numbers have 4-12 digits.

  • Numbers start with 010-014, 018-019, 02-09.
    Remove number’s leading zero when using country code.

  • Country code prefix is optional (0049 or +49).

Netherlands

  • Numbers have 9-10 digits.

  • Numbers start with 06.
    Remove number’s leading zero when using country code.

  • Country code prefix is optional (0031 or +31).

  • Numbers have 9-10 digits.

  • Numbers start with 01-05, 07-08.
    Remove number’s leading zero when using country code.

  • Country code prefix is optional (0031 or +31).

Norway

  • Numbers have 8 digits.

  • Numbers start with 40-49 or 90-99.

  • Country code prefix is optional (0047 or +47).

  • Numbers have 8 digits.

  • Numbers start with 2, 3, 5-8.

  • Country code prefix is optional (0047 or +47).

Sweden

  • Numbers have 7-13 digits.

  • Numbers start with 010, 070, 072, 073, 076.
    Remove number’s leading zero when using country code.

  • Country code prefix is optional (0046 or +46).

  • Numbers have 7-13 digits.

  • Numbers start with 011-019, 02-06, 071, 075, 077-079, 08-09.
    Remove number’s leading zero when using country code.

  • Country code prefix is optional (0046 or +46).

2. Redirect the Consumer to the Payment Page (Sample Response URL)
{
  "payment-redirect-url": "https://wpp-test.wirecard.com/?wPaymentToken=nbuphpxyYFjdXwNY46kfeqa8Zt0ZWPkMmDTa0_wwP-4"
}
Field (JSON) Data Type Description

payment-redirect-url

String

The URL which redirects to the payment form. Sent as a response to the initial request.

At this point, you need to redirect your consumer to payment-redirect-url (or render it in an iframe depending on your integration method).

Consumers are redirected to the payment form. There they enter their data and submit the form to confirm the payment.
Possible transaction results:

  • Successful (transaction-state: success)

  • Failed (transaction-state: failed)

  • Canceled (transaction-state: failed)

The transaction result is the value of transaction-state in the payment response. More details (including the status code) can also be found in the statuses object of the payment response. Canceled payments are returned as failed, but the status description indicates it was canceled.

In any case (unless the consumer cancels the transaction on a 3rd party provider page), a base64-encoded response containing payment information is sent to the configured redirection URL. See Configuring Redirects and IPNs for WPP v2 for more details on redirection targets after payment and transaction status notifications.

You can find a decoded payment response example below.

3. Parse and Process the Payment Response (Decoded Payment Response)
{
    "payment": {
        "locale": "DE",
        "completion-time-stamp": "2019-12-17T07:11:43",
        "transaction-id": "ff00217d-9d67-4a40-8f49-87f17b2c5ce2",
        "transaction-state": "success",
        "statuses": {
            "status": [
                {
                    "description": "The resource was successfully created.",
                    "severity": "information",
                    "code": "201.0000"
                }
            ]
        },
        "merchant-account-id": {
            "value": "f570c123-62f1-4a0d-8688-d999a05d50d4"
        },
        "payment-methods": {
            "payment-method": [
                {
                    "name": "klarna-paylater"
                }
            ]
        },
        "account-holder": {
            "phone": "+421123456789",
            "last-name": "Dao",
            "first-name": "John",
            "email": "john@doe.com",
            "date-of-birth": "1980-01-01",
            "address": {
                "country": "DE",
                "postal-code": "13353",
                "street1": "Mullerstrasse 137",
                "street2": "",
                "city": "Berlin",
                "state": "Berlin"
            }
        },
        "transaction-type": "authorization",
        "success-redirect-url": "https://demoshop-test.wirecard.com/demoshop/#/success",
        "ip-address": "127.0.0.1",
        "fail-redirect-url": "https://demoshop-test.wirecard.com/demoshop/#/error",
        "parent-transaction-id": "813c512f-c190-48c6-8c4f-6c54f68e3ad4",
        "request-id": "$guid",
        "requested-amount": {
            "currency": "EUR",
            "value": 1.230000
        },
        "order-items": {
            "order-item": [
                {
                    "description": "Description 1",
                    "article-number": "123456",
                    "quantity": 1,
                    "amount": {
                        "currency": "EUR",
                        "value": 1.230000
                    },
                    "name": "Name 1"
                }
            ]
        },
        "shipping": {
            "phone": "+421123456789",
            "last-name": "Dao",
            "first-name": "John",
            "email": "john@doe.com",
            "address": {
                "country": "DE",
                "postal-code": "13353",
                "street1": "Mullerstrasse 137",
                "street2": "",
                "city": "Berlin",
                "state": "Berlin"
            }
        },
        "api-id": "wpp"
    }
}

In addition to the request fields, the response returns the following fields:

Field (JSON) Data Type Description

transaction-id

String

A unique identifier assigned for every transaction. Used when searching for or referencing it later.

transaction-state

String

The current transaction state.
Possible values:

  • in-progress

  • success

  • failed

Typically, a transaction starts with state in-progress and finishes with state either success or failed. This information is returned in the response only.

completion-time-stamp

Timestamp

The UTC/ISO timestamp documents the time and date when the transaction was executed.
Format: YYYY-MM-DDThh:mm:ss (ISO).

statuses

status

description

String

The description of the transaction status message.

severity

String

The definition of the status message. Possible values:

  • information

  • warning

  • error

code

String

Status code of the status message.

provider-code

String

Original Klarna error code.

provider-message

String

Error message to be shown to the consumer as required by Klarna.

provider-transaction-id

String

Klarna reservation number.

api-id

String

Identifier of the currently used API.

Post-Processing Operations

WPP v2 for Klarna Payments can be used for a first authorization in a chain of recurring transactions. However, when it comes to referencing a transaction for any kind of post-processing operation - such as a capture or void of one of your authorization transactions - use our REST API directly.

Check the REST API Klarna Payments specification for details on post-processing operations for Klarna Payments.
Custom URL: