Checkout 3.0
Monthly Fee calculation script

Monthly Fee calculation script

**NOTICE: **We have launched a new feature called “Payment Widget” that allows you to promote credit payments by showing the customer information about monthly payment options by invoice or loan. Read more about the feature under: Payment Widget documentation.


If you have a product page where you want to display the monthly fee when paying the purchase with an account or loan.

Java script function

function getMonthlyPayment(months, price, statementFee, yearInterestRate) {
  return (
    Math.round(
      ((yearInterestRate / 1200 +
        yearInterestRate /
          1200 /
          (Math.pow(1 + yearInterestRate / 1200, months) - 1)) *
        price *
        100) /
        100,
    ) + statementFee
  );
}

Example calculation


Monthly Payment:

Example product page item : Account 12 month

Example of a product with mothly fee calculation done