YooMoney API
Guides
Old versions of the API
Help
Sign up for YooMoney
Widget for installments
The widget for installments is an additional YooMoney's solution for the Installments payment method. It allows you to quickly calculate the amount of a monthly installment and show it to the user.
If you want to show the amount of a monthly installment, use:
  • the CheckoutCreditUI.js library and place a ready-made button or information block on your website using this library;
  • the credit-pre-schedule method for calculating the amount of a monthly installment and use this data in your forms.
 
CheckoutCreditUI.js
You can use this JavaScript library to embed YooMoney's Installments widget into your system.
You can select a display mode for the widget: button or information block.
Button can be embedded in the cart (once the user selected the product). The button shows the actual amount of a monthly installment.
Information block can be placed in the product's description or in the catalog to inform the user that they can pay for this particular product in installments. The block shows the actual amount of a monthly installment.
Getting started
To get started, implement the library and create an instance of CheckoutCreditUI.
Implement the library
HTML
<script src="https://static.yoomoney.ru/checkout-credit-ui/v1/index.js"></script>
Create an instance of CheckoutCreditUI
JavaScript
const $checkoutCreditUI = CheckoutCreditUI(params);
Where params are the configuration parameters.
Configuration
ParameterTypeDescription
shopIdlongID of a store, issued after you've signed up for YooMoney.
sumCurrencyAmountOrder amount.
Example of CheckoutCreditUI configuration
JavaScript
const $checkoutCreditUI = CheckoutCreditUI({
    shopId: '6677',
    sum: '3000'
});
Widget display
Use the .UPDATE method for displaying the widget.
JavaScript
$checkoutCreditUI.update();
NameDescriptionTypeDefault
domSelectorSelector of the element in the page's source code where the widget is displayed (id or class)string{void}
typeWidget's display mode. Possible values: button (button), info (information block).stringbutton
tagTag used for displaying the button (can only be used with type='button'). Possible values: button, input.stringbutton
themeButton design (can only be used with type='button'). Possible values: white или default.stringdefault
The button (type='button') can be configured by selecting its design. If there is no theme or theme='default', the button will be yellow. If theme='white', the button will be white.
Yellow button with the input type='button' tag
JavaScript
const checkoutCreditButton1 = $checkoutCreditUI({
    type: 'button',
    theme: 'default',
    domSelector: '.parent1'
});
White button with the input type='submit' tag
JavaScript
const checkoutCreditButton2 = $checkoutCreditUI({
    type: 'button',
    tag: 'input',
    theme: 'white',
    domSelector: '.parent2'
});
Information block
JavaScript
const checkoutCreditText = $checkoutCreditUI({
    type: 'info',
    domSelector: '.parent3'
});
Example of use
JavaScript
const $checkoutCreditUI = CheckoutCreditUI({
    shopId: '6677',
    sum: '3000'
});

const checkoutCreditText = $checkoutCreditUI({
    type: 'info',
    domSelector: '.parent3'
});
credit-pre-schedule method
This method allows pre-calculating the amount of a monthly installment repayment for a particular product when the payment is made via YooMoney's Installments service.
Calling the method
Requests are sent using the GET method under the HTTP/1.1 protocol.
Address for sending requests
https://yoomoney.ru/credit/order/ajax/credit-pre-schedule
Request parameters
ParameterTypeDescription
shopIdlongStore's ID, issued after you've signed up for YooMoney.
sumCurrencyAmountOrder amount.
Example of a request
https://yoomoney.ru/credit/order/ajax/credit-pre-schedule?shopId=6677&sum=10000
Response parameters
ParameterTypeDescription
termlongLoan or installment plan term, number of months.
creditPercentlongInterest rate (percentage per month).
amountCurrencyAmountAmount of a monthly installment.
totalAmountCurrencyAmountFull amount of a loan over the entire period including interest.
Example of a response
JSON
{
    "term":12,
    "creditPercent":"3.90",
    "amount":"1223.33",
    "totalAmount":"14680.00"
}
See also