Overview

Terms and conditions

Click here to see which terms and conditions need to be shown in your e-commerce site.

Integration guide

Please look at the integration guide to understand more about the process of how this service works.

Normal integration (add_transaction functions)
1. This is how it works
2. Checkout example
3. Testing
4. Checklist
5. Switch off test mode

Advanced integration (reservation functions)
1. This is how it works
2. Checkout example
3. Testing
4. Checklist
5. Switch off test mode

  • Checkout example has information about how our services should be displayed.
  • In testing you will see some use cases and also find our test persons which you can use to test with.
  • Checklist has important information regarding the integration and for you to make sure you have everything in order before going live.

The API for PHP and ASP/VBScript are very similar. Hence, the PHP API is described in full while ASP/VBScript is only mentioned when it diverges from the PHP API.

Please note! All input data strings should be coded in accordance with ISO-8859-1

SSL connection

All our new APIs are directed to our SSL server. If you have a old API, please use our new server https://payment.klarna.com.

Return Values and Error Codes


Return Values (PHP)

All PHP functions use a return parameter called $result. This parameter is used to return the result of a function call.

Please note! ASP/VBScript functions do not use this parameter.

For PHP functions, the result value zero (0) indicates that $result contains the expected answer. If, on the other hand, the result value is negative, $result contains error data (usually in the form of an error code).

Return Values (ASP)

The ASP script always returns a Scripting.Dictionary object with a status attribute. The value of status is either "ok" or "error".

If status = “ok” the attribute value contains the result of the function call. If status = “error” the attribute faultCode contains an error code. Negative faultCode values indicate that faultString has been set to an error code.

Error Codes

We will return an error code number and an error message that you show to the customer.

 

API functions

Add_transaction functions
Test persons