Sofort.

Introduction

Klarna Logo

Sofort is the direct payment method of Klarna. Sofort allows the consumer to directly and automatically trigger a credit transfer during an online purchase with the consumer’s online banking information. A transfer order is instantly confirmed allowing the merchant to instantly deliver goods and services. The payment method Sofort allows consumers to make a payment without forcing them to share their financial information with the merchant.

A consumer may only use Sofort, if their bank offers the Sofort service.

Sofort allows merchants to configure certain payment parameters, which fit to their sales strategy.

General Information

Payment Mode, Countries and Currencies

This table illustrates which payment mode Sofort belongs to. It also provides detailed information about the countries and currencies which are relevant for Sofort.

Payment Mode

Online Bank Transfer

Countries

AT, BE, CH, CZ, DE, ES, IT, HU, NL, PL, SK and UK

Currencies

EUR, CHF, CZK, HUF PLN, GBP

Currency Availability
CZK and HUF are valid Sofort currencies but cannot be tested.
Communication Formats

This table illustrates how Sofort notifications are encoded and which formats and methods can be used for requests and responses.

Requests/Responses

Format

Please contact merchant support for Format.

Methods

Please contact merchant support for Methods.

IPN Encodement

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

Transactions

Transaction Types

For transaction type details which are not given here look at Appendix B: Transaction Types.  

Transaction Type Description

check-signature

Validates digital signature for a Payment Page transaction.

get-url

A step in a group of transactions where the provider or bank’s URL is retrieved for the Account Holder to be redirected to.

debit

Moves funds from the Consumer Account to the Merchant Account.

Reference Transaction
Additional information concerning the referenced transaction functionality can be found here: Cross-Payment-Methods Referencing
Restrictions
When using Sofort some banks do not transmit consumer data (e.g. name) to Wirecard Payment Gateway. As these fields are mandatory for a refund (e.g. via SEPA Credit Transfer), the merchant is obliged to provide the consumer data to guarantee a successful refund.

Test Credentials

URLs (Endpoints)

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

Merchant Account ID (MAID)

6c0e7efd-ee58-40f7-9bbd-5e7337a052cd

Username

16390-testing

Password

3!3013=D3fD8X7

Secret Key

58764ab3-5c56-450e-b747-7237a24e92a7

Additional Test Credentials on Sofort Environment

Sort Code

Country

Germany

  • 88888888

  • 00000

  • "Demo Bank"

Please use SFRT{ISO country code}20XXX, for example SFRTDE20XXX for Germany

all other

  • 00000

  • "Demo Bank"

User ID

any text, minimum 4 characters

Password

any text, minimum 4 characters

Account Number

select one from list provided by Sofort

TAN

any text, minimum 4 characters

Workflow

Workflow of Successful Transaction
  1. Consumer chooses Sofort on the merchant’s payment page

  2. Consumer is re-directed and logs in to his/her online banking account

  3. Consumer confirms the payment

  4. Consumer is re-directed to the Sofort confirmation page

In the case of a successful payment, the consumer is redirected back to merchant’s website and the Wirecard Payment Gateway sends the merchant a notification of the successful transaction.

If the notification is not sent, the merchant has the possibility to send a request to Retrieve Transaction by Transaction-ID or to Retrieve Transaction by Request-ID.

The response will enable the merchant to retrieve the current status of the requested transaction.

Fields

The following elements are mandatory (M), optional (O) or conditional (C) for sending request/response/notification.

Field Request Response Notification Data Type Size Description

merchant-account-id

M

M

M

String

36

Unique identifier for a merchant account.

transaction-id

M

M

String

36

The Transaction ID is the unique identifier for a transaction. It is generated by Wirecard.

request-id

M

M

M

String

150

This is the identification number of the request. It has to be unique for each request.

transaction-type

M

M

M

String

30

This is the type for a transaction.

transaction-state

M

M

String

12

This is the status of a transaction.

completion-time-stamp

M

M

dateTime

This is the timestamp of completion of request.

status.code

M

M

String

12

This is the code of the status of a transaction.

status.description

M

M

String

256

This is the description to the status code of a transaction.

status.severity

M

M

String

20

This field gives information if a status is a warning, an error or an information.

statuses.Status

M

M

String

12

This is the status of a transaction.

requested-amount

M

M

M

Decimal

18.3

This is the amount of the transaction. The amount of the decimal place is dependent of the currency.

parent-transaction-id

O

O

O

String

36

Transaction ID of the first transaction of a payment.

account-holder.address.city

O

O

O

String

32

This is the end-consumer’s city.

account-holder.address.Country

O

O

O

String

3

This is the end-consumer’s country.

account-holder.address.postal-code

O

O

O

String

16

This is the end-consumer’s postal code.

account-holder.address.state

O

O

O

String

32

This is the end-consumer’s state.

account-holder.address.street1

O

O

O

String

128

This is the first part of the end-consumer’s street.

account-holder.address.street2

O

O

O

String

128

This is the second part of the end-consumer’s street.

account-holder.date-of-birth

O

O

O

Date

0

This is the end-consumer’s birth date.

account-holder.email

C

C

C

String

64

This is the end-consumer’s email address. It is mandatory if the field wallet-account-id is not sent in the initial request.

account-holder.first-Name

O

O

O

String

27

This is the first name of the end-consumer. The maximum size of first-name and last-name in combination is 27 characters.

account-holder.gender

O

O

O

String

1

This is the end-consumer’s gender.

account-holder.last-Name

O

O

O

String

27

This is the last name of the end-consumer. The maximum size of first-name and last-name in combination is 27 characters.

account-holder.phone

O

O

O

String

32

This is the phone number of the end-consumer.

bank-account.iban

C

C

C

String

32

This is the Business Identifier Code of the bank of the end-consumer. This parameter has to be filled in case this element is sent in the request. Allowed are the following characters: ([a-zA-Z]{4}[a-zA-Z]{2}[a-zA-Z0-9]{2}([a-zA-Z0-9]{3})?)

bank-account.bic

C

C

C

String

32

This is the Business Identifier Code of the bank of the end-consumer. This parameter has to be filled in case this element is sent in the request. Allowed are the following characters: ([a-zA-Z]{4}[a-zA-Z]{2}[a-zA-Z0-9]{2}([a-zA-Z0-9]{3})?)

bank-account.bank-name

O

O

String

50

The name of the bank as returned by Sofort. To enable/disable this field, contact merchant support.

ip-address

O

O

O

String

15

The global (internet) IP address of the consumers computer.

order-number

M

M

M

String

64

This is the order number of the merchant.

order-Detail

O

O

O

String

65535

This is a field for details of an order filled by the merchant.

descriptor

M

M

M

String

27

Description on the settlement of the account holder’s account about a transaction. The following characters are allowed: umlaut, - '0-9','a-z','A-Z',' ' , '+',',','-','.'

notifications.notification@url

O

O

O

String

256

The URL to be used for the Instant Payment Notification. It overwrites the notification URL that is set up in the merchant configuration.

custom-field.field-name

O

O

O

String

36

This is the name of the custom field.

custom-field.field-value

O

O

O

String

256

This is the content of the custom field. In this field the merchant can send additional information.

payment-methods.payment-method@name

M

M

M

String

15

This is the name of the payment method that that is chosen from the end-consumer. Value Sofort. should be used.

api-id

M

String

The API id is always returned in the notification.

instrument-country

O

O

O

String

2

The instrument country is extracted from the IBAN.

processing-redirect-URL

O

O

O

String

256

The URL to which the consumer will be redirected after he has fulfilled his payment. This is normally a page on the merchant’s website.

cancel-redirect-URL

M

M

M

String

256

The URL to which the consumer will be re-directed after he has cancelled a payment. This is normally a page on the merchant’s Website.

success-redirect-URL

M

M

M

String

256

The URL to which the consumer will be re-directed after a successful payment. This is normally a success confirmation page on the merchant’s website.

Signature

M

String

The Signature info, consisting of SignedInfo, SignatureValue and KeyInfo.

Status Codes

Status Code Provider Code Description

200.0000

Transaction ok - consumer protection applied.

201.0000

Transaction OK

201.1126

Transaction OK

500.1052

A Provider is unavailable.

500.1088

The requested function is not supported.

500.1094

The Merchant Account is not properly configured for processing. Please contact technical support.

500.1099

Transaction processing refused. Please contact technical support.

500.1108

Transaction processing aborted.

500.1109

Malformed/Invalid Parameter. Please check your input.

500.1127

Failed confirmation received from the third party.

501.999

The acquirer returned an unknown response. Please contact technical support.  

500.2100

Request processing failure.

500.2380

Account blacklist check failure.

500.2417

Unknown bank account

Additional Features

Configure the Transaction Time Frame
  • The merchant may configure the time frame in which the consumer has to complete the transaction. The time frame may last from 2 minutes up to 30 minutes. The default value is 30 minutes.

  • For values outside of this time frame the respective minimum or maximum will be set (e.g. for 36 minutes the maximum of 30 minutes is set)

  • When reaching the timeout the transaction will be aborted and the consumer cannot finalize the purchase with the merchant.

The Look of Sofort. on the Merchant’s Website

Sofort requires merchants to follow certain guidelines when offering the payment method on their website.

Sofort recommends to place a link instead of the badge. By using the link, Sofort. will host the badge and update it automatically on the merchant’s web site.

Sofort provides the badges in two formats and allows individual sizes:

  • The format is either svg or png. It is the merchant’s decision which format to use by setting the correct file extension.

  • Using png determines the size directly according to the format. Leaving the size blank, the badge will be delivered with the standard width of 100 pixel.

  • Sofort suggests a width between 100 and 300 pixel. To change the width from 100 pixel to e.g. 300 pixel, add "?width=300" directly after the format.

The following is the general form of the link to the badge:

https://cdn.klarna.com/1.0/shared/image/generic/badge/xx_XX/name_of_the_badge/standard/pink.[format][size]

Examples
  1. Use the Sofort badge with the svg format and the standard size:

https://cdn.klarna.com/1.0/shared/image/generic/badge/xx_XX/pay_now/standard/pink.svg

  1. Display the badge with the png format and the size 300 pixel:

https://cdn.klarna.com/1.0/shared/image/generic/badge/xx_XX/pay_now/standard/pink.png?width=300

Samples

Go to Notification Examples, if you want to see corresponding notification samples.

XML Get-Url Request (Successful)
<?xml version="1.0" encoding="utf-8" standalone="yes"?>
<payment xmlns="http://www.elastic-payments.com/schema/payment">
   <merchant-account-id>6c0e7efd-ee58-40f7-9bbd-5e7337a052cd</merchant-account-id>
       <request-id>${unique for each request}</request-id>
   <transaction-type>get-url</transaction-type>
   <requested-amount currency="EUR">1.01</requested-amount>
   <payment-methods>
       <payment-method name="sofortbanking" />
   </payment-methods>
   <descriptor>FANZEE XRZ-1282</descriptor>
   <success-redirect-url>http://127.0.0.1:8080/success</success-redirect-url>
   <cancel-redirect-url>http://127.0.0.1:8080/cancel</cancel-redirect-url>
</payment>
XML Get-Url Response (Successful)
<?xml version="1.0" encoding="utf-8" standalone="yes"?>
<payment xmlns="http://www.elastic-payments.com/schema/payment" xmlns:ns2="http://www.elastic-payments.com/schema/epa/transaction">
  <merchant-account-id>6c0e7efd-ee58-40f7-9bbd-5e7337a052cd</merchant-account-id>
  <transaction-id>a712ab53-2eaf-46ed-bc4f-8da660425b20</transaction-id>
  <request-id>e77075b2-edd1-459e-acd8-c5014fe2348d</request-id>
  <transaction-type>get-url</transaction-type>
  <transaction-state>success</transaction-state>
  <completion-time-stamp>2018-04-13T10:27:48.000Z</completion-time-stamp>
  <statuses>
    <status code="201.0000" description="The resource was successfully created." severity="information" />
  </statuses>
  <requested-amount currency="EUR">1.01</requested-amount>
  <descriptor>FANZEE XRZ-1282</descriptor>
  <payment-methods>
    <payment-method url="https://www.sofort.com/payment/go/fef1b8eea14b54c102440984b49a502115db9523" name="sofortbanking" />
  </payment-methods>
  <cancel-redirect-url>http://127.0.0.1:8080/cancel</cancel-redirect-url>
  <success-redirect-url>http://127.0.0.1:8080/success</success-redirect-url>
</payment>
<?xml version="1.0" encoding="utf-8" standalone="yes"?>
<payment xmlns="http://www.elastic-payments.com/schema/payment" xmlns:ns2="http://www.elastic-payments.com/schema/epa/transaction">
  <merchant-account-id>6c0e7efd-ee58-40f7-9bbd-5e7337a052cd</merchant-account-id>
  <transaction-id>a712ab53-2eaf-46ed-bc4f-8da660425b20</transaction-id>
  <request-id>e77075b2-edd1-459e-acd8-c5014fe2348d</request-id>
  <transaction-type>get-url</transaction-type>
  <transaction-state>success</transaction-state>
  <completion-time-stamp>2018-04-13T10:27:48.000Z</completion-time-stamp>
  <statuses>
    <status code="201.0000" description="The resource was successfully created." severity="information" />
  </statuses>
  <requested-amount currency="EUR">1.01</requested-amount>
  <descriptor>FANZEE XRZ-1282</descriptor>
  <payment-methods>
    <payment-method url="https://www.sofort.com/payment/go/fef1b8eea14b54c102440984b49a502115db9523" name="sofortbanking" />
  </payment-methods>
  <cancel-redirect-url>http://127.0.0.1:8080/cancel</cancel-redirect-url>
  <success-redirect-url>http://127.0.0.1:8080/success</success-redirect-url>
</payment>
XML Get-Url Request (Failure)
<?xml version="1.0" encoding="utf-8" standalone="yes"?>
<payment xmlns="http://www.elastic-payments.com/schema/payment">
   <merchant-account-id>6c0e7efd-ee58-40f7-9bbd-5e7337a052cd</merchant-account-id>
       <request-id>${unique for each request}</request-id>
   <transaction-type>get-url</transaction-type>
   <requested-amount currency="EUR">0</requested-amount>
   <payment-methods>
  <payment-method name="sofortbanking" />
 </payment-methods>
   <descriptor>Free Gift</descriptor>
   <success-redirect-url>http://127.0.0.1:8080/success</success-redirect-url>
   <cancel-redirect-url>http://127.0.0.1:8080/cancel</cancel-redirect-url>
</payment>
XML Get-Url Response (Failure)
<?xml version="1.0" encoding="utf-8" standalone="yes"?>
<payment xmlns="http://www.elastic-payments.com/schema/payment" xmlns:ns2="http://www.elastic-payments.com/schema/epa/transaction">
 <merchant-account-id>6c0e7efd-ee58-40f7-9bbd-5e7337a052cd</merchant-account-id>
 <transaction-id>b53705c1-852d-49a3-bf94-98a5cc02fb3d</transaction-id>
 <request-id>3a75519f-bb4e-41a0-824e-a37929c23c20</request-id>
 <transaction-type>get-url</transaction-type>
 <transaction-state>failed</transaction-state>
 <completion-time-stamp>2018-04-13T10:33:40.000Z</completion-time-stamp>
 <statuses>
  <status code="400.1013" description="The Requested Amount is below the minimum required for this Merchant Account.  Please check your input and try again." severity="error" />
 </statuses>
 <requested-amount currency="EUR">0</requested-amount>
 <descriptor>Free Gift</descriptor>
 <payment-methods>
  <payment-method name="sofortbanking" />
 </payment-methods>
 <cancel-redirect-url>http://127.0.0.1:8080/cancel</cancel-redirect-url>
 <success-redirect-url>http://127.0.0.1:8080/success</success-redirect-url>
</payment>
Custom URL: