Klarna Payments

REST API

Klarna Payments offers 4 payment methods:

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

klarna-debit, klarna-transfer, klarna-paylater

Denmark

klarna-debit, klarna-transfer, klarna-paylater, klarna-financing

Finland

klarna-debit, klarna-transfer, klarna-paylater, klarna-financing

Germany

klarna-debit, klarna-transfer, klarna-paylater, klarna-financing

Netherlands

klarna-debit, klarna-transfer, klarna-paylater

Norway

klarna-debit, klarna-transfer, klarna-paylater, klarna-financing

Sweden

klarna-debit, klarna-transfer, klarna-paylater, klarna-financing

Switzerland

klarna-debit, klarna-transfer, klarna-paylater

UK

klarna-debit, klarna-transfer, klarna-paylater, klarna-financing

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 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

For the initial authorization of recurring payments:

  • transaction type authorization and sequence-type first

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

For transaction types

  • authorization-renewal

  • adjust-authorization

  • adjust-capture

  • capture-authorization

  • refund-capture

  • void-authorization

For recurring payments:

  • transaction type authorization and sequence-type recurring or final

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:

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.

fields
samples
fields for recurring payments
samples for recurring payments

authorization-renewal

Extends the validity period of an existing authorization. You can only renew authorizations that have not yet been captured/voided.

fields
samples

adjust-authorization

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

fields
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.

fields
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.

fields
samples

adjust-capture

Updates/adds shipping/tracking information to an existing capture.

fields
samples

refund-capture

Full or partial refund of a captured order amount.

fields
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.

An authorization is valid for 28 days (default setting - contact Merchant Support for changes). This can be extended with an authorization-renewal.

auto-capture

For digital goods/services, authorizations can be captured automatically:

To activate auto-capture, set the auto-capture field to true in your authorization request.

This feature is only for digital goods/services:
The order-item.type of each order-item must be digital.
Otherwise, the authorization cannot be captured automatically.
authorization/pending-authorization Workflow
klarna v2 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) and consumer data (e.g. name, billing/shipping 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 check 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 Fields

Fields can be Mandatory or Optional.

Field M/O Data Type Size Description

merchant-account-id

M

String

36

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

request-id

M

String

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

String

30

The requested transaction type. Set this field to 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 total amount of all order items.

Use . (decimal point) as separator.

requested-amount@currency

M

String

3

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

auto-capture

O

Boolean

Set this field to true to enable auto-capture.
If this authorization is successful, it will be captured automatically.
For digital goods/services only.

order-number

O

String

255

Order number as provided by merchant.
If you send it, it shows as "order number" on Klarna's payment confirmation page.

locale

M

String

5

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

transaction-id

Response only

String

36

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

transaction-state

Response only

String

12

Transaction status.
Possible values:

  • success

  • failed

completion-time-stamp

Response only

DateTime

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

payment-methods.payment-method

@name

M

String

15

The name of the payment method used for the transaction.

Accepted values:

  • klarna-debit for Klarna direct debit

  • klarna-transfer for Klarna online bank transfer

  • klarna-paylater for Klarna payment on invoice

  • klarna-finance for Klarna payment in installments

@url

Response only

String

15

The URL to redirect the consumer to complete the payment process.

notifications.

notification-url

O

String

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.

first-name

O

String

32

Consumer’s first name.

last-name

O

String

32

Consumer’s last name.

email

O

String

64

Consumer’s email address.

gender

O

String

1

Consumer’s gender.

phone

O

String

32

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

account-holder.address.

Consumer’s address.

street1

O

String

128

Street of the consumer’s address.

street2

O

String

128

House number of the consumer’s address.

city

O

String

32

City of the consumer’s address.

country

M

String

3

Country code of the consumer’s address.

postal-code

O

String

16

Postal/ZIP code of the consumer’s address.

shipping.

Consumer’s shipping information.

first-name

O

String

32

Recipient’s first name.

last-name

O

String

32

Recipient’s last name.

email

O

String

64

Recipient’s email address.

phone

O

String

32

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

shipping.address.

Consumer’s shipping address.

street1

O

String

128

Street of the recipient’s address.

street2

O

String

128

House number of the recipient’s address.

city

O

String

32

City of the recipient’s address.

country

O

String

3

Country code of the recipient’s address.

postal-code

O

String

16

Postal/ZIP code of the recipient’s address.

order-items.order-item.

Description of a specific order item.

quantity

M

Numeric

n/a

Total number of this item in the shopping basket.

description

O

String

1024

Description of the item in the shopping basket.

article-number

O

String

256

EAN or other merchant-side article identifier.

name

M

String

256

Name of the item in the shopping basket.

amount

M

Numeric

18.3

Item’s price per unit.

Use . (decimal point) as separator.

amount@currency

M

String

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

M/O

Numeric

5,2

Item’s tax rate per unit in percent.
Mandatory if tax-amount is specified.
Must not be sent in requests that contain order-items with order-item-type sales_tax or store_credit.

tax-amount

M/O

Numeric

5,2

Item’s tax value per unit.
Mandatory if tax-rate is specified.
Must not be sent in requests that contain order-items with order-item-type sales_tax or store_credit.

discount

O

Numeric

18.3

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

type

M

String

n/a

Order item type.
Possible values:

  • shipment_fee

  • handling_fee

  • discount

  • physical

  • sales_tax

  • digital

  • gift_card

  • store_credit

sales_tax and store_credit reduce the total request-amount.

image-url

O

String

1024

URL to an image of the order item.

product-url

O

String

1024

URL to the product description of the order item.

category-path

O

String

750

The product’s category path as used in the your webshop.
Include the full and most detailed category.
Seperate segments with >.

global-trade-item-number

O

String

200

The product’s Global Trade Item Number (GTIN). Common types of GTIN are EAN, ISBN or UPC.
Exclude dashes and spaces where possible.

manufacturer-part-number

O

String

200

The product’s Manufacturer Part Number (MPN), which - together with the brand - uniquely identifies a product.
Only submit MPNs assigned by a manufacturer.
Use the most specific MPN possible.

brand

O

String

100

The product’s brand name as generally recognized by consumers.
If no brand is available for this order-item, do not send this field.

statuses.status.

Contains information on the status of a specific transaction.

@code

Response only

String

12

Transaction status code.
→ Complete list of status codes.

@description

Response only

String

256

Transaction status message.

@severity

Response only

String

20

The definition of the status message. Possible values:

  • information

  • warning

  • error

@provider-code

Response only

String

34

Original Klarna error code.

@provider-message

Response only

String

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

@provider-transaction-id

Response only

String

36

Klarna reservation number.

additional-provider-data.provider-data

Contains max. 1 additional data item for Klarna.

request

O

String

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
<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">10</requested-amount>
  <account-holder>
    <address>
      <country>AT</country>
    </address>
  </account-holder>
  <order-items>
    <order-item>
      <name>Item 1</name>
      <amount currency="EUR">10.0</amount>
      <quantity>1</quantity>
      <type>physical</type>
      <image-url>http://image.example.com/image</image-url>
      <product-url>http://product.example.com/product</product-url>
      <brand>brand</brand>
      <global-trade-item-number>023434021020340045</global-trade-item-number>
      <manufacturer-part-number>23553423442343</manufacturer-part-number>
      <category-path>example>product</category-path>
    </order-item>
  </order-items>
  <payment-methods>
    <payment-method name="klarna-paylater"/>
  </payment-methods>
  <locale>en</locale>
</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>62478dfc-5f84-4843-8fdd-9016c732854c</transaction-id>
    <request-id>9f47b7f8-13f7-48aa-8098-7546f58457e6</request-id>
    <transaction-type>authorization</transaction-type>
    <transaction-state>success</transaction-state>
    <completion-time-stamp>2020-04-23T09:23:21.000Z</completion-time-stamp>
    <statuses>
        <status code="201.0000" description="The resource was successfully created." severity="information"/>
    </statuses>
    <requested-amount currency="EUR">10</requested-amount>
    <account-holder>
        <address>
            <country>AT</country>
        </address>
    </account-holder>
    <order-items>
        <order-item>
            <name>Item 1</name>
            <amount currency="EUR">10.0</amount>
            <quantity>1</quantity>
            <type>physical</type>
            <product-url>http://product.example.com/product</product-url>
            <category-path>example&gt;product</category-path>
            <brand>brand</brand>
            <global-trade-item-number>023434021020340045</global-trade-item-number>
            <manufacturer-part-number>23553423442343</manufacturer-part-number>
            <image-url>http://image.example.com/image</image-url>
        </order-item>
    </order-items>
    <payment-methods>
        <payment-method url="https://api-test.wirecard.com:443/engine/notification/klarna/lightBoxPaymentPage?category=pay_later&amp;client_token=eyJhbGciOiJSUzI1NiIsImtpZCI6IjgyMzA1ZWJjLWI4MTEtMzYzNy1hYTRjLTY2ZWNhMTg3NGYzZCJ9.ewogICJzZXNzaW9uX2lkIiA6ICI4NWE2ZGI5Ni02OWM2LTJlYmItYmFkMS04MWJmNTdlYjM2NmYiLAogICJiYXNlX3VybCIgOiAiaHR0cHM6Ly9rbGFybmEtcGF5bWVudHMtZXUucGxheWdyb3VuZC5rbGFybmEuY29tL3BheW1lbnRzIiwKICAiZGVzaWduIiA6ICJrbGFybmEiLAogICJsYW5ndWFnZSIgOiAiZW4iLAogICJwdXJjaGFzZV9jb3VudHJ5IiA6ICJBVCIsCiAgInRyYWNlX2Zsb3ciIDogZmFsc2UsCiAgImVudmlyb25tZW50IiA6ICJwbGF5Z3JvdW5kIiwKICAibWVyY2hhbnRfbmFtZSIgOiAiUGxheWdyb3VuZCBEZW1vIE1lcmNoYW50IiwKICAic2Vzc2lvbl90eXBlIiA6ICJQQVlNRU5UUyIsCiAgImNsaWVudF9ldmVudF9iYXNlX3VybCIgOiAiaHR0cHM6Ly9ldS5wbGF5Z3JvdW5kLmtsYXJuYWV2dC5jb20iLAogICJleHBlcmltZW50cyIgOiBbIF0KfQ.S6R1pyT9ZxMCKEY-hWQ3TBr0GqkyBlZNXEIgYO6s9JHsMe-Iya4aEo7CJsEliJ5-K__Mh55gD9Rx2n1WZyvs7XazIQyZIlqKt5lJOv62c8gVeY3LrMXBe9-PvSo6fZtNKig6CPRZQmh9G7Swrg8fli5uKStDHCKve4gvEs3HcBBC-mP9Bu4qwfrMMaiHCjLkxyD9wzw-Wqy43OG_smP-bFTBzUp9H9qyqZR_NKzxpZiRV9w63LnakrfgBm23ZSOMeVOyypaFdnxKZIHvm6-PtoJEf0Rhqy3PnfgmJiDkyTNUJCSV0d2aP9UBDUaP33tbp7I37DGAtskJf0qE8lHFmw&amp;session=85a6db96-69c6-2ebb-bad1-81bf57eb366f&amp;locale=en" name="klarna-paylater"/>
    </payment-methods>
    <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>
authorization with auto-capture Samples
authorization with auto-capture Request
<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">10</requested-amount>
  <account-holder>
    <address>
      <country>AT</country>
    </address>
  </account-holder>
  <order-items>
    <order-item>
      <name>Item 1</name>
      <amount currency="EUR">10.0</amount>
      <quantity>1</quantity>
      <type>digital</type>
    </order-item>
  </order-items>
  <payment-methods>
    <payment-method name="klarna-paylater"/>
  </payment-methods>
  <locale>en</locale>
  <auto-capture>true</auto-capture>
</payment>
authorization with auto-capture 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>a81ee397-a02f-4ebd-abf3-5b3bcaad6e81</transaction-id>
    <request-id>d24b82f4-38a1-48fd-9a62-2d9f8cde985b</request-id>
    <transaction-type>authorization</transaction-type>
    <transaction-state>success</transaction-state>
    <completion-time-stamp>2020-02-26T09:41:04.000+01:00</completion-time-stamp>
    <statuses>
        <status code="201.0000" description="The resource was successfully created." severity="information"/>
    </statuses>
    <requested-amount currency="EUR">10</requested-amount>
    <account-holder>
        <address>
            <country>AT</country>
        </address>
    </account-holder>
    <order-items>
        <order-item>
            <name>Item 1</name>
            <amount currency="EUR">10.0</amount>
            <quantity>1</quantity>
            <type>digital</type>
        </order-item>
    </order-items>
    <payment-methods>
        <payment-method url="http://localhost:8080/engine/notification/klarna/lightBoxPaymentPage?category=pay_later&amp;client_token=eyJhbGciOiJSUzI1NiIsImtpZCI6IjgyMzA1ZWJjLWI4MTEtMzYzNy1hYTRjLTY2ZWNhMTg3NGYzZCJ9.ewogICJzZXNzaW9uX2lkIiA6ICIzNWE0OWJlOC1iMGZiLTFiZDgtYThjYy1jZjBmZDYyNzk4ZmEiLAogICJiYXNlX3VybCIgOiAiaHR0cHM6Ly9rbGFybmEtcGF5bWVudHMtZXUucGxheWdyb3VuZC5rbGFybmEuY29tIiwKICAiZGVzaWduIiA6ICJrbGFybmEiLAogICJsYW5ndWFnZSIgOiAiZW4iLAogICJwdXJjaGFzZV9jb3VudHJ5IiA6ICJBVCIsCiAgInRyYWNlX2Zsb3ciIDogZmFsc2UsCiAgImVudmlyb25tZW50IiA6ICJwbGF5Z3JvdW5kIiwKICAibWVyY2hhbnRfbmFtZSIgOiAiUGxheWdyb3VuZCBEZW1vIE1lcmNoYW50IiwKICAic2Vzc2lvbl90eXBlIiA6ICJQQVlNRU5UUyIsCiAgImNsaWVudF9ldmVudF9iYXNlX3VybCIgOiAiaHR0cHM6Ly9ldnQucGxheWdyb3VuZC5rbGFybmEuY29tIiwKICAiZXhwZXJpbWVudHMiIDogWyBdCn0.MDhnIx_MWlzvRowLDZO4e0khxkk5jj-OcpYjlceW7SMVp2axCl2cvLfCYX56S9AIKWplfAjWZ2qcaEo0Gl3hpOMA6CvtSnxF93ayWF3Kyf5Abq23IV0FKqp1bF6baLkiS2qFSyf5ILS8WF0LcADe12jssRCCeZQJM2eucR8CztfLaoahTPRysB5GRMdQLZT1RjWGKOCYcI97MMDlN0Pf6mwWCtaanOgD7UI72PP9BgSyzAr7Efao-WSt1Vkb8ovxgHeJqQ0oBIF-xMlz7jEd0zpM5MaIsNxhR-t8-O3BmDNR6tw0w2h-HxOCm8ziOWxKB9gg0R6tq9JoP2iiM3pcCg&amp;session=35a49be8-b0fb-1bd8-a8cc-cf0fd62798fa&amp;locale=en" name="klarna-paylater"/>
    </payment-methods>
    <locale>en</locale>
    <auto-capture>true</auto-capture>
</payment>
Recurring authorization

Klarna Payments support recurring transactions.

To initiate recurring payments, you need to provide appropriate values for periodic-type and sequence-type in your authorization request. From these values, Wirecard Payment Gateway generates a consumer token that can be used for recurring payments.

You can capture recurring authorizations automatically with auto-capture.

Recurring authorization Fields

Fields can be Mandatory or Optional.

Field M/O Data Type Size Description

merchant-account-id

M

String

36

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

request-id

M

String

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

String

30

The requested transaction type. Set this field to 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 total amount of all order items.

Use . (decimal point) as separator.

requested-amount@currency

M

String

3

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

parent-transaction-id

M/O

String

36

Enter the transaction-id of a preceding authorization. That can be either the first (initial) or any other previous (recurring) authorization.
Mandatory for recurring authorizations with sequence-type recurring or final.

auto-capture

O

Boolean

Set this field to true to enable auto-capture.
If this authorization is successful, it will be captured automatically.
For digital goods/services only.

order-number

O

String

255

Order number as provided by merchant.
If you send it, it shows as "order number" on Klarna's payment confirmation page.

locale

M

String

5

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

transaction-id

Response only

String

36

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

transaction-state

Response only

String

12

Transaction status.
Possible values:

  • success

  • failed

completion-time-stamp

Response only

DateTime

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

parent-transaction-amount

Response only

String

18.3

requested-amount of the preceding authorization.
Not returned for recurring authorizations with sequence-type first.

parent-transaction-amount@currency

Response only

String

3

requested-amount@currency of the preceding authorization.
Not returned for recurring authorizations with sequence-type first.

periodic

For recurring payments.

periodic-type

M

String

24

Periodic type of recurring/periodic payments:

  • recurring

  • installment

Both values are processed in the same way.

sequence-type

M

String

10

Specifies the occurence of an authorization in a sequence of recurring/periodic payments:

  • first:

    • For the initial authorization request.

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

  • recurring:

    • For recurring authorization requests that follow the initial recurring payment or any further recurring payments.

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

  • final:

    • For the last recurring authorization of a sequence.

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

payment-methods.payment-method

@name

M/O

String

15

The name of the payment method used for the transaction.

Mandatory for sequence-type first.
Optional for sequence-type recurring and final.

Accepted values:

  • klarna-debit for Klarna direct debit

  • klarna-transfer for Klarna online bank transfer

  • klarna-paylater for Klarna payment on invoice

klarna-finance does not support recurring payments.

@url

Response only

String

15

The URL to redirect the consumer to complete the payment process. Returned for the initial authorization only.

notifications.

notification-url

O

String

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.

first-name

O

String

32

Consumer’s first name.

last-name

O

String

32

Consumer’s last name.

email

O

String

64

Consumer’s email address.

gender

O

String

1

Consumer’s gender.

phone

O

String

32

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

account-holder.address.

Consumer’s address.

street1

O

String

128

Street of the consumer’s address.

street2

O

String

128

House number of the consumer’s address.

city

O

String

32

City of the consumer’s address.

country

M

String

3

Country code of the consumer’s address.

postal-code

O

String

16

Postal/ZIP code of the consumer’s address.

shipping.

Consumer’s shipping information.

first-name

O

String

32

Recipient’s first name.

last-name

O

String

32

Recipient’s last name.

email

O

String

64

Recipient’s email address.

phone

O

String

32

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

shipping.address.

Consumer’s shipping address.

street1

O

String

128

Street of the recipient’s address.

street2

O

String

128

House number of the recipient’s address.

city

O

String

32

City of the recipient’s address.

country

O

String

3

Country code of the recipient’s address.

postal-code

O

String

16

Postal/ZIP code of the recipient’s address.

order-items.order-item.

Description of a specific order item.

quantity

M

Numeric

n/a

Total number of this item in the shopping basket.

description

O

String

1024

Description of the item in the shopping basket.

article-number

O

String

256

EAN or other merchant-side article identifier.

name

M

String

256

Name of the item in the shopping basket.

amount

M

Numeric

18.3

Item’s price per unit.

Use . (decimal point) as separator.

amount@currency

M

String

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

M/O

Numeric

5,2

Item’s tax rate per unit in percent.
Mandatory if tax-amount is specified.
Must not be sent in requests that contain order-items with order-item-type sales_tax or store_credit.

tax-amount

M/O

Numeric

5,2

Item’s tax value per unit.
Mandatory if tax-rate is specified.
Must not be sent in requests that contain order-items with order-item-type sales_tax or store_credit.

discount

O

Numeric

18.3

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

type

M

String

n/a

Order item type.
Possible values:

  • shipment_fee

  • handling_fee

  • discount

  • physical

  • sales_tax

  • digital

  • gift_card

  • store_credit

sales_tax and store_credit reduce the total request-amount.

image-url

O

String

1024

URL to an image of the order item.

product-url

O

String

1024

URL to the product description of the order item.

category-path

O

String

750

The product’s category path as used in the your webshop.
Include the full and most detailed category.
Seperate segments with >.

global-trade-item-number

O

String

200

The product’s Global Trade Item Number (GTIN). Common types of GTIN are EAN, ISBN or UPC.
Exclude dashes and spaces where possible.

manufacturer-part-number

O

String

200

The product’s Manufacturer Part Number (MPN), which - together with the brand - uniquely identifies a product.
Only submit MPNs assigned by a manufacturer.
Use the most specific MPN possible.

brand

O

String

100

The product’s brand name as generally recognized by consumers.
If no brand is available for this order-item, do not send this field.

statuses.status.

Contains information on the status of a specific transaction.

@code

Response only

String

12

Transaction status code.
→ Complete list of status codes.

@description

Response only

String

256

Transaction status message.

@severity

Response only

String

20

The definition of the status message. Possible values:

  • information

  • warning

  • error

@provider-code

Response only

String

34

Original Klarna error code.

@provider-message

Response only

String

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

@provider-transaction-id

Response only

String

36

Klarna reservation number.

additional-provider-data.provider-data

Contains max. 1 additional data item for Klarna.

request

O

String

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"}]}

Recurring authorization Samples
Initial authorization Request for Recurring Payments
<?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="GBP">20.00</requested-amount>
    <periodic>
        <periodic-type>recurring</periodic-type>
        <sequence-type>first</sequence-type>
    </periodic>
    <account-holder>
        <first-name>John</first-name>
        <last-name>Doe</last-name>
        <email>john@doe.com</email>
        <date-of-birth>1980-01-01</date-of-birth>
        <phone>+421123456789</phone>
        <address>
            <street1>Mullerstrasse 137</street1>
            <street2>Mullerstrasse 138</street2>
            <city>Berlin</city>
            <state>Berlin</state>
            <country>GB</country>
            <postal-code>13353</postal-code>
        </address>
    </account-holder>
    <shipping>
        <first-name>Albert</first-name>
        <last-name>Doe</last-name>
        <phone>+421123456789</phone>
        <email>john@doe.com</email>
        <address>
            <street1>Mullerstrasse 137</street1>
            <street2>Mullerstrasse 138</street2>
            <city>Berlin</city>
            <state>Berlin</state>
            <country>DE</country>
            <postal-code>13353</postal-code>
        </address>
    </shipping>
    <ip-address>127.0.0.1</ip-address>
    <order-items>
        <order-item>
            <name>Name 1</name>
            <description>Description 1</description>
            <article-number>123456</article-number>
            <amount currency="GBP">10.00</amount>
            <quantity>2</quantity>
            <type>physical</type>
            <image-url>http://image.example.com/image</image-url>
            <product-url>http://product.example.com/product</product-url>
        </order-item>
    </order-items>
    <payment-methods>
        <payment-method name="klarna-paylater"/>
    </payment-methods>
    <locale>en</locale>
</payment>
Initial authorization Response for Recurring Payments
<?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>e3242c60-a005-454d-b8ff-d4883c52e2a3</transaction-id>
    <request-id>f99c1a15-7204-4359-9466-5b0f5b37d02c</request-id>
    <transaction-type>authorization</transaction-type>
    <transaction-state>success</transaction-state>
    <completion-time-stamp>2020-02-27T13:36:51.000+01:00</completion-time-stamp>
    <statuses>
        <status code="201.0000" description="The resource was successfully created." severity="information"/>
    </statuses>
    <requested-amount currency="GBP">20.00</requested-amount>
    <account-holder>
        <first-name>John</first-name>
        <last-name>Doe</last-name>
        <email>john@doe.com</email>
        <phone>+421123456789</phone>
        <address>
            <street1>Mullerstrasse 137</street1>
            <street2>Mullerstrasse 138</street2>
            <city>Berlin</city>
            <state>Berlin</state>
            <country>GB</country>
            <postal-code>13353</postal-code>
        </address>
    </account-holder>
    <shipping>
        <first-name>Albert</first-name>
        <last-name>Doe</last-name>
        <phone>+421123456789</phone>
        <address>
            <street1>Mullerstrasse 137</street1>
            <street2>Mullerstrasse 138</street2>
            <city>Berlin</city>
            <state>Berlin</state>
            <country>DE</country>
            <postal-code>13353</postal-code>
        </address>
        <email>john@doe.com</email>
    </shipping>
    <ip-address>127.0.0.1</ip-address>
    <order-items>
        <order-item>
            <name>Name 1</name>
            <description>Description 1</description>
            <article-number>123456</article-number>
            <amount currency="GBP">10.00</amount>
            <quantity>2</quantity>
            <type>physical</type>
            <product-url>http://product.example.com/product</product-url>
            <image-url>http://image.example.com/image</image-url>
        </order-item>
    </order-items>
    <payment-methods>
        <payment-method url="http://localhost:8080/engine/notification/klarna/lightBoxPaymentPage?category=pay_later&amp;client_token=eyJhbGciOiJSUzI1NiIsImtpZCI6IjgyMzA1ZWJjLWI4MTEtMzYzNy1hYTRjLTY2ZWNhMTg3NGYzZCJ9.ewogICJzZXNzaW9uX2lkIiA6ICIxMmEwNzIwMy1iMDJmLTEzZDItOTFjNy05OWNjMzFiMzlkOTIiLAogICJiYXNlX3VybCIgOiAiaHR0cHM6Ly9rbGFybmEtcGF5bWVudHMtZXUucGxheWdyb3VuZC5rbGFybmEuY29tIiwKICAiZGVzaWduIiA6ICJrbGFybmEiLAogICJsYW5ndWFnZSIgOiAiZW4iLAogICJwdXJjaGFzZV9jb3VudHJ5IiA6ICJHQiIsCiAgInRyYWNlX2Zsb3ciIDogZmFsc2UsCiAgImVudmlyb25tZW50IiA6ICJwbGF5Z3JvdW5kIiwKICAibWVyY2hhbnRfbmFtZSIgOiAiUGxheWdyb3VuZCBEZW1vIE1lcmNoYW50IiwKICAic2Vzc2lvbl90eXBlIiA6ICJQQVlNRU5UUyIsCiAgImNsaWVudF9ldmVudF9iYXNlX3VybCIgOiAiaHR0cHM6Ly9ldnQucGxheWdyb3VuZC5rbGFybmEuY29tIiwKICAiZXhwZXJpbWVudHMiIDogWyBdCn0.b7huWY9YvjaOXlkBkRBNz0rlNipuitRK2E6NdoAeKwwAORCpT4fnqiggJBUjqJAq1gn_3aEZBmQcE65V99hIqcWUUTPi5bmKzB5Z2nkoEGdFvzlpG2K7kWlE9RwXhFULnCSeER4W0KTbHZkykH8MegWZOWIQIj7eLM3EK_tcewAd-IQCeKS4JqHFn73q_KxRhpmqyeYszWbTLkFNauXDQ8ggNRUPL9K3cmk3RIuGhJkd-GmEbLIOVBio3eiRbOC3z1LKXzahtIS8PPfr6_uDy4cVCJ5EbJmGS-AUgeRz8YHkqRLKTTyiQilqVVMksG4vzEhuAf9WELPTC8JZOXtqhw&amp;session=12a07203-b02f-13d2-91c7-99cc31b39d92&amp;locale=en" name="klarna-paylater"/>
    </payment-methods>
    <locale>en</locale>
    <periodic>
        <periodic-type>recurring</periodic-type>
        <sequence-type>first</sequence-type>
    </periodic>
</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 Request for Recurring Payment
<?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>
    <parent-transaction-id>c71e1004-e0ce-4ff9-a5e8-dc5c5ebed651</parent-transaction-id>
    <transaction-type>authorization</transaction-type>
    <requested-amount currency="GBP">20.00</requested-amount>
    <periodic>
        <periodic-type>recurring</periodic-type>
        <sequence-type>recurring </sequence-type>
    </periodic>
    <account-holder>
        <first-name>John</first-name>
        <last-name>Doe</last-name>
        <email>john@doe.com</email>
        <date-of-birth>1980-01-01</date-of-birth>
        <phone>+421123456789</phone>
        <address>
            <street1>Mullerstrasse 137</street1>
            <street2>Mullerstrasse 138</street2>
            <city>Berlin</city>
            <state>Berlin</state>
            <country>GB</country>
            <postal-code>13353</postal-code>
        </address>
    </account-holder>
    <shipping>
        <first-name>Albert</first-name>
        <last-name>Doe</last-name>
        <phone>+421123456789</phone>
        <email>john@doe.com</email>
        <address>
            <street1>Mullerstrasse 137</street1>
            <street2>Mullerstrasse 138</street2>
            <city>Berlin</city>
            <state>Berlin</state>
            <country>DE</country>
            <postal-code>13353</postal-code>
        </address>
    </shipping>
    <ip-address>127.0.0.1</ip-address>
    <order-items>
        <order-item>
            <name>Name 1</name>
            <description>Description 1</description>
            <article-number>123456</article-number>
            <amount currency="GBP">10.00</amount>
            <quantity>2</quantity>
            <type>physical</type>
        </order-item>
    </order-items>
    <payment-methods>
        <payment-method name="klarna-paylater"/>
    </payment-methods>
    <locale>en</locale>
</payment>
authorization Response for Recurring Payment
<?xml version="1.0" encoding="UTF-8" standalone="yes"?>
<payment xmlns="http://www.elastic-payments.com/schema/payment" self="http://localhost:8080/engine/rest/merchants/f570c123-62f1-4a0d-8688-d999a05d50d4/payments/107941a6-d7ba-4e5c-b99d-4aa3eb8865f8">
    <merchant-account-id ref="http://localhost:8080/engine/rest/config/merchants/f570c123-62f1-4a0d-8688-d999a05d50d4">f570c123-62f1-4a0d-8688-d999a05d50d4</merchant-account-id>
    <transaction-id>107941a6-d7ba-4e5c-b99d-4aa3eb8865f8</transaction-id>
    <request-id>60de9e8d-7e80-432b-99dc-b1f5f845539a</request-id>
    <transaction-type>authorization</transaction-type>
    <transaction-state>success</transaction-state>
    <completion-time-stamp>2020-02-27T13:53:51.000+01:00</completion-time-stamp>
    <statuses>
        <status code="201.0000" description="guaranteed:The resource was successfully created." severity="information"/>
    </statuses>
    <requested-amount currency="GBP">20.00</requested-amount>
    <parent-transaction-id>c71e1004-e0ce-4ff9-a5e8-dc5c5ebed651</parent-transaction-id>
    <account-holder>
        <first-name>John</first-name>
        <last-name>Doe</last-name>
        <email>john@doe.com</email>
        <phone>+421123456789</phone>
        <address>
            <street1>Mullerstrasse 137</street1>
            <street2>Mullerstrasse 138</street2>
            <city>Berlin</city>
            <state>Berlin</state>
            <country>GB</country>
            <postal-code>13353</postal-code>
        </address>
    </account-holder>
    <shipping>
        <first-name>Albert</first-name>
        <last-name>Doe</last-name>
        <phone>+421123456789</phone>
        <address>
            <street1>Mullerstrasse 137</street1>
            <street2>Mullerstrasse 138</street2>
            <city>Berlin</city>
            <state>Berlin</state>
            <country>DE</country>
            <postal-code>13353</postal-code>
        </address>
        <email>john@doe.com</email>
    </shipping>
    <ip-address>127.0.0.1</ip-address>
    <order-items>
        <order-item>
            <name>Name 1</name>
            <description>Description 1</description>
            <article-number>123456</article-number>
            <amount currency="GBP">10.00</amount>
            <quantity>2</quantity>
            <type>physical</type>
        </order-item>
    </order-items>
    <payment-methods>
        <payment-method name="klarna-paylater"/>
    </payment-methods>
    <parent-transaction-amount currency="GBP">20.000000</parent-transaction-amount>
    <api-id>elastic-api</api-id>
    <locale>en</locale>
    <periodic>
        <periodic-type>recurring</periodic-type>
        <sequence-type>recurring</sequence-type>
    </periodic>
</payment>
Final authorization Request for Recurring Payments
<?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>
    <parent-transaction-id>c71e1004-e0ce-4ff9-a5e8-dc5c5ebed651</parent-transaction-id>
    <transaction-type>authorization</transaction-type>
    <requested-amount currency="GBP">20.00</requested-amount>
    <periodic>
        <periodic-type>recurring</periodic-type>
        <sequence-type>final</sequence-type>
    </periodic>
    <account-holder>
        <first-name>John</first-name>
        <last-name>Doe</last-name>
        <email>john@doe.com</email>
        <date-of-birth>1980-01-01</date-of-birth>
        <phone>+421123456789</phone>
        <address>
            <street1>Mullerstrasse 137</street1>
            <street2>Mullerstrasse 138</street2>
            <city>Berlin</city>
            <state>Berlin</state>
            <country>GB</country>
            <postal-code>13353</postal-code>
        </address>
    </account-holder>
    <shipping>
        <first-name>Albert</first-name>
        <last-name>Doe</last-name>
        <phone>+421123456789</phone>
        <email>john@doe.com</email>
        <address>
            <street1>Mullerstrasse 137</street1>
            <street2>Mullerstrasse 138</street2>
            <city>Berlin</city>
            <state>Berlin</state>
            <country>DE</country>
            <postal-code>13353</postal-code>
        </address>
    </shipping>
    <ip-address>127.0.0.1</ip-address>
    <order-items>
        <order-item>
            <name>Name 1</name>
            <description>Description 1</description>
            <article-number>123456</article-number>
            <amount currency="GBP">10.00</amount>
            <quantity>2</quantity>
            <type>physical</type>
        </order-item>
    </order-items>
    <payment-methods>
        <payment-method name="klarna-paylater"/>
    </payment-methods>
    <locale>en</locale>
</payment>
Final authorization Response for Recurring Payments
<?xml version="1.0" encoding="UTF-8" standalone="yes"?>
<payment xmlns="http://www.elastic-payments.com/schema/payment" self="http://localhost:8080/engine/rest/merchants/f570c123-62f1-4a0d-8688-d999a05d50d4/payments/d1b80c4f-19be-4e93-bf4a-a49d5fc5f802">
    <merchant-account-id ref="http://localhost:8080/engine/rest/config/merchants/f570c123-62f1-4a0d-8688-d999a05d50d4">f570c123-62f1-4a0d-8688-d999a05d50d4</merchant-account-id>
    <transaction-id>d1b80c4f-19be-4e93-bf4a-a49d5fc5f802</transaction-id>
    <request-id>11d5cfee-1cce-44a3-9dea-88f641ee0818</request-id>
    <transaction-type>authorization</transaction-type>
    <transaction-state>success</transaction-state>
    <completion-time-stamp>2020-02-27T13:54:18.000+01:00</completion-time-stamp>
    <statuses>
        <status code="201.0000" description="guaranteed:The resource was successfully created." severity="information"/>
    </statuses>
    <requested-amount currency="GBP">20.00</requested-amount>
    <parent-transaction-id>c71e1004-e0ce-4ff9-a5e8-dc5c5ebed651</parent-transaction-id>
    <account-holder>
        <first-name>John</first-name>
        <last-name>Doe</last-name>
        <email>john@doe.com</email>
        <phone>+421123456789</phone>
        <address>
            <street1>Mullerstrasse 137</street1>
            <street2>Mullerstrasse 138</street2>
            <city>Berlin</city>
            <state>Berlin</state>
            <country>GB</country>
            <postal-code>13353</postal-code>
        </address>
    </account-holder>
    <shipping>
        <first-name>Albert</first-name>
        <last-name>Doe</last-name>
        <phone>+421123456789</phone>
        <address>
            <street1>Mullerstrasse 137</street1>
            <street2>Mullerstrasse 138</street2>
            <city>Berlin</city>
            <state>Berlin</state>
            <country>DE</country>
            <postal-code>13353</postal-code>
        </address>
        <email>john@doe.com</email>
    </shipping>
    <ip-address>127.0.0.1</ip-address>
    <order-items>
        <order-item>
            <name>Name 1</name>
            <description>Description 1</description>
            <article-number>123456</article-number>
            <amount currency="GBP">10.00</amount>
            <quantity>2</quantity>
            <type>physical</type>
        </order-item>
    </order-items>
    <payment-methods>
        <payment-method name="klarna-paylater"/>
    </payment-methods>
    <parent-transaction-amount currency="GBP">20.000000</parent-transaction-amount>
    <api-id>elastic-api</api-id>
    <locale>en</locale>
    <periodic>
        <periodic-type>recurring</periodic-type>
        <sequence-type>final</sequence-type>
    </periodic>
</payment>
Recurring authorization with auto-capture Samples
Initial authorization with auto-capture Request for Recurring Payments
<?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="GBP">20.00</requested-amount>
    <periodic>
        <periodic-type>recurring</periodic-type>
        <sequence-type>first</sequence-type>
    </periodic>
    <account-holder>
        <first-name>John</first-name>
        <last-name>Doe</last-name>
        <email>john@doe.com</email>
        <date-of-birth>1980-01-01</date-of-birth>
        <phone>+421123456789</phone>
        <address>
            <street1>Mullerstrasse 137</street1>
            <street2>Mullerstrasse 138</street2>
            <city>Berlin</city>
            <state>Berlin</state>
            <country>GB</country>
            <postal-code>13353</postal-code>
        </address>
    </account-holder>
    <shipping>
        <first-name>Albert</first-name>
        <last-name>Doe</last-name>
        <phone>+421123456789</phone>
        <email>john@doe.com</email>
        <address>
            <street1>Mullerstrasse 137</street1>
            <street2>Mullerstrasse 138</street2>
            <city>Berlin</city>
            <state>Berlin</state>
            <country>DE</country>
            <postal-code>13353</postal-code>
        </address>
    </shipping>
    <ip-address>127.0.0.1</ip-address>
    <order-items>
        <order-item>
            <name>Name 1</name>
            <description>Description 1</description>
            <article-number>123456</article-number>
            <amount currency="GBP">10.00</amount>
            <quantity>2</quantity>
            <type>digital</type>
            <image-url>http://image.example.com/image</image-url>
            <product-url>http://product.example.com/product</product-url>
        </order-item>
    </order-items>
    <payment-methods>
        <payment-method name="klarna-paylater"/>
    </payment-methods>
    <locale>en</locale>
    <auto-capture>true</auto-capture>
 </payment>
Initial authorization with auto-capture Response for Recurring Payments
<?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>e3242c60-a005-454d-b8ff-d4883c52e2a3</transaction-id>
    <request-id>f99c1a15-7204-4359-9466-5b0f5b37d02c</request-id>
    <transaction-type>authorization</transaction-type>
    <transaction-state>success</transaction-state>
    <completion-time-stamp>2020-02-27T13:36:51.000+01:00</completion-time-stamp>
    <statuses>
        <status code="201.0000" description="The resource was successfully created." severity="information"/>
    </statuses>
    <requested-amount currency="GBP">20.00</requested-amount>
    <account-holder>
        <first-name>John</first-name>
        <last-name>Doe</last-name>
        <email>john@doe.com</email>
        <phone>+421123456789</phone>
        <address>
            <street1>Mullerstrasse 137</street1>
            <street2>Mullerstrasse 138</street2>
            <city>Berlin</city>
            <state>Berlin</state>
            <country>GB</country>
            <postal-code>13353</postal-code>
        </address>
    </account-holder>
    <shipping>
        <first-name>Albert</first-name>
        <last-name>Doe</last-name>
        <phone>+421123456789</phone>
        <address>
            <street1>Mullerstrasse 137</street1>
            <street2>Mullerstrasse 138</street2>
            <city>Berlin</city>
            <state>Berlin</state>
            <country>DE</country>
            <postal-code>13353</postal-code>
        </address>
        <email>john@doe.com</email>
    </shipping>
    <ip-address>127.0.0.1</ip-address>
    <order-items>
        <order-item>
            <name>Name 1</name>
            <description>Description 1</description>
            <article-number>123456</article-number>
            <amount currency="GBP">10.00</amount>
            <quantity>2</quantity>
            <type>digital</type>
            <product-url>http://product.example.com/product</product-url>
            <image-url>http://image.example.com/image</image-url>
        </order-item>
    </order-items>
    <payment-methods>
        <payment-method url="http://localhost:8080/engine/notification/klarna/lightBoxPaymentPage?category=pay_later&amp;client_token=eyJhbGciOiJSUzI1NiIsImtpZCI6IjgyMzA1ZWJjLWI4MTEtMzYzNy1hYTRjLTY2ZWNhMTg3NGYzZCJ9.ewogICJzZXNzaW9uX2lkIiA6ICIxMmEwNzIwMy1iMDJmLTEzZDItOTFjNy05OWNjMzFiMzlkOTIiLAogICJiYXNlX3VybCIgOiAiaHR0cHM6Ly9rbGFybmEtcGF5bWVudHMtZXUucGxheWdyb3VuZC5rbGFybmEuY29tIiwKICAiZGVzaWduIiA6ICJrbGFybmEiLAogICJsYW5ndWFnZSIgOiAiZW4iLAogICJwdXJjaGFzZV9jb3VudHJ5IiA6ICJHQiIsCiAgInRyYWNlX2Zsb3ciIDogZmFsc2UsCiAgImVudmlyb25tZW50IiA6ICJwbGF5Z3JvdW5kIiwKICAibWVyY2hhbnRfbmFtZSIgOiAiUGxheWdyb3VuZCBEZW1vIE1lcmNoYW50IiwKICAic2Vzc2lvbl90eXBlIiA6ICJQQVlNRU5UUyIsCiAgImNsaWVudF9ldmVudF9iYXNlX3VybCIgOiAiaHR0cHM6Ly9ldnQucGxheWdyb3VuZC5rbGFybmEuY29tIiwKICAiZXhwZXJpbWVudHMiIDogWyBdCn0.b7huWY9YvjaOXlkBkRBNz0rlNipuitRK2E6NdoAeKwwAORCpT4fnqiggJBUjqJAq1gn_3aEZBmQcE65V99hIqcWUUTPi5bmKzB5Z2nkoEGdFvzlpG2K7kWlE9RwXhFULnCSeER4W0KTbHZkykH8MegWZOWIQIj7eLM3EK_tcewAd-IQCeKS4JqHFn73q_KxRhpmqyeYszWbTLkFNauXDQ8ggNRUPL9K3cmk3RIuGhJkd-GmEbLIOVBio3eiRbOC3z1LKXzahtIS8PPfr6_uDy4cVCJ5EbJmGS-AUgeRz8YHkqRLKTTyiQilqVVMksG4vzEhuAf9WELPTC8JZOXtqhw&amp;session=12a07203-b02f-13d2-91c7-99cc31b39d92&amp;locale=en" name="klarna-paylater"/>
    </payment-methods>
    <locale>en</locale>
    <periodic>
        <periodic-type>recurring</periodic-type>
        <sequence-type>first</sequence-type>
    </periodic>
    <auto-capture>true</auto-capture>
 </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 with auto-capture Request for Recurring Payment
<?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>
    <parent-transaction-id>c71e1004-e0ce-4ff9-a5e8-dc5c5ebed651</parent-transaction-id>
    <transaction-type>authorization</transaction-type>
    <requested-amount currency="GBP">20.00</requested-amount>
    <periodic>
        <periodic-type>recurring</periodic-type>
        <sequence-type>recurring </sequence-type>
    </periodic>
    <account-holder>
        <first-name>John</first-name>
        <last-name>Doe</last-name>
        <email>john@doe.com</email>
        <date-of-birth>1980-01-01</date-of-birth>
        <phone>+421123456789</phone>
        <address>
            <street1>Mullerstrasse 137</street1>
            <street2>Mullerstrasse 138</street2>
            <city>Berlin</city>
            <state>Berlin</state>
            <country>GB</country>
            <postal-code>13353</postal-code>
        </address>
    </account-holder>
    <shipping>
        <first-name>Albert</first-name>
        <last-name>Doe</last-name>
        <phone>+421123456789</phone>
        <email>john@doe.com</email>
        <address>
            <street1>Mullerstrasse 137</street1>
            <street2>Mullerstrasse 138</street2>
            <city>Berlin</city>
            <state>Berlin</state>
            <country>DE</country>
            <postal-code>13353</postal-code>
        </address>
    </shipping>
    <ip-address>127.0.0.1</ip-address>
    <order-items>
        <order-item>
            <name>Name 1</name>
            <description>Description 1</description>
            <article-number>123456</article-number>
            <amount currency="GBP">10.00</amount>
            <quantity>2</quantity>
            <type>digital</type>
        </order-item>
    </order-items>
    <payment-methods>
        <payment-method name="klarna-paylater"/>
    </payment-methods>
    <locale>en</locale>
    <auto-capture>true</auto-capture>
</payment>
authorization with auto-capture Response for Recurring Payment
<?xml version="1.0" encoding="UTF-8" standalone="yes"?>
<payment xmlns="http://www.elastic-payments.com/schema/payment" self="http://localhost:8080/engine/rest/merchants/f570c123-62f1-4a0d-8688-d999a05d50d4/payments/107941a6-d7ba-4e5c-b99d-4aa3eb8865f8">
    <merchant-account-id ref="http://localhost:8080/engine/rest/config/merchants/f570c123-62f1-4a0d-8688-d999a05d50d4">f570c123-62f1-4a0d-8688-d999a05d50d4</merchant-account-id>
    <transaction-id>107941a6-d7ba-4e5c-b99d-4aa3eb8865f8</transaction-id>
    <request-id>60de9e8d-7e80-432b-99dc-b1f5f845539a</request-id>
    <transaction-type>authorization</transaction-type>
    <transaction-state>success</transaction-state>
    <completion-time-stamp>2020-02-27T13:53:51.000+01:00</completion-time-stamp>
    <statuses>
        <status code="201.0000" description="guaranteed:The resource was successfully created." severity="information"/>
    </statuses>
    <requested-amount currency="GBP">20.00</requested-amount>
    <parent-transaction-id>c71e1004-e0ce-4ff9-a5e8-dc5c5ebed651</parent-transaction-id>
    <account-holder>
        <first-name>John</first-name>
        <last-name>Doe</last-name>
        <email>john@doe.com</email>
        <phone>+421123456789</phone>
        <address>
            <street1>Mullerstrasse 137</street1>
            <street2>Mullerstrasse 138</street2>
            <city>Berlin</city>
            <state>Berlin</state>
            <country>GB</country>
            <postal-code>13353</postal-code>
        </address>
    </account-holder>
    <shipping>
        <first-name>Albert</first-name>
        <last-name>Doe</last-name>
        <phone>+421123456789</phone>
        <address>
            <street1>Mullerstrasse 137</street1>
            <street2>Mullerstrasse 138</street2>
            <city>Berlin</city>
            <state>Berlin</state>
            <country>DE</country>
            <postal-code>13353</postal-code>
        </address>
        <email>john@doe.com</email>
    </shipping>
    <ip-address>127.0.0.1</ip-address>
    <order-items>
        <order-item>
            <name>Name 1</name>
            <description>Description 1</description>
            <article-number>123456</article-number>
            <amount currency="GBP">10.00</amount>
            <quantity>2</quantity>
            <type>digital</type>
        </order-item>
    </order-items>
    <payment-methods>
        <payment-method name="klarna-paylater"/>
    </payment-methods>
    <parent-transaction-amount currency="GBP">20.000000</parent-transaction-amount>
    <api-id>elastic-api</api-id>
    <locale>en</locale>
    <periodic>
        <periodic-type>recurring</periodic-type>
        <sequence-type>recurring</sequence-type>
    </periodic>
    <auto-capture>true</auto-capture>
</payment>
Final authorization with auto-capture Request for Recurring Payments
<?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>
    <parent-transaction-id>c71e1004-e0ce-4ff9-a5e8-dc5c5ebed651</parent-transaction-id>
    <transaction-type>authorization</transaction-type>
    <requested-amount currency="GBP">20.00</requested-amount>
    <periodic>
        <periodic-type>recurring</periodic-type>
        <sequence-type>final</sequence-type>
    </periodic>
    <account-holder>
        <first-name>John</first-name>
        <last-name>Doe</last-name>
        <email>john@doe.com</email>
        <date-of-birth>1980-01-01</date-of-birth>
        <phone>+421123456789</phone>
        <address>
            <street1>Mullerstrasse 137</street1>
            <street2>Mullerstrasse 138</street2>
            <city>Berlin</city>
            <state>Berlin</state>
            <country>GB</country>
            <postal-code>13353</postal-code>
        </address>
    </account-holder>
    <shipping>
        <first-name>Albert</first-name>
        <last-name>Doe</last-name>
        <phone>+421123456789</phone>
        <email>john@doe.com</email>
        <address>
            <street1>Mullerstrasse 137</street1>
            <street2>Mullerstrasse 138</street2>
            <city>Berlin</city>
            <state>Berlin</state>
            <country>DE</country>
            <postal-code>13353</postal-code>
        </address>
    </shipping>
    <ip-address>127.0.0.1</ip-address>
    <order-items>
        <order-item>
            <name>Name 1</name>
            <description>Description 1</description>
            <article-number>123456</article-number>
            <amount currency="GBP">10.00</amount>
            <quantity>2</quantity>
            <type>digital</type>
        </order-item>
    </order-items>
    <payment-methods>
        <payment-method name="klarna-paylater"/>
    </payment-methods>
    <locale>en</locale>
    <auto-capture>true</auto-capture>
</payment>
Final authorization with auto-capture Response for Recurring Payments
<?xml version="1.0" encoding="UTF-8" standalone="yes"?>
<payment xmlns="http://www.elastic-payments.com/schema/payment" self="http://localhost:8080/engine/rest/merchants/f570c123-62f1-4a0d-8688-d999a05d50d4/payments/d1b80c4f-19be-4e93-bf4a-a49d5fc5f802">
    <merchant-account-id ref="http://localhost:8080/engine/rest/config/merchants/f570c123-62f1-4a0d-8688-d999a05d50d4">f570c123-62f1-4a0d-8688-d999a05d50d4</merchant-account-id>
    <transaction-id>d1b80c4f-19be-4e93-bf4a-a49d5fc5f802</transaction-id>
    <request-id>11d5cfee-1cce-44a3-9dea-88f641ee0818</request-id>
    <transaction-type>authorization</transaction-type>
    <transaction-state>success</transaction-state>
    <completion-time-stamp>2020-02-27T13:54:18.000+01:00</completion-time-stamp>
    <statuses>
        <status code="201.0000" description="guaranteed:The resource was successfully created." severity="information"/>
    </statuses>
    <requested-amount currency="GBP">20.00</requested-amount>
    <parent-transaction-id>c71e1004-e0ce-4ff9-a5e8-dc5c5ebed651</parent-transaction-id>
    <account-holder>
        <first-name>John</first-name>
        <last-name>Doe</last-name>
        <email>john@doe.com</email>
        <phone>+421123456789</phone>
        <address>
            <street1>Mullerstrasse 137</street1>
            <street2>Mullerstrasse 138</street2>
            <city>Berlin</city>
            <state>Berlin</state>
            <country>GB</country>
            <postal-code>13353</postal-code>
        </address>
    </account-holder>
    <shipping>
        <first-name>Albert</first-name>
        <last-name>Doe</last-name>
        <phone>+421123456789</phone>
        <address>
            <street1>Mullerstrasse 137</street1>
            <street2>Mullerstrasse 138</street2>
            <city>Berlin</city>
            <state>Berlin</state>
            <country>DE</country>
            <postal-code>13353</postal-code>
        </address>
        <email>john@doe.com</email>
    </shipping>
    <ip-address>127.0.0.1</ip-address>
    <order-items>
        <order-item>
            <name>Name 1</name>
            <description>Description 1</description>
            <article-number>123456</article-number>
            <amount currency="GBP">10.00</amount>
            <quantity>2</quantity>
            <type>digital</type>
        </order-item>
    </order-items>
    <payment-methods>
        <payment-method name="klarna-paylater"/>
    </payment-methods>
    <parent-transaction-amount currency="GBP">20.000000</parent-transaction-amount>
    <api-id>elastic-api</api-id>
    <locale>en</locale>
    <periodic>
        <periodic-type>recurring</periodic-type>
        <sequence-type>final</sequence-type>
    </periodic>
    <auto-capture>true</auto-capture>
</payment>
authorization-renewal

Use this transaction type to postpone the expiry date of an existing authorization:
authorization-renewal resets the authorization validity period to 28 days, starting with the date of the authorization-renewal.
28 days is the default setting - contact Merchant Support for changes.

  • You can only renew authorizations that have not yet been voided or fully captured.

  • Max. authorization validity period limit:
    You cannot renew an authorization to more than 180 days in total.

  • You cannot renew authorizations that have already expired.

authorization-renewal Fields

Fields can be Mandatory or Optional.

Field M/O Data Type Size Description

merchant-account-id

O

String

36

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

request-id

M

String

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

String

30

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

parent-transaction-id

M

String

36

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

parent-transaction-amount

Response only

String

18.3

requested-amount of the preceding authorization or adjust-authorization.

parent-transaction-amount@currency

Response only

String

3

requested-amount@currency of the preceding authorization or adjust-authorization.

requested-amount

Response only

Numeric

18.3

Total amount with extended validation period. If the preceding authorization or adjust-authorization has not been partially captured, this equals the requested-amount of the preceding transaction.
The number of decimal places depends on the currency.

requested-amount@currency

Response only

String

3

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

order-detail

Response only

String

order-detail of the preceding authorization or adjust-authorization.

order-number

Response only

String

255

Order number of the merchant as sent in the preceding authorization or adjust-authorization. Shows as "order number" on Klarna's payment confirmation page.

locale

Response only

String

5

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

transaction-id

Response only

String

36

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

transaction-state

Response only

String

12

Transaction status.
Possible values:

  • success

  • failed

completion-time-stamp

Response only

DateTime

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

payment-methods.payment-method

@name

O

String

15

The name of the payment method used for the transaction.

Accepted values:

  • klarna-debit for Klarna direct debit

  • klarna-transfer for Klarna online bank transfer

  • klarna-paylater for Klarna payment on invoice

  • klarna-finance for Klarna payment in installments

notifications.

notification-url

O

String

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

Response only

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

Response only

String

32

Consumer’s first name.

last-name

Response only

String

32

Consumer’s last name.

email

Response only

String

64

Consumer’s email address.

gender

Response only

String

1

Consumer’s gender.

phone

Response only

String

32

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

account-holder.address.

Consumer’s address.

street1

Response only

String

128

Street of the consumer’s address.

street2

Response only

String

128

House number of the consumer’s address.

city

Response only

String

32

City of the consumer’s address.

country

Response only

String

3

Country code of the consumer’s address.

postal-code

Response only

String

16

Postal/ZIP code of the consumer’s address.

shipping.

Consumer’s shipping information.

first-name

Response only

String

32

Recipient’s first name.

last-name

Response only

String

32

Recipient’s last name.

email

Response only

String

64

Recipient’s email address.

phone

Response only

String

32

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

shipping.address.

Consumer’s shipping address.

street1

Response only

String

128

Street of the recipient’s address.

street2

Response only

String

128

House number of the recipient’s address.

city

Response only

String

32

City of the recipient’s address.

country

Response only

String

3

Country code of the recipient’s address.

postal-code

Response only

String

16

Postal/ZIP code of the recipient’s address.

order-items.order-item.

Description of a specific order item.

quantity

Response only

Numeric

n/a

Total number of this item in the shopping basket.

description

Response only

String

1024

Description of the item in the shopping basket.

article-number

Response only

String

256

EAN or other merchant-side article identifier.

name

Response only

String

256

Name of the item in the shopping basket.

amount

Response only

Numeric

18.3

Item’s price per unit.

amount@currency

Response only

String

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

Response only

Numeric

5,2

Item’s tax rate per unit in percent.

tax-amount

Response only

Numeric

5,2

Item’s tax value per unit.

discount

Response only

Numeric

18.3

The discount value for one order item.

type

Response only

String

n/a

Order item type.
Possible values:

  • shipment_fee

  • handling_fee

  • discount

  • physical

  • sales_tax

  • digital

  • gift_card

  • store_credit

image-url

Response only

String

1024

URL to an image of the order item.

product-url

Response only

String

1024

URL to the product description of the order item.

category-path

Response only

String

750

The product’s category path as used in the your webshop. Segments are seperated with >.

global-trade-item-number

Response only

String

200

The product’s Global Trade Item Number (GTIN). Common types of GTIN are EAN, ISBN or UPC.

manufacturer-part-number

Response only

String

200

The product’s Manufacturer Part Number (MPN), which - together with the brand - uniquely identifies a product.

brand

Response only

String

100

The product’s brand name as generally recognized by consumers.

statuses.status.

Contains information on the status of a specific transaction.

@code

Response only

String

12

Transaction status code.
→ Complete list of status codes.

@description

Response only

String

256

Transaction status message.

@severity

Response only

String

20

The definition of the status message. Possible values:

  • information

  • warning

  • error

@provider-code

Response only

String

34

Original Klarna error code.

@provider-message

Response only

String

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

@provider-transaction-id

Response only

String

36

Klarna reservation number.

authorization-renewal Samples
authorization-renewal Request
<?xml version="1.0" encoding="utf-8" standalone="yes"?>
<payment xmlns="http://www.elastic-payments.com/schema/payment">
    <request-id>{{$guid}}</request-id>
    <transaction-type>authorization-renewal</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.
authorization-renewal Response
<?xml version="1.0" encoding="UTF-8" standalone="yes"?>
<payment xmlns="http://www.elastic-payments.com/schema/payment" self="http://localhost:8060/engine/rest/merchants/f570c123-62f1-4a0d-8688-d999a05d50d4/payments/18d1495c-466c-4086-aa32-455433dc9d12">
    <merchant-account-id ref="http://localhost:8060/engine/rest/config/merchants/f570c123-62f1-4a0d-8688-d999a05d50d4">f570c123-62f1-4a0d-8688-d999a05d50d4</merchant-account-id>
    <transaction-id>18d1495c-466c-4086-aa32-455433dc9d12</transaction-id>
    <request-id>8cedf723-09b8-42ee-b58b-a4175f215721</request-id>
    <transaction-type>authorization-renewal</transaction-type>
    <transaction-state>success</transaction-state>
    <completion-time-stamp>2020-01-10T16:51:55.000+01:00</completion-time-stamp>
    <statuses>
        <status code="201.0000" description="guaranteed:The resource was successfully created." severity="information"/>
    </statuses>
    <requested-amount currency="GBP">24.00</requested-amount>
    <parent-transaction-id>{{txnId}}</parent-transaction-id>
    <account-holder>
        <first-name>John</first-name>
        <last-name>Doe</last-name>
        <email>test@test.com</email>
        <phone>+49421123456789</phone>
        <address>
            <street1>Green</street1>
            <city>London</city>
            <state>United Kingdom</state>
            <country>GB</country>
            <postal-code>E1 7AA</postal-code>
        </address>
    </account-holder>
    <shipping>
        <first-name>John</first-name>
        <last-name>Doe</last-name>
        <phone>+49421123456789</phone>
        <address>
            <street1>Green</street1>
            <city>London</city>
            <country>GB</country>
            <postal-code>E1 7AA</postal-code>
        </address>
        <email>test@test.com</email>
    </shipping>
    <ip-address>127.0.0.1</ip-address>
    <order-number>4b762716-f574-437d-a8d6-38a807b773fc</order-number>
    <order-items>
        <order-item>
            <name>Name 1</name>
            <description>Description 1</description>
            <article-number>123456</article-number>
            <amount currency="GBP">11.000000</amount>
            <tax-amount currency="GBP">1.830000</tax-amount>
            <tax-rate>20.00</tax-rate>
            <quantity>2</quantity>
            <type>physical</type>
        </order-item>
        <order-item>
            <name>Gift</name>
            <article-number>54657</article-number>
            <amount currency="GBP">1.000000</amount>
            <quantity>1</quantity>
            <type>gift_card</type>
        </order-item>
        <order-item>
            <name>Shipment-fee</name>
            <article-number>5778554</article-number>
            <amount currency="GBP">1.000000</amount>
            <quantity>1</quantity>
            <type>shipment_fee</type>
        </order-item>
    </order-items>
    <descriptor>customerStatement 18009998888</descriptor>
    <payment-methods>
        <payment-method name="klarna-finance"/>
    </payment-methods>
    <parent-transaction-amount currency="GBP">24.000000</parent-transaction-amount>
    <api-id>elastic-api</api-id>
    <cancel-redirect-url>https://demoshop-test.wirecard.com/demoshop/#!/cancel</cancel-redirect-url>
    <success-redirect-url>https://demoshop-test.wirecard.com/demoshop/#!/success</success-redirect-url>
    <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.

For klarna-paylater, the updated authorization amount can exceed the amount that has initially been authorized. 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.

For klarna-debit, klarna-transfer and klarna-finance, the updated authorization amount must not exceed the amount that has been initially authorized.

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
  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.

    If your adjust-authorization request does not change the preceding authorization, the response indicates this with two statuses:

    1. <status code="201.0000" description="guaranteed:The resource was successfully created." severity="information"/>

    2. <status code="201.1150" description="Transaction already processed, no data has been updated." severity="information" provider-transaction-id="218d62d1-dc28-4e20-af84-2ba405cc949c"/>

  5. → Process the adjust-authorization response.

adjust-authorization Fields

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

Field M/O Data Type Size Description

merchant-account-id

O

String

36

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

request-id

M

String

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

String

30

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

parent-transaction-id

M

String

36

Enter the transaction-id of the preceding authorization or adjust-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 sum of all order item amounts.
For klarna-debit, klarna-transfer and klarna-financing, it must not exceed the amount of the preceding authorization.
For klarna-paylater, you may adjust the requested-amount to a higher value than the preceding authorization.

Use . (decimal point) as separator.

requested-amount@currency

M

String

3

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

order-detail

O

String

Description of update/change.

order-number

O

String

255

Order number as provided by merchant.
If you send it, it shows as "order number" on Klarna's payment confirmation page.

parent-transaction-amount

Response only

String

18.3

requested-amount of the preceding authorization or adjust-authorization.

parent-transaction-amount@currency

Response only

String

3

requested-amount@currency of the preceding authorization or adjust-authorization.

locale

Response only

String

5

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

transaction-id

Response only

String

36

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

transaction-state

Response only

String

12

Transaction status.
Possible values:

  • success

  • failed

completion-time-stamp

Response only

DateTime

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

payment-methods.payment-method

@name

O

String

15

The name of the payment method used for the transaction.

Accepted values:

  • klarna-debit for Klarna direct debit

  • klarna-transfer for Klarna online bank transfer

  • klarna-paylater for Klarna payment on invoice

  • klarna-finance for Klarna payment in installments

With klarna-paylater, you can adjust authorizations to a higher amount than the parent transaction.
This does not apply to the other payment methods.

notifications.

notification-url

O

String

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

Response only

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

String

32

Consumer’s first name.

last-name

O

String

32

Consumer’s last name.

email

O

String

64

Consumer’s email address.

gender

Response only

String

1

Consumer’s gender.

phone

O

String

32

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

account-holder.address.

Consumer’s address.

street1

O

String

128

Street of the consumer’s address.

street2

O

String

128

House number of the consumer’s address.

city

O

String

32

City of the consumer’s address.

country

O

String

3

Country code of the consumer’s address.

postal-code

O

String

16

Postal/ZIP code of the consumer’s address.

shipping.

Consumer’s shipping information.

first-name

O

String

32

Recipient’s first name.

last-name

O

String

32

Recipient’s last name.

email

O

String

64

Recipient’s email address.

phone

O

String

32

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

shipping.address.

Consumer’s shipping address.

street1

O

String

128

Street of the recipient’s address.

street2

O

String

128

House number of the recipient’s address.

city

O

String

32

City of the recipient’s address.

country

O

String

3

Country code of the recipient’s address.

postal-code

O

String

16

Postal/ZIP code of the recipient’s address.

order-items.order-item.

Description of a specific order item.

quantity

M

Numeric

n/a

Total number of this item in the shopping basket.

description

O

String

1024

Description of the item in the shopping basket.

article-number

O

String

256

EAN or other merchant-side article identifier.

name

M

String

256

Name of the item in the shopping basket.

amount

M

Numeric

18.3

Item’s price per unit.

Use . (decimal point) as separator.

amount@currency

M

String

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

M/O

Numeric

5,2

Item’s tax rate per unit in percent.
Mandatory if tax-amount is specified.
Must not be sent in requests that contain order-items with order-item-type sales_tax or store_credit.

tax-amount

M/O

Numeric

5,2

Item’s tax value per unit.
Mandatory if tax-rate is specified.
Must not be sent in requests that contain order-items with order-item-type sales_tax or store_credit.

discount

O

Numeric

18.3

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

type

M

String

n/a

Order item type.
Possible values:

  • shipment_fee

  • handling_fee

  • discount

  • physical

  • sales_tax

  • digital

  • gift_card

  • store_credit

sales_tax and store_credit reduce the total request-amount.

image-url

O

String

1024

URL to an image of the order item.

product-url

O

String

1024

URL to the product description of the order item.

category-path

O

String

750

The product’s category path as used in the your webshop.
Include the full and most detailed category.
Seperate segments with >.

global-trade-item-number

O

String

200

The product’s Global Trade Item Number (GTIN). Common types of GTIN are EAN, ISBN or UPC.
Exclude dashes and spaces where possible.

manufacturer-part-number

O

String

200

The product’s Manufacturer Part Number (MPN), which - together with the brand - uniquely identifies a product.
Only submit MPNs assigned by a manufacturer.
Use the most specific MPN possible.

brand

O

String

100

The product’s brand name as generally recognized by consumers.
If no brand is available for this order-item, do not send this field.

statuses.status.

Contains information on the status of a specific transaction.

@code

Response only

String

12

Transaction status code.
→ Complete list of status codes.

@description

Response only

String

256

Transaction status message.

@severity

Response only

String

20

The definition of the status message. Possible values:

  • information

  • warning

  • error

@provider-code

Response only

String

34

Original Klarna error code.

@provider-message

Response only

String

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

@provider-transaction-id

Response only

String

36

Klarna reservation number.

adjust-authorization Samples
adjust-authorization Request
<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>
    <parent-transaction-id>{{txnId}}</parent-transaction-id>
    <payment-methods>
        <payment-method name="klarna-debit"/>
    </payment-methods>
    <requested-amount currency="EUR">20</requested-amount>
    <order-number>order-number</order-number>
    <order-items>
        <order-item>
            <name>Name 1</name>
            <description>Description 1</description>
            <article-number>123456</article-number>
            <amount currency="EUR">10.00</amount>
            <quantity>2</quantity>
            <type>physical</type>
            <tax-rate>10</tax-rate>
            <tax-amount currency="EUR">10</tax-amount>
        </order-item>
    </order-items>
    <account-holder>
        <first-name>Albert2</first-name>
        <last-name>Doe</last-name>
        <email>john@doe.com</email>
        <phone>+421123456789</phone>
        <address>
            <street1>Mullerstrasse 1371</street1>
            <street2>Mullerstrasse 138</street2>
            <city>Berlin</city>
            <state>Berlin</state>
            <country>DE</country>
            <postal-code>13353</postal-code>
        </address>
    </account-holder>
    <shipping>
        <first-name>John1</first-name>
        <last-name>Doe</last-name>
        <phone>+421123456789</phone>
        <email>john@doe.com</email>
        <address>
            <street1>Mullerstrasse 138</street1>
            <street2>Mullerstrasse 138</street2>
            <city>Berlin</city>
            <state>Berlin</state>
            <country>DE</country>
            <postal-code>13353</postal-code>
        </address>
    </shipping>
</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="http://localhost:8080/engine/rest/merchants/f570c123-62f1-4a0d-8688-d999a05d50d4/payments/f44bedaa-4e4c-4bbe-93b5-7eb14fc2513e">
    <merchant-account-id ref="http://localhost:8080/engine/rest/config/merchants/f570c123-62f1-4a0d-8688-d999a05d50d4">f570c123-62f1-4a0d-8688-d999a05d50d4</merchant-account-id>
    <transaction-id>f44bedaa-4e4c-4bbe-93b5-7eb14fc2513e</transaction-id>
    <request-id>6afe33b1-ab14-405b-9a5b-adb713f464fe</request-id>
    <transaction-type>adjust-authorization</transaction-type>
    <transaction-state>success</transaction-state>
    <completion-time-stamp>2019-11-28T09:35:36.000+01:00</completion-time-stamp>
    <statuses>
        <status code="201.0000" description="guaranteed:The resource was successfully created." severity="information"/>
    </statuses>
    <requested-amount currency="EUR">20</requested-amount>
    <parent-transaction-id>{{txnId}}</parent-transaction-id>
    <account-holder>
        <first-name>Albert2</first-name>
        <last-name>Doe</last-name>
        <email>john@doe.com</email>
        <phone>+421123456789</phone>
        <address>
            <street1>Mullerstrasse 1371</street1>
            <street2>Mullerstrasse 138</street2>
            <city>Berlin</city>
            <state>Berlin</state>
            <country>DE</country>
            <postal-code>13353</postal-code>
        </address>
    </account-holder>
    <shipping>
        <first-name>John1</first-name>
        <last-name>Doe</last-name>
        <phone>+421123456789</phone>
        <address>
            <street1>Mullerstrasse 138</street1>
            <street2>Mullerstrasse 138</street2>
            <city>Berlin</city>
            <state>Berlin</state>
            <country>DE</country>
            <postal-code>13353</postal-code>
        </address>
        <email>john@doe.com</email>
    </shipping>
    <ip-address>127.0.0.1</ip-address>
    <order-number>order-number</order-number>
    <order-items>
        <order-item>
            <name>Name 1</name>
            <description>Description 1</description>
            <article-number>123456</article-number>
            <amount currency="EUR">10.00</amount>
            <quantity>2</quantity>
            <type>physical</type>
        </order-item>
    </order-items>
    <payment-methods>
        <payment-method name="klarna-debit"/>
    </payment-methods>
    <parent-transaction-amount currency="EUR">20.000000</parent-transaction-amount>
    <api-id>elastic-api</api-id>
    <locale>en</locale>
</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
klarna v2 void authorization
  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 or Optional.

Field M/O Data Type Size Description

merchant-account-id

O

String

36

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

request-id

M

String

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

String

30

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

parent-transaction-id

M

String

36

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

parent-transaction-amount

Response only

String

18.3

requested-amount of the preceding authorization, adjust-authorization or pending-authorization.

parent-transaction-amount@currency

Response only

String

3

requested-amount@currency of the preceding authorization, adjust-authorization or pending-authorization.

requested-amount

Response only

Numeric

18.3

Total amount voided with this transaction. The number of decimal places depends on the currency.

requested-amount@currency

Response only

String

3

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

order-detail

Response only

String

order-detail of the preceding authorization, adjust-authorization or pending-authorization.

order-number

Response only

String

255

Order number of the merchant as sent in the preceding authorization, adjust-authorization or pending-authorization. Shows as "order number" on Klarna's payment confirmation page.

locale

Response only

String

5

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

transaction-id

Response only

String

36

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

transaction-state

Response only

String

12

Transaction status.
Possible values:

  • success

  • failed

completion-time-stamp

Response only

DateTime

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

payment-methods.payment-method

@name

O

String

15

The name of the payment method used for the transaction.

Accepted values:

  • klarna-debit for Klarna direct debit

  • klarna-transfer for Klarna online bank transfer

  • klarna-paylater for Klarna payment on invoice

  • klarna-finance for Klarna payment in installments

notifications.

notification-url

O

String

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

Response only

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

Response only

String

32

Consumer’s first name.

last-name

Response only

String

32

Consumer’s last name.

email

Response only

String

64

Consumer’s email address.

gender

Response only

String

1

Consumer’s gender.

phone

Response only

String

32

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

account-holder.address.

Consumer’s address.

street1

Response only

String

128

Street of the consumer’s address.

street2

Response only

String

128

House number of the consumer’s address.

city

Response only

String

32

City of the consumer’s address.

country

Response only

String

3

Country code of the consumer’s address.

postal-code

Response only

String

16

Postal/ZIP code of the consumer’s address.

shipping.

Consumer’s shipping information.

first-name

Response only

String

32

Recipient’s first name.

last-name

Response only

String

32

Recipient’s last name.

email

Response only

String

64

Recipient’s email address.

phone

Response only

String

32

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

shipping.address.

Consumer’s shipping address.

street1

Response only

String

128

Street of the recipient’s address.

street2

Response only

String

128

House number of the recipient’s address.

city

Response only

String

32

City of the recipient’s address.

country

Response only

String

3

Country code of the recipient’s address.

postal-code

Response only

String

16

Postal/ZIP code of the recipient’s address.

order-items.order-item.

Description of a specific order item.

quantity

Response only

Numeric

n/a

Total number of this item in the shopping basket.

description

Response only

String

1024

Description of the item in the shopping basket.

article-number

Response only

String

256

EAN or other merchant-side article identifier.

name

Response only

String

256

Name of the item in the shopping basket.

amount

Response only

Numeric

18.3

Item’s price per unit.

amount@currency

Response only

String

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

Response only

Numeric

5,2

Item’s tax rate per unit in percent.

tax-amount

Response only

Numeric

5,2

Item’s tax value per unit.

discount

Response only

Numeric

18.3

The discount value for one order item.

type

Response only

String

n/a

Order item type.
Possible values:

  • shipment_fee

  • handling_fee

  • discount

  • physical

  • sales_tax

  • digital

  • gift_card

  • store_credit

image-url

Response only

String

1024

URL to an image of the order item.

product-url

Response only

String

1024

URL to the product description of the order item.

category-path

Response only

String

750

The product’s category path as used in the your webshop. Segments are seperated with >.

global-trade-item-number

Response only

String

200

The product’s Global Trade Item Number (GTIN). Common types of GTIN are EAN, ISBN or UPC.

manufacturer-part-number

Response only

String

200

The product’s Manufacturer Part Number (MPN), which - together with the brand - uniquely identifies a product.

brand

Response only

String

100

The product’s brand name as generally recognized by consumers.

statuses.status.

Contains information on the status of a specific transaction.

@code

Response only

String

12

Transaction status code.
→ Complete list of status codes.

@description

Response only

String

256

Transaction status message.

@severity

Response only

String

20

The definition of the status message. Possible values:

  • information

  • warning

  • error

@provider-code

Response only

String

34

Original Klarna error code.

@provider-message

Response only

String

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

@provider-transaction-id

Response only

String

36

Klarna reservation number.

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>{{txnId}}</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
klarna v2 capture authorization
  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 or Optional.

Field M/O Data Type Size Description

merchant-account-id

O

String

36

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

request-id

M

String

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

String

30

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

parent-transaction-id

M

String

36

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

requested-amount

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 total amount of all order items.

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

Use . (decimal point) as separator.

requested-amount@currency

M

String

3

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

order-detail

O

String

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

order-number

Response only

String

255

Order number of the merchant as sent in the preceding authorization, adjust-authorization. Shows as "order number" on Klarna's payment confirmation page.

parent-transaction-amount

Response only

String

18.3

requested-amount of the preceding authorization or adjust-authorization.

parent-transaction-amount@currency

Response only

String

3

requested-amount@currency of the preceding authorization or adjust-authorization.

locale

Response only

String

5

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

transaction-id

Response only

String

36

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

transaction-state

Response only

String

12

Transaction status.
Possible values:

  • success

  • failed

completion-time-stamp

Response only

DateTime

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

payment-methods.payment-method

@name

O

String

15

The name of the payment method used for the transaction.

Accepted values:

  • klarna-debit for Klarna direct debit

  • klarna-transfer for Klarna online bank transfer

  • klarna-paylater for Klarna payment on invoice

  • klarna-finance for Klarna payment in installments

notifications.

notification-url

O

String

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

Response only

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

Response only

String

32

Consumer’s first name.

last-name

Response only

String

32

Consumer’s last name.

email

Response only

String

64

Consumer’s email address.

gender

Response only

String

1

Consumer’s gender.

phone

Response only

String

32

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

account-holder.address.

Consumer’s address.

street1

Response only

String

128

Street of the consumer’s address.

street2

Response only

String

128

House number of the consumer’s address.

city

Response only

String

32

City of the consumer’s address.

country

Response only

String

3

Country code of the consumer’s address.

postal-code

Response only

String

16

Postal/ZIP code of the consumer’s address.

shipping.

Consumer’s shipping information.

tracking-number

O

String

64

The delivery tracking number for this order.

first-name

Response only

String

32

Recipient’s first name.

last-name

Response only

String

32

Recipient’s last name.

email

Response only

String

64

Recipient’s email address.

phone

Response only

String

32

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

shipping.address.

Consumer’s shipping address.

street1

Response only

String

128

Street of the recipient’s address.

street2

Response only

String

128

House number of the recipient’s address.

city

Response only

String

32

City of the recipient’s address.

country

Response only

String

3

Country code of the recipient’s address.

postal-code

Response only

String

16

Postal/ZIP code of the recipient’s address.

order-items.order-item.

Description of a specific order item.

quantity

M

Numeric

n/a

Total number of this item in the shopping basket.

description

O

String

1024

Description of the item in the shopping basket.

article-number

O

String

256

EAN or other merchant-side article identifier.

name

M

String

256

Name of the item in the shopping basket.

amount

M

Numeric

18.3

Item’s price per unit.

Use . (decimal point) as separator.

amount@currency

M

String

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

M/O

Numeric

5,2

Item’s tax rate per unit in percent.
Mandatory if tax-amount is specified.
Must not be sent in requests that contain order-items with order-item-type sales_tax or store_credit.

tax-amount

M/O

Numeric

5,2

Item’s tax value per unit.
Mandatory if tax-rate is specified.
Must not be sent in requests that contain order-items with order-item-type sales_tax or store_credit.

discount

O

Numeric

18.3

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

type

M

String

n/a

Order item type.
Possible values:

  • shipment_fee

  • handling_fee

  • discount

  • physical

  • sales_tax

  • digital

  • gift_card

  • store_credit

sales_tax and store_credit reduce the total request-amount.

image-url

O

String

1024

URL to an image of the order item.

product-url

O

String

1024

URL to the product description of the order item.

category-path

O

String

750

The product’s category path as used in the your webshop.
Include the full and most detailed category.
Seperate segments with >.

global-trade-item-number

O

String

200

The product’s Global Trade Item Number (GTIN). Common types of GTIN are EAN, ISBN or UPC.
Exclude dashes and spaces where possible.

manufacturer-part-number

O

String

200

The product’s Manufacturer Part Number (MPN), which - together with the brand - uniquely identifies a product.
Only submit MPNs assigned by a manufacturer.
Use the most specific MPN possible.

brand

O

String

100

The product’s brand name as generally recognized by consumers.
If no brand is available for this order-item, do not send this field.

statuses.status.

Contains information on the status of a specific transaction.

@code

Response only

String

12

Transaction status code.
→ Complete list of status codes.

@description

Response only

String

256

Transaction status message.

@severity

Response only

String

20

The definition of the status message. Possible values:

  • information

  • warning

  • error

@provider-code

Response only

String

34

Original Klarna error code.

@provider-message

Response only

String

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

@provider-transaction-id

Response only

String

36

Klarna reservation number.

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>{{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>
    <parent-transaction-amount currency="EUR">14.000000</parent-transaction-amount>
    <api-id>elastic-api</api-id>
</payment>
adjust-capture

Use this transaction type to update or add an existing capture’s shipping information.

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

adjust-capture Workflow
klarna v2 capture authorization
  1. → Send an adjust-capture request. This request must contain the parent-transaction-id. Enter the transaction-id of the preceding capture-authorization response.

  2. Wirecard Payment Gateway forwards the request to Klarna.

  3. Klarna returns the update result.

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

  5. → Process the adjust-capture response.

adjust-capture Fields

Fields can be Mandatory or Optional.

Field M/O Data Type Size Description

merchant-account-id

O

String

36

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

request-id

M

String

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

String

30

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

parent-transaction-id

M

String

36

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

parent-transaction-amount

Response only

String

18.3

requested-amount of the preceding capture-authorization.

parent-transaction-amount@currency

Response only

String

3

requested-amount@currency of the preceding capture-authorization.

requested-amount

Response only

Numeric

18.3

requested-amount of the preceding capture-authorization. The number of decimal places depends on the currency.

requested-amount@currency

Response only

String

3

Currency of requested-amount.

order-detail

Response only

String

order-detail of the preceding capture-authorization.

order-number

Response only

String

255

Order number of the merchant as sent in the initial authorization or preceding adjust-authorization. Shows as "order number" on Klarna's payment confirmation page.

locale

Response only

String

5

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

transaction-id

Response only

String

36

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

transaction-state

Response only

String

12

Transaction status.
Possible values:

  • success

  • failed

completion-time-stamp

Response only

DateTime

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

payment-methods.payment-method

@name

O

String

15

The name of the payment method used for the transaction.

Accepted values:

  • klarna-debit for Klarna direct debit

  • klarna-transfer for Klarna online bank transfer

  • klarna-paylater for Klarna payment on invoice

  • klarna-finance for Klarna payment in installments

notifications.

notification-url

O

String

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

Response only

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

Response only

String

32

Consumer’s first name.

last-name

Response only

String

32

Consumer’s last name.

email

Response only

String

64

Consumer’s email address.

gender

Response only

String

1

Consumer’s gender.

phone

Response only

String

32

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

account-holder.address.

Consumer’s address.

street1

Response only

String

128

Street of the consumer’s address.

street2

Response only

String

128

House number of the consumer’s address.

city

Response only

String

32

City of the consumer’s address.

country

Response only

String

3

Country code of the consumer’s address.

postal-code

Response only

String

16

Postal/ZIP code of the consumer’s address.

shipping.

Consumer’s shipping information.

shipping-method

O

String

36

Possible values:

  • store_pick_up: Consumer picks up the items of an online purchase in your local store.

  • home_delivery: Goods are sent directly to consumer’s shipping address via an external shipping company. This can either be a traceable or a non-traceable shipment.

  • own_delivery: Goods are sent directly to consumers shipping address via your own delivery service.

  • registered_box: Goods are sent to a delivery box where the consumer needs to be registered to pick them up. Example: DHL Packstation.

  • unregistered_box: Goods are sent to a delivery box where the consumer does not need to be registered to pick them up. Example: Itella smartpost, Hermes PaketShop.

  • pick_up_point: Goods are sent to a manned pick-up point by an external shipping company. External personnel hands over goods to the consumer.

tracking-number

O

String

64

The delivery tracking number for this order.

tracking-url

O

String

2000

With this URL, the recipient can track the shipping.

shipping-company

O

String

64

Company that delivers the order to the recipient.

return-tracking-number

O

String

64

The delivery tracking number of the return.

return-tracking-url

O

String

2000

URL for tracking the delivery of the return.

return-shipping-company

O

String

36

Company that handles the return delivery.

first-name

Response only

String

32

Recipient’s first name.

last-name

Response only

String

32

Recipient’s last name.

email

Response only

String

64

Recipient’s email address.

phone

Response only

String

32

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

shipping.address.

Consumer’s shipping address.

street1

Response only

String

128

Street of the recipient’s address.

street2

Response only

String

128

House number of the recipient’s address.

city

Response only

String

32

City of the recipient’s address.

country

Response only

String

3

Country code of the recipient’s address.

postal-code

Response only

String

16

Postal/ZIP code of the recipient’s address.

order-items.order-item.

Description of a specific order item.

quantity

Response only

Numeric

n/a

Total number of this item in the shopping basket.

description

Response only

String

1024

Description of the item in the shopping basket.

article-number

Response only

String

256

EAN or other merchant-side article identifier.

name

Response only

String

256

Name of the item in the shopping basket.

amount

Response only

Numeric

18.3

Item’s price per unit.

amount@currency

Response only

String

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

Response only

Numeric

5,2

Item’s tax rate per unit in percent.

tax-amount

Response only

Numeric

5,2

Item’s tax value per unit.

discount

Response only

Numeric

18.3

The discount value for one order item.

type

Response only

String

n/a

Order item type.
Possible values:

  • shipment_fee

  • handling_fee

  • discount

  • physical

  • sales_tax

  • digital

  • gift_card

  • store_credit

image-url

Response only

String

1024

URL to an image of the order item.

product-url

Response only

String

1024

URL to the product description of the order item.

category-path

Response only

String

750

The product’s category path as used in the your webshop. Segments are seperated with >.

global-trade-item-number

Response only

String

200

The product’s Global Trade Item Number (GTIN). Common types of GTIN are EAN, ISBN or UPC.

manufacturer-part-number

Response only

String

200

The product’s Manufacturer Part Number (MPN), which - together with the brand - uniquely identifies a product.

brand

Response only

String

100

The product’s brand name as generally recognized by consumers.

statuses.status.

Contains information on the status of a specific transaction.

@code

Response only

String

12

Transaction status code.
→ Complete list of status codes.

@description

Response only

String

256

Transaction status message.

@severity

Response only

String

20

The definition of the status message. Possible values:

  • information

  • warning

  • error

@provider-code

Response only

String

34

Original Klarna error code.

@provider-message

Response only

String

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

@provider-transaction-id

Response only

String

36

Klarna reservation number.

adjust-capture Samples
adjust-capture Request
<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-capture</transaction-type>
  <parent-transaction-id>{{txnId}}</parent-transaction-id>
  <shipping>
    <shipping-method>store_pick_up</shipping-method>
    <tracking-number>54321</tracking-number>
    <tracking-url>www.sme.sk</tracking-url>
    <shipping-company>ship-comp</shipping-company>
    <return-tracking-number>12345</return-tracking-number>
    <return-tracking-url>www.google.com</return-tracking-url>
    <return-shipping-company>www.google.com</return-shipping-company>
  </shipping>
  <payment-methods>
    <payment-method name="klarna-debit"/>
  </payment-methods>
</payment>
{{txnId}} serves as placeholder. Enter the transaction-id of the preceding capture-authorization that is to be updated.
adjust-capture Response
<?xml version="1.0" encoding="UTF-8" standalone="yes"?>
<payment xmlns="http://www.elastic-payments.com/schema/payment" self="http://localhost:8180/engine/rest/merchants/f570c123-62f1-4a0d-8688-d999a05d50d4/payments/094bcff0-c72e-4e6f-9f2e-d77dec0d61e1">
    <merchant-account-id ref="http://localhost:8180/engine/rest/config/merchants/f570c123-62f1-4a0d-8688-d999a05d50d4">f570c123-62f1-4a0d-8688-d999a05d50d4</merchant-account-id>
    <transaction-id>094bcff0-c72e-4e6f-9f2e-d77dec0d61e1</transaction-id>
    <request-id>8e31d656-9925-4e02-aadb-a7b87fec07c8</request-id>
    <transaction-type>adjust-capture</transaction-type>
    <transaction-state>success</transaction-state>
    <completion-time-stamp>2019-11-28T13:55:29.000+01:00</completion-time-stamp>
    <statuses>
        <status code="201.0000" description="guaranteed:The resource was successfully created." severity="information"/>
    </statuses>
    <requested-amount currency="EUR">10.00</requested-amount>
    <parent-transaction-id>{{txnId}}</parent-transaction-id>
    <account-holder>
        <first-name>John</first-name>
        <last-name>Doe</last-name>
        <email>john@doe.com</email>
        <phone>+421123456789</phone>
        <address>
            <street1>Mullerstrasse 137</street1>
            <city>Berlin</city>
            <state>Berlin</state>
            <country>DE</country>
            <postal-code>13353</postal-code>
        </address>
    </account-holder>
    <shipping>
        <first-name>John</first-name>
        <last-name>Doe</last-name>
        <phone>+421123456789</phone>
        <address>
            <street1>Mullerstrasse 137</street1>
            <city>Berlin</city>
            <state>Berlin</state>
            <country>DE</country>
            <postal-code>13353</postal-code>
        </address>
        <email>john@doe.com</email>
        <shipping-method>store_pick_up</shipping-method>
        <tracking-number>54321</tracking-number>
        <tracking-url>www.sme.sk</tracking-url>
        <shipping-company>ship-comp</shipping-company>
        <return-tracking-number>12345</return-tracking-number>
        <return-tracking-url>www.google.com</return-tracking-url>
        <return-shipping-company>www.google.com</return-shipping-company>
    </shipping>
    <ip-address>127.0.0.1</ip-address>
    <order-items>
        <order-item>
            <name>Item 1</name>
            <article-number>Item 1</article-number>
            <amount currency="EUR">10.000000</amount>
            <quantity>1</quantity>
            <type>handling_fee</type>
        </order-item>
    </order-items>
    <payment-methods>
        <payment-method name="klarna-debit"/>
    </payment-methods>
    <parent-transaction-amount currency="EUR">10.000000</parent-transaction-amount>
    <api-id>elastic-api</api-id>
    <locale>en</locale>
</payment>
refund-capture

Use this transaction type to trigger a refund 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
klarna v2 refund capture authorization
  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 or Optional.

Field M/O Data Type Size Description

merchant-account-id

O

String

36

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

request-id

M

String

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

String

30

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

parent-transaction-id

M

String

36

Enter the transaction-id of the preceding capture-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 not exceed the amount of the preceding capture-authorization transaction.

Use . (decimal point) as separator.

requested-amount@currency

M

String

3

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

order-detail

O

String

Detailed description of the (reason for the) refund.

order-number

Response only

String

255

Order number of the merchant as sent in the initial authorization or preceding adjust-authorization. Shows as "order number" on Klarna's payment confirmation page.

parent-transaction-amount

Response only

String

18.3

requested-amount of the preceding capture-authorization.

parent-transaction-amount@currency

Response only

String

3

requested-amount@currency of the preceding capture-authorization.

locale

Response only

String

5

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

transaction-id

Response only

String

36

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

transaction-state

Response only

String

12

Transaction status.
Possible values:

  • success

  • failed

completion-time-stamp

Response only

DateTime

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

payment-methods.payment-method

@name

O

String

15

The name of the payment method used for the transaction.

Accepted values:

  • klarna-debit for Klarna direct debit

  • klarna-transfer for Klarna online bank transfer

  • klarna-paylater for Klarna payment on invoice

  • klarna-finance for Klarna payment in installments

notifications.

notification-url

O

String

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

Response only

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

Response only

String

32

Consumer’s first name.

last-name

Response only

String

32

Consumer’s last name.

email

Response only

String

64

Consumer’s email address.

gender

Response only

String

1

Consumer’s gender.

phone

Response only

String

32

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

account-holder.address.

Consumer’s address.

street1

Response only

String

128

Street of the consumer’s address.

street2

Response only

String

128

House number of the consumer’s address.

city

Response only

String

32

City of the consumer’s address.

country

Response only

String

3

Country code of the consumer’s address.

postal-code

Response only

String

16

Postal/ZIP code of the consumer’s address.

shipping.

Consumer’s shipping information.

tracking-number

O

String

64

The delivery tracking number for this order.

first-name

Response only

String

32

Recipient’s first name.

last-name

Response only

String

32

Recipient’s last name.

email

Response only

String

64

Recipient’s email address.

phone

Response only

String

32

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

shipping.address.

Consumer’s shipping address.

street1

Response only

String

128

Street of the recipient’s address.

street2

Response only

String

128

House number of the recipient’s address.

city

Response only

String

32

City of the recipient’s address.

country

Response only

String

3

Country code of the recipient’s address.

postal-code

Response only

String

16

Postal/ZIP code of the recipient’s address.

order-items.order-item.

Description of a specific order item.

quantity

M

Numeric

n/a

Total number of this item in the shopping basket.

description

O

String

1024

Description of the item in the shopping basket.

article-number

O

String

256

EAN or other merchant-side article identifier.

name

M

String

256

Name of the item in the shopping basket.

amount

M

Numeric

18.3

Item’s price per unit.

Use . (decimal point) as separator.

amount@currency

M

String

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

M/O

Numeric

5,2

Item’s tax rate per unit in percent.
Mandatory if tax-amount is specified.
Must not be sent in requests that contain order-items with order-item-type sales_tax or store_credit.

tax-amount

M/O

Numeric

5,2

Item’s tax value per unit.
Mandatory if tax-rate is specified.
Must not be sent in requests that contain order-items with order-item-type sales_tax or store_credit.

discount

O

Numeric

18.3

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

type

M

String

n/a

Order item type.
Possible values:

  • shipment_fee

  • handling_fee

  • discount

  • physical

  • sales_tax

  • digital

  • gift_card

  • store_credit

sales_tax and store_credit reduce the total request-amount.

image-url

O

String

1024

URL to an image of the order item.

product-url

O

String

1024

URL to the product description of the order item.

category-path

O

String

750

The product’s category path as used in the your webshop.
Include the full and most detailed category.
Seperate segments with >.

global-trade-item-number

O

String

200

The product’s Global Trade Item Number (GTIN). Common types of GTIN are EAN, ISBN or UPC.
Exclude dashes and spaces where possible.

manufacturer-part-number

O

String

200

The product’s Manufacturer Part Number (MPN), which - together with the brand - uniquely identifies a product.
Only submit MPNs assigned by a manufacturer.
Use the most specific MPN possible.

brand

O

String

100

The product’s brand name as generally recognized by consumers.
If no brand is available for this order-item, do not send this field.

statuses.status.

Contains information on the status of a specific transaction.

@code

Response only

String

12

Transaction status code.
→ Complete list of status codes.

@description

Response only

String

256

Transaction status message.

@severity

Response only

String

20

The definition of the status message. Possible values:

  • information

  • warning

  • error

@provider-code

Response only

String

34

Original Klarna error code.

@provider-message

Response only

String

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

@provider-transaction-id

Response only

String

36

Klarna reservation number.

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>{{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>
    <parent-transaction-amount currency="EUR">10.000000</parent-transaction-amount>
    <api-id>elastic-api</api-id>
</payment>
Settlement Reports - Reconciliation

Klarna takes full credit and fraud risk and guarantees full payments. However, there are 3 exceptions:

  • Klarna rejects the payment guarantee if you have violated the shipping policies.

  • Klarna rejects the payment guarantee in case of chargeback.

  • In fraud cases where Klarna accepts the liability, Klarna reduces the payout amount by the VAT.

Klarna records these occurences in settlement reports. Settlement reports explain in detail all payment flows between Klarna and you, thus helping you to reconcile your accounts. Each settlement report is linked to a specific payout by the unique payment reference which appears on your bank account statement.

Settlement reports are collected in reconciliation files that you can download and process.

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).

Wirecard Payment Page v2

Wirecard Payment Page v1 LEGACY is no longer supported. We recommend using Wirecard Payment Page v2 integration instead. If you have questions about your existing Wirecard Payment Page v1 integration, consult our REST API integration guide.

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.

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 offers three payment options for consumers to pay when and how they prefer:

  • 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.

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 total amount 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 invoice (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.