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:
- Access the Admin VTEX.
- Click on Payments.
- Then, click on Settings.
- In Payment Conditions tab, select the payment condition that should be configured to use Simple Interest Rates.
- Copy the last URL parameter, which shows the ID of this Payment Method (see image).
Setting up the interest rate type using API
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
- Compound Interest Rate will equal
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.