Klarna was founded in 2005 in Stockholm, Sweden, with the mission of simplifying online shopping. Over the past 18 years, technology has advanced significantly, reshaping our world; however, our commitment to making payment processes simple, secure, and, above all, smooth remains just as vital.

As the leading global payments and shopping service, Klarna provides smarter and more flexible shopping experiences to 150 million active consumers across over 500,000 merchants in 45 countries. We offer direct payments, pay-after-delivery options, and installment plans, all within a seamless one-click purchase experience that empowers consumers to pay when and how they choose.

The Klarna Group was established in 2014 with the acquisition of SOFORT. Klarna is supported by prominent investors, including Sequoia Capital, Silver Lake, Bestseller Group, Dragoneer, Permira, Visa, Ant Group, and Atomico.

Overview

General Notes

Payment Type Countries Currency
Invoice
("Pay later")
  • Austria
  • Denmark
  • Finland
  • Germany
  • Netherlands
  • Norway
  • Sweden
  • Switzerland
  • Euro
  • Danish crowns
  • Norwegian crowns
  • Swedish crowns
  • Swiss Francs
Installments
("Slice it")
Direct Debit
("Pay now")
B2B transactions are currently only supported in Finland, Germany, Norway and Sweden.

API-Requests - Special Notes / Deviations

Overview of Deviations

  • Klarna requires more specific customer data - depending on country of customer
  • Status "PENDING" has to be processedfor API-response "PENDING" implementation of API-version 3.11 or higher is required
  • for TransactionStatus "pending" implementation of notify-version 7.6 or higher is required
    • Request "capture" has to use parameter "capturemode"
    • Request "debit" has to use parameter "settleaccount"
  • add_paydata and workorderid have to be used for update of shopping cart

Clearingtype / Clearingsubtype

clearingtype financingtype
fnc KIS

Klarna "Slice It" (Installments)

fnc KIV

Klarna "Pay Later" (Invoice)

fnc KDD

Klarna "direct_debit" (Direct Debit)

fnc KBT

Klarna "Pay Now" (Direct Bank Transfer)

Summary

To enable your customers to pay using Klarna, you need to integrate the Klarna payment option into your checkout process. For a clear understanding of the relationship and interactions within your checkout, please refer to the following diagram. (This diagram is based on the official Klarna documentation: Klarna Docs - Offering Klarna Payment Methods to Your Customers.)

Establishing Klarna Checkout is a 3 step process.

1
Create a New Session

The first step is to set up a new checkout session by sending a generic payment request to our server API as outlined below. This step is essential for loading the Klarna widget.

Please ensure that you include the customer data in this request, as it is necessary to initiate a new session. The session will remain valid for 48 hours after the last update.

Optional - Update the Session

If the customer leaves the checkout page and returns later, you can update the existing session to modify details such as the address information.

2
Handle Token

The response includes a client token, which must be passed to the Klarna Widget. This widget will send the client token along with the selected payment method (e.g., "Klarna Pay Later") to Klarna in order to obtain an authorization token.

3
Finalize the Checkout ((Pre-)Authorization)

In the final step, you need to send the authorization token received from the Klarna Widget as part of the (pre-)authorization request to our server API.

The response includes a redirect URL. You should redirect the customer to this URL, allowing Klarna to securely handle data and optimize the purchase flow. The customer doesn't need to take any action and will be unaware of this step occurring in the background.

Integrations

POST Request - genericpayment – add_paydata[action] = start_session

The first step is to set up a new checkout session by sending a generic payment request to our server API, as outlined below. This step is a prerequisite for loading the Klarna widget.

Please ensure that you include the customer data in this request, as it is required to initiate a new session. The session will remain valid for 48 hours following the last update.

Only submit a buyer's personal information in this request if you have confirmed that the buyer has actively selected Klarna as a payment method, in compliance with GDPR regulations.

Account Parameters
request
required
Fixed Value: genericpayment
mid
required
your merchant ID, 5-digit numeric
aid
required
your subaccount ID, 5-digit numeric
portalId
required
your Portal ID, 7-digit numeric
key
required
your key value, alpha-numeric
common Parameters
mode
required
Fixed Value: test/live
amount
required
Fixed Value: 0

As only the configuration is requested, the amount is set to zero

currency
required
Format LIST
Permitted values ISO 4217 (currencies) 3-letter-codes
Samples

EUR

USD

GBP

add_paydata Parameters
add_paydata[action]
required
Fixed Value: start_session

Identifies the request as one to start a new session

add_paydata[merchant_data]
required
FORMAT: BASE 64 String

"EMD" - Extra Merchant Data - means that integration with any such package depends on
(i) merchant’s offering and
(ii) merchant’s technical possibilities.
It is not to be interpreted in such a way that EMD is not required at all.

add_paydata[shipping_title]
required
FORMAT: CHAR(1..50)

Title recipient within the delivery address

add_paydata[shipping_telephonenumber]
required
FORMAT: CHAR(1..30)

Telephone number of the recipient or a contact at the delivery address

add_paydata[shipping_email]
required
FORMAT: CHAR(5..254)
RFC 5322

Email-address of the recipient or a contact at the delivery address

This parameter is required if a shipping adress is given.

add_paydata[last_four_ssn]
required
FORMAT: NUMERIC(4)

Last four digits for customer social security number.

add_paydata[organization_entity_type]
required
PERMITTED VALUES:
  • LIMITED_COMPANY
  • PUBLIC_LIMITED_COMPANY
  • ENTREPRENEURIAL_COMPANY
  • LIMITED_PARTNERSHIP_LIMITED_COMPANY
  • LIMITED_PARTNERSHIP
  • GENERAL_PARTNERSHIP
  • REGISTERED_SOLE_TRADER
  • SOLE_TRADER
  • CIVIL_LAW_PARTNERSHIP
  • PUBLIC_INSTITUTION
  • OTHER

Only relevant for B2B transactions.

add_paydata[organization_registry_id]
required
FORMAT: CHAR(1..50)

Will be given to Klarna as "vat_id"

PERSONAL DATA Parameters
personalid
optional
Format CHAR(1..32)
Permitted Symbols [0-9][A-Z][a-z][+-./()]

Mandatory for Denmark, Finland, Norway and Sweden

salutation
optional
Format CHAR(1..10)

The customer's salutation

title
optional
Format CHAR(1..20)
Samples

Dr.

Prof.

Dr.-Ing.

Title of the customer

firstname
optional
Format CHAR(1..50)

First name of customer; optional if company is used, i.e.: you may use "company" or "lastname" or "firstname" plus "lastname"

lastname
required
Format CHAR(2..50)

Last name of customer; optional if company is used, i.e.: you may use "company" or "lastname" or "firstname" plus "lastname"

company
optional
Format CHAR(2..50)

Company name of customer; optional if company is used, i.e.: you may use "company" or "lastname" or "firstname" plus "lastname"

street
optional
Format CHAR(1..50)

Street number and name (required: at least one character)

addressaddition
optional
Format CHAR(1..50)
Samples

7th floor

c/o Maier

Specifies an additional address line for the invoice address of the customer.

zip
optional
Format CHAR(2..50)
Permitted Symbols [0-9][A-Z][a-z][_.-/ ]

Postcode

city
optional
Format CHAR(2..50)

City of customer

country
required
Format LIST
email
optional
Format CHAR(5..254)

Mandatory if "add_paydata[shopping_cart_type]=DIGITAL"

Permitted Symbols RFC 5322

Special Remark email validation:

Max. length for email is 254 characters. Validation is set up in the following way:

Username = Max. 63 characters

Domain Name = Max. 63 characters
Domain Suffixes = Max. 4 suffixes with max. 124 characters 
Example: username[63]@domain_name[63].suffix[60].suffix[60].suffix[4]

"@" and "." is counted as a character as well; in case of a total of three suffixes, this would allow a total of 254 characters.

email-address of customer

telephonenumber
optional
Format CHAR(1..30)

Phone number of customer

birthday
optional
Format DATE(8), YYYYMMDD
Samples

20190101

19991231

Date of birth of customer

language
optional
Format LIST
Permitted values ISO 639-1 (Language)2-letter-codes

Language indicator (ISO 639) to specify the language that should be presented to the customer (e.g. for error messages, frontend display).

If the language is not transferred, the browser language will be used. For a non-supported language English will be used.

vatid
optional
Format CHAR(1..50)

VAT identification number. Used for b2b transactions to indicate VAT number of customer.

gender
optional
Format LIST
Permitted values f / m / d

Gender of customer (female / male / diverse* )

* currently not in use

personalid
optional
Format CHAR(1..32)
Permitted Symbols [0-9][A-Z][a-z][+-./()]

Person specific numbers or characters, e.g. number of passport / ID card

ip
optional
Format CHAR(1..39)

Customer's IP-V4-address (123.123.123.123) or IP-V6-address

Delivery data Parameters
shipping_firstname
required
Format CHAR(1..50)

First name of delivery address

shipping_lastname
required
Format CHAR(1..50)

Surname of delivery address

shipping_company
optional
Format CHAR(2..50)

Company name of delivery address

shipping_street
optional
Format CHAR(2..50)

Street number and name of delivery address

shipping_zip
required
Format CHAR(2..50)

Postcode of delivery address

shipping_addressaddition
optional
Format CHAR(1..50)

Specifies an additional address line for the delivery address of the customer, e.g. "7th floor", "c/o Maier".

shipping_country
optional
Format LIST
Permitted values ISO 3166 2-letter-codes
Samples

DE

GB

US

Specifies country of address for the customer.

Some countries require additional information in parameter "state"

shipping_state
optional
Format LIST
Permitted values ISO 3166-2 States (regions) 2-letter-codes
Samples US Samples CA
AK BC
AB AR
AL BA
Response Parameters
status
Permitted Values
APPROVED
ERROR
add_paydata[session_id]
Format ALPHANUM

ex. 068df369-13a7-4d47-a564-62f8408bb760

Identifier for the started session at Klarna

add_paydata[client_token]

Client token to authorize the session for payment via Klarna Widget

add_paydata[authorized_payment_method]

The name of the payment method authorized for the customer's transaction will depend on the selected options. You will only receive parameters corresponding to the payment method you specified using the clearing type and financing type.

add_paydata[payment_method_category_name]
PERMITTED VALUES:
  • DIRECT_DEBIT
  • DIRECT_BANK_TRANSFER
  • PAY_NOW
  • PAY_LATER
  • PAY_OVER_TIME
add_paydata[payment_method_category_identifier]
PERMITTED VALUES:
  • Direct_debit
  • Direct_bank_transfer
  • Pay_now
  • Pay_later
  • Pay_over_time
add_paydata[payment_method_category_asset_url_descriptive]
Format ALPHANUM

ex. https://x.klarnacdn.net/payment-method/assets/badges/generic/klarna.svg

URL of Klarna payment category assets for descriptive design (payment method identified by small icon and test on badge)

add_paydata[payment_method_category_asset_url_standard]
Format ALPHANUM

ex. https://x.klarnacdn.net/payment-method/assets/badges/generic/klarna.svg

URL of Klarna payment category assets for standard design (payment method only identified by small icon on badge)

Response Data (APPROVED)
workorderid
Format AN(1..16)

The ID is unique. The returned workorder ID is mandatory for subsequent requests in Klarna Checkout.

The workorder ID is a technical identifier provided by the PAYONE platform to identify a specific workorder. A workorder represents a part of the payment process (identified by a txid). The workorder ID is required for the generic payment request.

Response parameters (error)
errorcode
Format NUMERIC(1..6)

In case of error the PAYONE Platform returns an error code for your internal usage.

errormessage
Format CHAR(1..1024)

In case of error the PAYONE Platform returns an error message for your internal usage.

customermessage
Format CHAR(1..1024)

The customermessage is returned to your system in order to be displayed to the customer.

(Language selection is based on the end customer's language, parameter "language")

Host: api.pay1.de
Content-Type: application/x-www-form-urlencoded
Payload                    
request=genericpayment aid=12345 mid=23456 portalid=12345123 key=abcdefghijklmn123456789 mode=test add_paydata[action]=start_session clearingtype=fnc financingtype=KIS amount=3000 currency=EUR lastname=Approved firstname=Testperson-de salutation=Herr country=DE language=de gender=m birthday=19600707 street=Hellersbergstraße 14 city=Musterstadt zip=12345 email=test@payone.com telephonenumber=01512345678 de[1]=for the feet id[1]=socks1 it[1]=goods no[1]=1 pr[1]=2340 va[1]=1900  
RESPONSE
status=APPROVED
add_paydata[payment_method_category_asset_url_descriptive]=https://x.klarnacdn.net/payment-method/assets/badges/generic/klarna.svg
add_paydata[client_token]=eyJhbGciOiJSUzI1NiJ9.ewogICJzZXNzaW9uX2lkIiA6ICI0N2EzNWIwOC1kNWVlLTcxYjUtOTVkMS1lYWU3NTFjNWJlZmIiLAogICJiYXNlX3VybCIgOiAiaHR0cHM6Ly9rbGFybmEtcGF5bWVudHMtZXUucGxheWdyb3VuZC5rbGFybmEuY29tIiwKICAiZGVzaWduIiA6ICJrbGFybmEiLAogICJsYW5ndWFnZSIgOiAiZW4iLAogICJwdXJjaGFzZV9jb3VudHJ5IiA6ICJERSIsCiAgInRyYWNlX2Zsb3ciIDogZmFsc2UsCiAgImVudmlyb25tZW50IiA6ICJwbGF5Z3JvdW5kIiwKICAibWVyY2hhbnRfbmFtZSIgOiAiWW91ciBidXNpbmVzcyBuYW1lIiwKICAic2Vzc2lvbl90eXBlIiA6ICJQQVlNRU5UUyIsCiAgImNsaWVudF9ldmVudF9iYXNlX3VybCIgOiAiaHR0cHM6Ly9ldnQucGxheWdyb3VuZC5rbGFybmEuY29tIiwKICAiZXhwZXJpbWVudHMiIDogWyBdCn0.gD6XVLaZeL541T1QYkGsZ01wbAYuTXyhIXcR8irG461U9w1HLugSji4_jc8LsE7cVWMVqLph_CJzCAiZNKzsC9AW6Mf88X8VdR9gV7owv3EVqEdK2K9-g-26Wu2pGE88Um2z2Iz7uUUzbhn6d4rI4CICOLsdaVXJ7MKhzPgnW-a6DM-K9JP2RLIflJKjn3wCjEtJSc_8gqj3_fv8YHaTWRkBd9pUGCBB0rUS-komFAPBdzZiCAbiw5Lsdk9dWpI2wszKeE_iPd6NuxGr4U37XtIX9Gc-uTfn21o0JUJddbiPtItmetWQSY_mruOO4WiVQxuZvxXk7XYwCCb8rrXYw
add_paydata[payment_method_category_identifier]=pay_over_time
add_paydata[session_id]=47a35b08-d5ee-71b5-95d1-eae751c5befb
add_paydata[payment_method_category_name]=Slice it.
add_paydata[payment_method_category_asset_url_standard]=https://x.klarnacdn.net/payment-method/assets/badges/generic/klarna.svg
workorderid=WX1A37YBGD9D11DK
POST Request - genericpayment – add_paydata[action] = update_session

To update the session, such as when the customer adds a new item to the cart, you need to send a generic payment request with the action set to "update." This call must include the new list of items, representing the complete shopping cart.

An update is only possible as long as the preauthorization has not been fully captured. Rather than sending just the differences or changes, you must provide the complete new item list. The total amount cannot exceed the preauthorized amount, though a lower amount is permitted.

Account Parameters
request
required
Fixed Value: genericpayment
mid
required
your merchant ID, 5-digit numeric
aid
required
your subaccount ID, 5-digit numeric
portalId
required
your Portal ID, 7-digit numeric
key
required
your key value, alpha-numeric
common Parameters
mode
required
Fixed Value: test/live
workorderid
required
Format AN(1..16)

The ID is unique, and the returned workorder ID is mandatory for subsequent requests in Klarna Checkout.

The workorder ID is a technical identifier provided by the PAYONE platform to distinguish a specific workorder. A workorder is a component of the payment process, identified by a transaction ID (txid). The workorder ID is required for the generic payment request.

financingtype
required
Format LIST
Value Comment
KIS Klarna Installments
KIV Klarna Invoice
KDD Klarna Direct Debit

Used with "clearingtype=fnc" to identify Financing type

amount
required
Fixed Value: 0

As only the configuration is requested, the amount is set to zero

currency
required
Format LIST
Permitted values ISO 4217 (currencies) 3-letter-codes
Samples

EUR

USD

GBP

narrative_text
optional
Format CHAR(1..81)

Dynamic text element on account statements (3 lines with 27 characters each) and credit card statements.

add_paydata Parameters
add_paydata[action]
required
Fixed Value: update_session

identifies the request as one to update an existing session

add_paydata[reservation_txid]
required
Referencing the reservation (received from authorization.response -> add_paydata[reservation_txid])
add_paydata[session_id]
required
Format ALPHANUM

ex. 068df369-13a7-4d47-a564-62f8408bb760

Identifier for the started session at Klarna

PERSONAL DATA Parameters
country
required
Format LIST
Article Parameters
id[n]
optional
Format CHAR(1..32)
Array elements [n] starting with [1]; serially numbered; max [400]

International Article Number (EAN bzw. GTIN)

Product number, SKU, etc. of this item

pr[n]
optional
Format NUMERIC(10) max. 19 999 999 99
Array elements [n] starting with [1]; serially numbered; max [400]

Unit gross price of the item in smallest unit! e.g. cent

it[n]
required
it[n] Comments
goods Goods
shipment Shipping Charges
handling Handling fee
voucher Voucher / discount
no[n]
optional
Format NUMERIC(6)
Array elements [n] starting with [1]; serially numbered; max [400]

Quantity of this item

de[n]
optional
Format CHAR(1..255)
Array elements [n] starting with [1]; serially numbered; max [400]

Description of this item. Will be printed on documents to customer.

va[n]
optional
Format NUMERIC(4)
Array elements [n] starting with [1]; serially numbered; max [400]

VAT rate (% or bp)

Response Parameters
status
Permitted Values
APPROVED
ERROR
addresponsedata[reservation_txid]
Format CHAR(12..50) Permitted Symbols: [0-9,A-Z]

The reservation_txid is a technical id returned from the PAYONE platform to identify a reservation. A reservation is a part of a payment process (identified by a txid). The reservation is used for "genericrequest".

addresponsedata[workorderid]
Format CHAR(1..50)

The workorderid is a technical id returned from the PAYONE platform to identify a workorder. A workorder is a part of a payment process (identified by a txid). The workorderid is used for the genericpayment request.

addresponsedata[authorized_payment_method]

Name of payment that got authorized for customer payment. (You will only receive the parameters according to the payment method you selected via clearingtype and financingtype)

Response Data (APPROVED)
workorderid
Format AN(1..16)

The workorderid is a technical id returned from the PAYONE platform to identify a workorder. A workorder is a part of a payment process (identified by a txid). The workorderid is used for the genericpayment request.

Response parameters (error)
errorcode
Format NUMERIC(1..6)

In case of error the PAYONE Platform returns an error code for your internal usage.

errormessage
Format CHAR(1..1024)

In case of error the PAYONE Platform returns an error message for your internal usage.

customermessage
Format CHAR(1..1024)

The customermessage is returned to your system in order to be displayed to the customer.

(Language selection is based on the end customer's language, parameter "language")

Host: api.pay1.de
Content-Type: application/x-www-form-urlencoded
Payload                    
add_paydata[action]=update_session
add_paydata[reservation_txid]=previously given trxid
add_paydata[session_id]=068df369-13a7-4d47-a564-62f8408bb760
request=genericpayment aid=54400 mid=54399 portalid=2039743 key=17031f73e2c6f9755788bddfff04169b
mode=test
workorderid=WX1A8DZ26B1DDU4H
clearingtype=fnc
financingtype=KIS
amount=3000
currency=EUR
country=DE
narrative_text=sometext
de[1]=for the feet
id[1]=socks1
it[1]=goods
no[1]=1
pr[1]=2340
va[1]=1900
RESPONSE
status=APPROVED
addresponsedata[reservation_txid]=ABCDEFG123456
addresponsedata[authorized_payment_method]=nameofchosenmethod
addresponsedata[workorderid]=WX1A8DZ26B1DDU4H
POST Request - genericpayment – add_paydata[action] = cancel_authorization
Account Parameters
request
required
Fixed Value: genericpayment
mid
required
your merchant ID, 5-digit numeric
aid
required
your subaccount ID, 5-digit numeric
portalId
required
your Portal ID, 7-digit numeric
key
required
your key value, alpha-numeric
common Parameters
mode
required
Fixed Value: test/live
add_paydata Parameters
add_paydata[action]
required
Fixed Value: cancel_authorization

Identifies the request as one to update an existing session

add_paydata[authorization_token]
required

Token of the authorization, which is to be canceled. Will be provided by Klarna's JS API

Response Parameters
status
Permitted Values
APPROVED
ERROR
Response Data (APPROVED)
workorderid
Format AN(1..16)

The workorderid is a technical id returned from the PAYONE platform to identify a workorder. A workorder is a part of a payment process (identified by a txid). The workorderid is used for the genericpayment request.

Response parameters (error)
errorcode
Format NUMERIC(1..6)

In case of error the PAYONE Platform returns an error code for your internal usage.

errormessage
Format CHAR(1..1024)

In case of error the PAYONE Platform returns an error message for your internal usage.

customermessage
Format CHAR(1..1024)

The customermessage is returned to your system in order to be displayed to the customer.

(Language selection is based on the end customer's language, parameter "language")

Host: api.pay1.de
Content-Type: application/x-www-form-urlencoded
Payload                    
add_paydata[action]=cancel_authorization
add_paydata[authorization_token]=previously given token
request=genericpayment aid=54400 mid=54399 portalid=2039743 key=17031f73e2c6f9755788bddfff04169b mode=test
RESPONSE
status=APPROVED add_paydata[seller_id]=ABCDEFG123456 add_paydata[client_id]=amzn1.application-oa2-client.XXXXXXXXXXXXXXXXXXXXXXXXXXXXXXXX workorderid=WX1A8DZ26B1DDU4H
POST Request - Pre-/ Authorization
Account Parameters
request
required
Fixed Value: preauthorization / authorization
mid
required
your merchant ID, 5-digit numeric
aid
required
your subaccount ID, 5-digit numeric
portalId
required
your Portal ID, 7-digit numeric
key
required
your key value, alpha-numeric
PERSONAL DATA Parameters
customerid
optional
Format CHAR(1..20)
Permitted Symbols [0-9, a-z, A-Z, .,-,_,/]

Merchant's customer ID, defined by you / merchant to refer to the customer record.

"customerid" can be used to identify a customer record. 
If "customerid" is used then stored customer data are loaded automatically.
userid
optional
Format NUMERIC(6..12)

PAYONE User ID, defined by PAYONE

salutation
optional
Format CHAR(1..10)

The customer's salutation

title
optional
Format CHAR(1..20)
Samples

Dr.

Prof.

Dr.-Ing.

Title of the customer

firstname
optional
Format CHAR(1..50)

First name of customer; optional if company is used, i.e.: you may use "company" or "lastname" or "firstname" plus "lastname"

lastname
required
Format CHAR(2..50)

Last name of customer; optional if company is used, i.e.: you may use "company" or "lastname" or "firstname" plus "lastname"

company
optional
Format CHAR(2..50)

Comany name of customer; optional if company is used, i.e.: you may use "company" or "lastname" or "firstname" plus "lastname"

street
optional
Format CHAR(1..50)

Street number and name (required: at least one character)

addressaddition
optional
Format CHAR(1..50)
Samples

7th floor

c/o Maier

Specifies an additional address line for the invoice address of the customer.

zip
optional
Format CHAR(2..50)
Permitted Symbols [0-9][A-Z][a-z][_.-/ ]

Postcode

city
optional
Format CHAR(2..50)

City of customer

country
required
Format LIST
email
optional
Format CHAR(5..254)

Mandatory if "add_paydata[shopping_cart_type]=DIGITAL"

Permitted Symbols RFC 5322

Special Remark email validation:

Max. length for email is 254 characters. Validation is set up in the following way:

Username = Max. 63 characters

Domain Name = Max. 63 characters
Domain Suffixes = Max. 4 suffixes with max. 124 characters 
Example: username[63]@domain_name[63].suffix[60].suffix[60].suffix[4]

"@" and "." is counted as a character as well; in case of a total of three suffixes, this would allow a total of 254 characters.

email-address of customer

telephonenumber
optional
Format CHAR(1..30)

Phone number of customer

birthday
optional
Format DATE(8), YYYYMMDD
Samples

20190101

19991231

Date of birth of customer

language
optional
Format LIST
Permitted values ISO 639-1 (Language)2-letter-codes

Language indicator (ISO 639) to specify the language that should be presented to the customer (e.g. for error messages, frontend display).

If the language is not transferred, the browser language will be used. For a non-supported language English will be used.

vatid
optional
Format CHAR(1..50)

VAT identification number. Used for b2b transactions to indicate VAT number of customer.

gender
optional
Format LIST
Permitted values f / m / d

Gender of customer (female / male / diverse* )

* currently not in use

personalid
optional
Format CHAR(1..32)
Permitted Symbols [0-9][A-Z][a-z][+-./()]

Person specific numbers or characters, e.g. number of passport / ID card

ip
optional
Format CHAR(1..39)

Customer's IP-V4-address (123.123.123.123) or IP-V6-address

Delivery data Parameters
shipping_firstname
required
Format CHAR(1..50)

First name of delivery address

shipping_lastname
required
Format CHAR(1..50)

Surname of delivery address

shipping_company
optional
Format CHAR(2..50)

Company name of delivery address

shipping_street
optional
Format CHAR(2..50)

Street number and name of delivery address

shipping_zip
required
Format CHAR(2..50)

Postcode of delivery address

shipping_addressaddition
optional
Format CHAR(1..50)

Specifies an additional address line for the delivery address of the customer, e.g. "7th floor", "c/o Maier".

shipping_country
optional
Format LIST
Permitted values ISO 3166 2-letter-codes
Samples

DE

GB

US

Specifies country of address for the customer.

Some countries require additional information in parameter "state"

shipping_state
optional
Format LIST
Permitted values ISO 3166-2 States (regions) 2-letter-codes
Samples US Samples CA
AK BC
AB AR
AL BA
Financing PARAMETERS
financingtype
required
Format: CHAR(3)
Permitted Values: KIS, KIV, KDD, KBT
successurl
required
Format CHAR(2..255)

Scheme <scheme>://<host>/<path>
       <scheme>://<host>/<path>?<query>
       
scheme-pattern: [a-zA-Z]{1}[a-zA-Z0-9]{1,9}

URL for "payment successful"

errorurl
required
Format CHAR(2..255)

Scheme <scheme>://<host>/<path>
       <scheme>://<host>/<path>?<query>
       
scheme-pattern: [a-zA-Z]{1}[a-zA-Z0-9]{1,9}

URL for "faulty payment"

backurl
required
Format CHAR(2..255)

Scheme <scheme>://<host>/<path>
       <scheme>://<host>/<path>?<query>
       
scheme-pattern: [a-zA-Z]{1}[a-zA-Z0-9]{1,9}

URL for "Back" or "Cancel"

Article Parameters
it[n]
optional
it[n] Comments
goods Goods
shipment Shipping Charges
handling Handling fee
voucher Voucher / discount
id[n]
optional
Format CHAR(1..32)
Array elements [n] starting with [1]; serially numbered; max [400]

International Article Number (EAN bzw. GTIN)

Product number, SKU, etc. of this item

pr[n]
optional
Format NUMERIC(10) max. 19 999 999 99
Array elements [n] starting with [1]; serially numbered; max [400]

Unit gross price of the item in smallest unit! e.g. cent

no[n]
optional
Format NUMERIC(6)
Array elements [n] starting with [1]; serially numbered; max [400]

Quantity of this item

de[n]
optional
Format CHAR(1..255)
Array elements [n] starting with [1]; serially numbered; max [400]

Description of this item. Will be printed on documents to customer.

va[n]
optional
Format NUMERIC(4)
Array elements [n] starting with [1]; serially numbered; max [400]

VAT rate (% or bp)

Paydata Parameters
add_paydata[over_capture]
optional
Only valid with request "preauthorization"

Value “yes” will enable the overcapture function. The overcapture is restricted until 10% of the order amount.

Note: This function has to be activated by paydirekt.

add_paydata[minimum_age]
optional
Minimum age of the customer for the order → see parameter add_paydata[redirect_url_after_age_verification_failure]
add_paydata[redirect_url_after_age_verification_failure]
optional
For use with parameter add_paydata[minimum_age]

Note: In case of a rejection “Error-URL” will be used if this URL was not transmitted.

add_paydata[shopping_cart_type]
optional
Value “DIGITAL” will change the shippingAddress parameters from mandatory to optional.

Note: The email address is mandatory for a DIGITAL shopping cart type

Response Parameters
status
required
Permitted Values
REDIRECT
ERROR
Response Parameter (redirect)
txid
Format NUMERIC(9..12)

The txid specifies the payment process within the PAYONE platform

userid
Format NUMERIC(6..12)

PAYONE User ID, defined by PAYONE

redirecturl
Format CHAR(2..2000)

Redirect URL → zMerchant system has to redirect customer to this URL to complete payment

ReSponse Parameter (Error)
errorcode
Format NUMERIC(1..6)

In case of error the PAYONE Platform returns an error code for your internal usage.

errormessage
Format CHAR(1..1024)

In case of error the PAYONE Platform returns an error message for your internal usage.

customermessage
Format CHAR(1..1024)

The customermessage is returned to your system in order to be displayed to the customer.

(Language selection is based on the end customer's language, parameter "language")

Host: api.pay1.de
Content-Type: application/x-www-form-urlencoded
Payload

mid=23456
portalid=12345123
key=abcdefghijklmn123456789
api_version=3.11
mode=test
request=preauthorization
encoding=UTF-8
aid=12345
reference=Ref123456
amount=300
currency=EUR
lastname=Mustermann
country=DE
clearingtype=fnc 
financingtype=KIS 
successurl=http://www.yourdomain.url
errorurl=http://www.yourdomain.url
backurl=http://www.yourdomain.url
RESPONSE

status=REDIRECT
redirecturl=http://www.aliasregistrationpage.com
txid=345678901
userid=123456789
POST Request - Capture
Account Parameters
request
required
Fixed Value: capture
mid
required
your merchant ID, 5-digit numeric
aid
required
your subaccount ID, 5-digit numeric
portalId
required
your Portal ID, 7-digit numeric
key
required
your key value, alpha-numeric
common Parameters
txid
required
Format NUMERIC(9..12)

The txid specifies the payment process within the PAYONE platform

capturemode
required
Format LIST
Value Comment
completed Set with last capture; i.e.: Delivery completed.
No further capture is allowed.
notcompleted Set with partial deliveries (last delivery with "completed")
Another capture is expected to complete the transaction.

Specifies whether this capture is the last one or whether there will be another one in future.

sequencenumber
optional
Format NUMERIC(1..3)
Permitted values 0..127

Sequence number for this transaction within the payment process (1..n), e.g. PreAuthorization: 0, 1. Capture: 1, 2. Capture: 2

Required for multi partial capture (starting with the 2nd capture)

amount
required
Format NUMERIC(1..10)
Permitted values max. +/- 19 999 999 99

Specifies the total gross amount of a payment transaction.

Value is given in smallest currency unit, e.g. Cent of Euro; Pence of Pound sterling; Öre of Swedish krona.

The amount must be less than or equal to the amount of the corresponding booking.

currency
required
Fixed Value EUR
narrative_text
optional
Format CHAR(1..81)

Dynamic text element on account statements (3 lines with 27 characters each) and credit card statements.

Response Parameters
status
Permitted Values
APPROVED
PENDING
ERROR
Response Parameter (approved)
txid
Format NUMERIC(9..12)

The txid specifies the payment process within the PAYONE platform

settleaccount
Format LIST 
Value Comment
yes Settlement of outstanding balances has been carried out.
no Settlement of outstanding balances has not been carried out.

Provides information about whether a settlement of balances has been carried out.

Response parameters (pending)
txid
Format NUMERIC(9..12)

The txid specifies the payment process within the PAYONE platform

userid
Format NUMERIC(6..12)

PAYONE User ID, defined by PAYONE

Request Body schema: application/json
errorcode
Format NUMERIC(1..6)

In case of error the PAYONE Platform returns an error code for your internal usage.

errormessage
Format CHAR(1..1024)

In case of error the PAYONE Platform returns an error message for your internal usage.

Host: api.pay1.de
Content-Type: application/x-www-form-urlencoded
Payload
mid=23456
portalid=12345123
key=abcdefghijklmn123456789
api_version=3.10
mode=test
request=capture
encoding=UTF-8
txid=345678901
amount=300
currency=EUR
RESPONSE

status=APPROVED
txid=345678901
settleaccount=no
POST Request - Debit
Account Parameters
request
required
Fixed Value: debit
mid
required
your merchant ID, 5-digit numeric
aid
required
your subaccount ID, 5-digit numeric
portalId
required
your Portal ID, 7-digit numeric
key
required
your key value, alpha-numeric
Common Parameters
txid
required
Format NUMERIC(9..12)

The txid specifies the payment process within the PAYONE platform

sequencenumber
required
Format NUMERIC(1..3)
Permitted values 0..127

Sequence number for this transaction within the payment process (1..n), e.g. PreAuthorization: 0, 1. Capture: 1, 2. Capture: 2

Required for multi partial capture (starting with the 2nd capture)

amount
required
Format NUMERIC(1..10)
Permitted values max. - 19 999 999 99

Specifies the total gross amount of a payment transaction.

Value is given in smallest currency unit, e.g. Cent of Euro; Pence of Pound sterling; Öre of Swedish krona.

The amount must be less than or equal to the amount of the corresponding booking.

currency
required
Format LIST
narrative_text
optional
Format CHAR(1..81)

Dynamic text element on account statements (3 lines with 27 characters each) and credit card statements.

transaction_param
optional
Format CHAR(1..50)
Permitted Symbols: [0-9][A-Z][a-z][.-_/]

Optional parameter for merchant information (per payment request)

use_customerdata
optional
Format LIST
Value Comment
yes

Uses current account details from debtor's master data (default)

no

Uses the last known account details in the payment process

Article Parameters
settleaccount
required
Format LIST
Value Comment
yes Settlement of outstanding balances has been carried out.
no Settlement of outstanding balances has not been carried out.

Provides information about whether a settlement of balances has been carried out.

invoiceid
optional
Format CHAR(1..20)

Merchant's invoice number

invoice_deliverymode
optional
Format LIST
Value Comment
M Postal Mail
P PDF (via email)
N no delivery
invoiceappendix
optional
Format CHAR(1..255)

Dynamic text on the invoice

invoice_deliverydate
optional
DATE(8), YYYYMMDD

Delivery date (YYYYMMDD)

invoice_deliveryenddate
optional
DATE(8), YYYYMMDD

Delivery date (YYYYMMDD)

it[n]
optional
it[n] Comments
goods Goods
shipment Shipping Charges
handling Handling fee
voucher Voucher / discount
id[n]
optional
Format CHAR(1..32)
Array elements [n] starting with [1]; serially numbered; max [400]

International Article Number (EAN bzw. GTIN)

Product number, SKU, etc. of this item

pr[n]
optional
Format NUMERIC(10) max. 19 999 999 99
Array elements [n] starting with [1]; serially numbered; max [400]

Unit gross price of the item in smallest unit! e.g. cent

no[n]
optional
Format NUMERIC(6)
Array elements [n] starting with [1]; serially numbered; max [400]

Quantity of this item

de[n]
optional
Format CHAR(1..255)
Array elements [n] starting with [1]; serially numbered; max [400]

Description of this item. Will be printed on documents to customer.

va[n]
optional
Format NUMERIC(4)
Array elements [n] starting with [1]; serially numbered; max [400]

VAT rate (% or bp)

sd[n]
optional
Delivery date (YYYYMMDD)
Array elements [n] starting with [1]; serially numbered; max [400]

DATE(8), YYYYMMDD

ed[n]
optional
Delivery period end date (YYYYMMDD)
Array elements [n] starting with [1]; serially numbered; max [400]

DATE(8), YYYYMMDD

Response Parameters
status
required
Permitted Values
APPROVED
ERROR
Response Parameter (approved)
txid
Format NUMERIC(9..12)

The txid specifies the payment process within the PAYONE platform

settleaccount
Format LIST
Value Comment
yes Settlement of outstanding balances has been carried out.
no Settlement of outstanding balances has not been carried out.

Provides information about whether a settlement of balances has been carried out.

ReSponse Parameter (Error)
errorcode
Format NUMERIC(1..6)

In case of error the PAYONE Platform returns an error code for your internal usage.

errormessage
Format CHAR(1..1024)

In case of error the PAYONE Platform returns an error message for your internal usage.

customermessage
Format CHAR(1..1024)

The customermessage is returned to your system in order to be displayed to the customer.

(Language selection is based on the end customer's language, parameter "language")

Host: api.pay1.de
Content-Type: application/x-www-form-urlencoded
Payload

mid=23456
portalid=12345123
key=abcdefghijklmn123456789
api_version=3.10
mode=test
request=debit
encoding=UTF-8
txid=345678901
sequencenumber=1
amount=-1000
currency=EUR
RESPONSE

status=APPROVED
txid=345678901
settleaccount=no

Voucher Handling


If you are using vouchers in your checkout and wish to partially refund items, you have two options:

  • send a debit-request with the items using the original amount without any discounts and send a additional item as voucher, with an amount that sums up all discounts
    • example cart with auth
      • item 1; red car;  20 €
      • item 2; green truck; 30 €
      • item 3; voucher -10€ (-5€ discount on both items)
    • example cart with debit/refund
      • item 1; red car;  20 €
      • item 2; voucher -5€  (15€ for one item will be returned)
  • send a debit-request with the items using an reduced amount, so that the whole discount is broken down on every item.
    • example cart with auth
      • item 1; red car;  20 €
      • item 2; green truck; 30 €
      • item 3; voucher -10€ (-5€ discount on both items)
    • example cart with debit/refund
      • item 1; red car;  15 €  (15€ for one item will be returned)

TESTDATA

Please refer to the Klarna documentation on how to set up your test cases: https://docs.klarna.com/resources/test-environment/

For B2B tests with Billie: https://docs.billie.io/reference/sandbox-testing-platform