monthly_cost

This function is not used any more, please use calc_monthly_cost instead.

Purpose: to calculate the monthly cost for account purchases. Please note! To obtain the pclass, log in to Kreditor Online. Click on “Display store” and then “Click here to view campaigns”.

Example PHP code monthly_cost($sum, $rate, $months, $monthsfee, $flags, $currency, &$result) Input Data:
Required Variable Type Description
sum integer The amount concerned in ören or cents.
rate double The interest rate, given as stated below. Interest rates (Mar 22, 2010) are the following:
  • Sweden: 19,5 %
  • Finland: 22,0 %
  • Denmark: 21,60 %
  • Norway: 22,0 %
  • Germany: 14,95 %
months integer The amount of months that the part payment is. This value is always 24 months.
monthsfee integer The monthly fee for using Klarna's account, given in ören or cents. Monthly fees (Mar 22, 2010) are the following:
  • Sweden: 29 SEK (given as 2900)
  • Finland: 3,95 EUR (given as 395)
  • Denmark: 39 DKK (given as 3900)
  • Norway: 45 NOK (given as 4500)
  • Germany: 1,95 EUR (given as 195)
flags integer The lowest fee that the end customer can pay is always 50 SEK, 89 DKK, 95 NOK, 8,95 EUR (Finland) or 6,95 EUR (Germany). It can be useful though to show the monthly cost for each product on the product page so the customer can add monthly costs for different goods easier.

Example: Instead of showing the monthly cost as ”from 50 SEK/month”, you can instead show ”from 10 SEK/month” for a shirt and ”from 40 SEK/month for a pair of pants.

If you send the flag integer 1, the function will show the monthly cost without rounding up to 50 SEK, 89 DKK, 95 NOK, 8,95 EUR (Finland) or 6,95 EUR (Germany) if the monthly cost is below that. If you instead send integer 0, the function will always return a monthly cost with the minimum amount described above.

Please note! At the checkout you have to always show the minimum 50 SEK, 89 DKK, 95 NOK 8,95 EUR (Finland) or 6,95 EUR (Germany) since that is the actual monthly cost the customer will have to pay. In other words, you have to send integer 0 at the checkout.

currency integer The currency for the purchase. This is relevant since the lowest monthly cost for SEK is 50 kronor/month, DKK it is 89 DKK/month and for EUR it is 9 EUR/month. If you send the correct currency, it will be shown the correct way on your website.
  • Svenska kronor = $KRED_SEK = 0;
  • Norska kronor = $KRED_NOK = 1;
  • Euro = $KRED_EUR = 2;
  • Danska kronor = $KRED_DKK = 3;

To make sure you have the correct calculation on your site, you can use the calculator here below to check.

Sum:

Currency:

Monthly cost price location:

Return Value:
A monthly cost for the account purchase shown for the customer. Monthly cost is always an integer and is returned in ören or eurocents. It is important that is always rounded up to the closest integer.

 

API functions

Add_transaction functions
Invoice handling functions
Test persons