Documentation
Feedback
Guides

Payments
Configuration Guides
Setting up the type of interest rate

Identifying the payment method's ID

The payment method's ID can be configured to have Simple Interest Rates and is obtained by following these steps:

  1. Access the Admin VTEX.
  2. Click on Payments.
  3. Then, click on Settings.
  4. In Payment Conditions tab, select the payment condition that should be configured to use Simple Interest Rates.
  5. Copy the last URL parameter, which shows the ID of this Payment Method (see image).

{"base64":"  ","img":{"width":1993,"height":825,"type":"png","mime":"image/png","wUnits":"px","hUnits":"px","length":175340,"url":"https://cdn.jsdelivr.net/gh/vtexdocs/dev-portal-content@main/images/setting-up-the-type-of-interest-rate-0.png"}}

Setting up the interest rate type using API

The interestRateMethod field is where the setup should be implemented, if we were to use the Simple Interest Rate or Compound Interest Rate calculation algorithm:

  • Simple Interest Rate will equal interestRateMethod: 1.
  • Compound Interest Rate will equal interestRateMethod: null.

A GET Rule by ID call will initially be sent in order to receive the updated Payment Method setting through the following API:

The reply that the GET Rule by ID call returns will be the request of the thereafter POST Rule by ID call. To save the new configuration, only the value interestRateMethod:1 should be modified:

At present, the only way to change a payment method is through API. Should it be necessary to change the payment method by using the user interface, the setup process through API would have to be repeated, since when saving the changes, the value will be considered empty by default.

Contributors
2
Photo of the contributor
Photo of the contributor
+ 2 contributors
Was this helpful?
Yes
No
Suggest edits (Github)
Contributors
2
Photo of the contributor
Photo of the contributor
+ 2 contributors
On this page