.NET SDK

Download and use a SDK for simple integration with our API.

 

Requirements

Instructions

The recommended way is to install using NuGet.

To install Klarna .NET API, run the following command in the Package Manager Console

    PM> Install-Package Klarna.Net.Api

If you do not have NuGet you can download the package from here and add it as a dependency in Visual Studio.

=====================
Klarna dotNET API
=====================

v4.1.0
---------------
2014-07-16

Story (#2137) (Christer G.) - Adding XMLRPC method extend_expiry_date

v4.0.0
---------------
2014-07-16

Story (#1681) (Joakim L.) - Remove ReserveOcrEmail function
Story (#1645) (Joakim L.) - Make Configuration as an interface

v3.1.1
---------------
2014-05-13

Story (#1436) (Christer G.) - Release Klarna .Net Api to NuGet

v3.1.0
---------------
2014-03-24

Story (#1531) (Rickard D.) - Remove Candice from DOTNET-XMLRPC and implement setCustomerNumber


v3.0.0
---------------
2013-09-18
Complete rewrite. 

v2.6.3
---------------
2013-07-15

Story (#820) (Rickard D.) - Update lowest_monthly_payment_for_account for Netherlands
Bug (#750) (Christer G.) - Fix regarding UpdateInfo not extending XMLRPC struct correctly 


v2.6.1
---------------
2013-04-24

Story (#594) (Majid G.  ) - Add goods list to credit_part without returning article
Story (#530) (Fredrik R.) - Change test environment to Testdrive instead of beta-test
Story (#566) (Majid G.  ) - Add goods list to credit calls for restocking fees
Story (#606) (Fredrik R.) - Allow extra merchant data in .net


v2.3.0
---------------
2012-10-16

    Majid G. <support@klarna.com>
        [Deprecated] Deprecated Flag 8
            [Modified]: KlarnaAPI/Core/API.cs (Obselete PrePay in Flag enum)

        [Changed] Added description to returnAmount
            [Modified]: KlarnaAPI/Core/API.cs (a new parameter to
                        returnAmount function)

        [New] Added Update functionality
            [Added]:    KlarnaAPI/Core/Update.cs
            [Modified]: KlarnaAPI/Core/Structs.cs (UpdateInfo class)
            [Modified]: KlarnaAPI/Core/IAPI.cs (update function)
            [Added]:    Examples/Update/Update.cs
            [Added]:    Examples/Update/Update.csproj
            [Added]:    Examples/Update/AssemblyInfo.cs

        [Refactored] Implemented the new format for change log for the new release
            [Changed] CHANGELOG

    Rickard D. <support@klarna.com>
        [New] Added Activate call
            [Added]:    Examples/Activate/Activate.cs
            [Added]:    Examples/Activate/Activate.csproj
            [Added]:    Examples/Activate/AssemblyInfo.cs
            [Added]:    KlarnaAPI/Core/activate.cs
            [Modified]: KlarnaAPI/Core/Structs.cs
            [Modified]: KlarnaAPI/Core/IAPI.cs
            [Modified]: KlarnaAPITest/activateTest.cs

        [Changed] ClearData now also clears Article Numbers added with AddArticleNumber
            [Modified]: KlarnaAPI/Core/API.cs (ClearData)

        [Changed] Updated project files
            [Modified]: KlarnaAPITest/KlarnaAPITest.csproj
            [Modified]: dotnet-api.sln

        [Refactored] Refactored Digest call and created Digest related methods for
                     new partial class file
            [Added]:    KlarnaAPI/Core/Digest.cs

        [Fixed] Corrected PRound function to properly round even small ( < 1 )
                amounts
            [Modified]: KlarnaAPI/Core/Calc.cs (PRound function)

        [Fixed] Member xmlrpcClient was private and has been changed to protected
            [Modified]: KlarnaAPI/Core/API.cs

        [Fixed] Members BetaAddress and BetaPort were private and have been changed
                to protected
            [Modified]: KlarnaAPI/Core/API.cs

        [Fixed] Method GetCountryForCode was private and has been changed to public
            [Modified]: KlarnaAPI/Core/API.cs

        [Fixed] Added default empty constructor for KlarnaAddress, ShippingAddress
                and BillingAddress classes
            [Modified]: KlarnaAPI/Core/API.cs

        [Fixed] Struct AddressStruct has modified to not cause XML-PRC error
                with null members
            [Modified]: KlarnaAPI/Core/Structs.cs (Struct AddressStruct)

        [Refactored] Implemented ToString, Equals and GetHashCode overrides for
                ShipmentInfo
            [Modified]: KlarnaAPI/Core/Structs.cs (Struct ShipmentInfo)


2012-02-13 v2.2.0
David K. <support@klarna.com>
=======================================

Added has_account call

    * Added example file for has_account
        new file:   Examples/HasAccount/AssemblyInfo.cs
        new file:   Examples/HasAccount/HasAccount.cs
        new file:   Examples/HasAccount/HasAccount.csproj

    * HasAccount function
        modified:   KlarnaAPI/Core/API.cs

    * HasAccount XML-RPC specification
        modified:   KlarnaAPI/Core/IAPI.cs

    * HasAccount tests
        modified:   KlarnaAPITest/APITest.cs

    * auto updated project files
        modified:   KlarnaAPITest/KlarnaAPITest.csproj
        modified:   dotnet-api.sln


Corrected SplitReservation return value

    * Update expected return value in example values
        modified:   Examples/SplitReservation/SplitReservation.cs

    * Change return value i XML-RPC specification of split_reservation
        modified:   KlarnaAPI/Core/IAPI.cs

    * Change return value of SplitReservation function and update type cast
      accordingly
        modified:   KlarnaAPI/Core/reservation.cs


Updated example files

    * Use the new swedish test person, updated comments, removed redundant
      examples of alternative configuration
        modified:   Examples/ReserveAmount/ReserveAmount.cs
        modified:   Examples/ActivatePart/Activatepart.cs
        modified:   Examples/CheckReservation/CheckReservation.cs
        modified:   Examples/GetAddresses/GetAddresses.cs
        modified:   Examples/ReserveAmount/ReserveAmount.cs

    * Correct ActivatePart example to use url and invno as keys
        modified:   Examples/ActivatePart/ActivatePart.cs

    * Change IP-address in examples to a proper testing address
        modified:   Examples/ActivateReservation/activateReservation.cs
        modified:   Examples/AddTransaction/AddTransaction.cs
        modified:   Examples/GetAddresses/GetAddresses.cs
        modified:   Examples/ReserveAmount/ReserveAmount.cs

    * Change quantity in example goods list to make split and partial
      activations work.
        modified:   Examples/AddTransaction/AddTransaction.cs
        modified:   Examples/ReserveAmount/ReserveAmount.cs

    * Remove redundant configuration alternatives
        modified:   Examples/ActivateInvoice/ActivateInvoice.cs
        modified:   Examples/ActivatePart/ActivatePart.cs
        modified:   Examples/ActivateReservation/activateReservation.cs
        modified:   Examples/AddTransaction/AddTransaction.cs
        modified:   Examples/CalcMonthlyCost/CalcMonthlyCost.cs
        modified:   Examples/CancelReservation/CancelReservation.cs
        modified:   Examples/ChangeReservation/ChangeReservation.cs
        modified:   Examples/CheckILT/CheckILT.cs
        modified:   Examples/CheckOrderStatus/CheckOrderStatus.cs
        modified:   Examples/CreditInvoice/CreditInvoice.cs
        modified:   Examples/CreditPart/CreditPart.cs
        modified:   Examples/DeleteInvoice/DeleteInvoice.cs
        modified:   Examples/EmailInvoice/EmailInvoice.cs
        modified:   Examples/FetchPClasses/FetchPClasses.cs
        modified:   Examples/GetAddresses/GetAddresses.cs
        modified:   Examples/GetPClasses/GetPClasses.cs
        modified:   Examples/Get_Set_RemoveCustomerNumber.cs
        modified:   Examples/HasAccount/HasAccount.cs
        modified:   Examples/InvoiceAddress/InvoiceAddress.cs
        modified:   Examples/InvoiceAmount/InvoiceAmount.cs
        modified:   Examples/InvoicePartAmount/InvoicePartAmount.cs
        modified:   Examples/IsInvoicePaid/IsInvoicePaid.cs
        modified:   Examples/ReserveAmount/ReserveAmount.cs
        modified:   Examples/ReserveOCR/ReserveOCR.cs
        modified:   Examples/ReserveOCREmail/ReserveOCREmail.cs
        modified:   Examples/ReturnAmount/ReturnAmount.cs
        modified:   Examples/SendInvoiceViaRegularMail.cs
        modified:   Examples/SplitReservation/SplitReservation.cs
        modified:   Examples/UpdateChargeAmount/UpdateChargeAmount.cs
        modified:   Examples/UpdateEmail/UpdateEmail.cs
        modified:   Examples/UpdateGoodsQuantity/UpdateGoodsQuantity.cs
        modified:   Examples/UpdateNotes/UpdateNotes.cs
        modified:   Examples/UpdateOrderNumber/UpdateOrderNumber.cs


Corrected documented return value of ActivatPart
    * Change return type to XmlRpcStruct
        modified:   KlarnaAPI/Core/API.cs


Allow gender to be null in AddTransaction
    * Add alternative XML-RPC specification of add_invoice with gender as a
      string, this allows gender to be sent as empty string (null in XML-RPC)
      in addition to 0 and 1


v2.1.0
----------------
Date: 2011-11-17

* fetchPClasses by default loads pclasses for the configured country

* added support for the check_ilt call

* fixed a bug where a address field was improperly sent

* the dll is now signed

* when not passing a amount to reserveAmount the amount is calculated from the
  goods list

* cleanup of enums