Klarna was founded in 2005 in Stockholm, Sweden with the aim of making it easier for people to shop online. In the last 18 years, technology has evolved, excited and transformed the world around us, yet our mission remains as relevant as ever, to make paying as simple, safe and above all, smoooth as possible. Klarna is the leading global payments and shopping service, providing smarter and more flexible shopping and purchase experiences to 150 million active consumers across more than 500,000 merchants in 45 countries. Klarna offers direct payments, pay after delivery options and instalment plans in a smooth one-click purchase experience that lets consumers pay when and how they prefer to. When the company acquired SOFORT in 2014 the Klarna Group was formed. Klarna is backed by investors such as Sequoia Capital, Silver Lake, Bestseller Group, Dragoneer, Permira, Visa, Ant Group and Atomico. |
Payment Type | Countries | Currency |
---|---|---|
Invoice ("Pay later") |
|
|
Installments ("Slice it") |
||
Direct Debit ("Pay now") |
Overview of Deviations
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) |
Enabling your customers to pay via Klarna requires you to integrate the Klarna payment method into your checkout process. In order to get an overview of the relationship and interaction on your checkout please see the following diagram. (This diagram is adopted from the official Klarna documentation: Klarna Docs - Offering Klarna payment methods to your customers)
Establishing Klarna Checkout is a 3 step process.
The first step is to setup a new checkout session by sending a genericpayment-request to our server API as listed below. This step is a pre-condition for loading the Klarna widget.
Please make sure to send the customer data within this request as it is needed to initiate a new session. A session will remain valid for 48 hours after the last update.
→ Genericpayment start_session
If the customer leaves the checkout page and returns at a later point in time, you can update the created session and change for example the address data.
Part of the response is a client token. This token needs to be passed to the Klarna Widget. This Widget sends the client token together with the selected payment method (e.g. "Klarna Pay Later") to Klarna to get a authorization token.
In the last step, you need to send the authorization token received by Klarna widget as part of the (pre-)authorization request to our server api.
→ Preauthorization/Authorization
The response contains a redirect-URL. You need to redirect the customer to this url, so that Klarna is able to securely handle data and optimize purchase flow. The customer doesn't need to take any action and will not notice this step in the background.
POST Request - genericpayment – add_paydata[action] = start_session
The first step is to setup a new checkout session by sending a genericpayment-request to our server API as listed below. This step is a pre-condition for loading the Klarna widget.
Please make sure to send the customer data within this request as it is needed to initiate a new session. A session will remain valid for 48 hours after the last update.
Only submit a buyer's personal information within this request if you ensure the buyer has actively chosen Klarna as a payment method - due to GDPR.
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
|
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[action]
required
|
Fixed Value: start_session
Identifies the request as one to start a new session |
add_paydata
required
|
FORMAT: BASE 64 String
"EMD" - Extra Merchant Data - means that integration with any such package depends on |
add_paydata
required
|
FORMAT: CHAR(1..50)
Title recipient within the delivery address |
add_paydata
required
|
FORMAT: CHAR(1..30)
Telephone number of the recipient or a contact at the delivery address |
add_paydata
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
required
|
PERMITTED VALUES:
Only relevant for B2B transactions. |
add_paydata
required
|
FORMAT: CHAR(1..50)
Will be given to Klarna as "vat_id" |
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 "@" 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 |
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
|
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
|
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) |
add_paydata
|
PERMITTED VALUES:
|
add_paydata
|
PERMITTED VALUES:
|
add_paydata
|
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
|
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) |
workorderid |
Format AN(1..16)
The ID is unique. The returned workorderid is mandatory for the following requests of PayPal Express Checkout.
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. |
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
In order to update the session, e.g. the customer has added a new item tothe cart, you need to send a genericpayment-request with action=update. The call needs to provide the new list of items representing the complete shopping cart.
An update is only possible as long as the preauthorization is not captured completely. Do not send the difference/changes, instead you need to send the complete new item list The amount cannot be higher than the amount of the preauthorization. A lower amount is allowed.
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
|
mode
required
|
Fixed Value: test/live
|
||||||||
workorderid
required
|
Format AN(1..16)
The ID is unique. The returned workorderid is mandatory for the following requests of PayPal Express Checkout.
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. |
||||||||
financingtype required
|
Format LIST
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[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 |
country
required
|
Format LIST
|
it[n] optional
|
|
||||||||||
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) |
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) |
workorderid |
Format AN(1..16)
The ID is unique. The returned workorderid is mandatory for the following requests of PayPal Express Checkout.
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. |
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
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
|
mode
required
|
Fixed Value: test/live
|
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
|
status |
Permitted Values
APPROVED
ERROR
|
workorderid |
Format AN(1..16)
The ID is unique. The returned workorderid is mandatory for the following requests of PayPal Express Checkout.
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. |
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
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
|
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 "@" 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 |
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
|
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" |
it[n] optional
|
|
||||||||||
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) |
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 |
status
required
|
Permitted Values
REDIRECT
ERROR
|
Format NUMERIC(9..12)
The txid specifies the payment process within the PAYONE platform |
|
Format NUMERIC(6..12)
PAYONE User ID, defined by PAYONE |
|
Format CHAR(2..2000)
Redirect URL → zMerchant system has to redirect customer to this URL to complete payment |
Format NUMERIC(1..6)
In case of error the PAYONE Platform returns an error code for your internal usage. |
|
Format CHAR(1..1024)
In case of error the PAYONE Platform returns an error message for your internal usage. |
|
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
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
|
txid
required
|
Format NUMERIC(9..12)
The txid specifies the payment process within the PAYONE platform |
||||||
capturemode
required
|
Format LIST
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. |
Permitted Values
APPROVED
PENDING
ERROR
|
Format NUMERIC(9..12)
The txid specifies the payment process within the PAYONE platform |
|||||||
Format LIST
Provides information about whether a settlement of balances has been carried out. |
Format NUMERIC(9..12)
The txid specifies the payment process within the PAYONE platform |
|
Format NUMERIC(6..12)
PAYONE User ID, defined by PAYONE |
Format NUMERIC(1..6)
In case of error the PAYONE Platform returns an error code for your internal usage. |
|
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
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
|
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
|
settleaccount required
|
Format LIST
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
|
||||||||||
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
|
|
||||||||||
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 |
status
required
|
Permitted Values
APPROVED
ERROR
|
Format NUMERIC(9..12)
The txid specifies the payment process within the PAYONE platform |
|||||||
settleaccount |
Format LIST
Provides information about whether a settlement of balances has been carried out. |
Format NUMERIC(1..6)
In case of error the PAYONE Platform returns an error code for your internal usage. |
|
Format CHAR(1..1024)
In case of error the PAYONE Platform returns an error message for your internal usage. |
|
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
If you're using vouchers in your checkout, and want to partial refund items, you do have 2 options to do this:
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