YooMoney API
Old versions of the API
Help
Sign up for YooMoney
Instructions for setting up the YooMoney module for OpenCart 2/3
YooMoney is the module for integrating your online store with YooMoney's payment services.
YooMoney: accept payments to settlement account and conduct refunds (by contract, for legal entities and private entrepreneurs).
YooMoney: accept payments to YooMoney wallet (without a contract, for everyone).
Technical support and updates are provided by YooMoney.
 
Installing the module
  1. Download the archive containing the module.
    For OpenCart 2.0.x — 2.1.x (.ZIP, 975 KB)
  2. Select Modules — Installing extensions in the dashboard menu.
  3. Click Upload and select the archive you downloaded. Once the uploading is finished, click Continue.
  4. Select Modules in the dashboard, then Modifiers. Click Update (the blue square in the upper right corner) and wait for the "Update successful!" message.
  5. Select Modules — Modules/Extensions in the left-side menu, then select Payment in Extension type. You will see a list of payment extensions: find YooMoney and click Activate (the green square on the right).
  6. When the "Settings updated successfully" message appears, you can proceed with setting up the module.
Как обновить модуль до новой версии (2.3.0 и выше)
  1. Скачайте архив модуля. Выберите тот архив, номер которого соответствует версии OpenCart (проверить версию можно в кабинете администратора внизу страницы).
  2. Загрузите скачанный архив в раздел Модули/Расширения — Установка Расширений.
  3. В разделе Модули/Расширения зайдите в Модификаторы и нажмите Обновить.
YooMoney
Как связать сайт на OpenCart с личным кабинетом ЮKassa
  1. Если магазин к модулю ещё не подключен, нажмите на Подключить магазин.
    Если магазин подключен и вы хотите его поменять или переподключить, нажмите Сменить магазин.
  2. Откроется всплывающее окно. Если не открылось, возможно, браузер его заблокировал — разрешите открывать всплывающие окна на этом сайте.
  3. Разрешите выдать доступ к ЮKassa.
  4. Выберите магазин, который хотите подключить к модулю.
  5. Введите код из смс → всплывающее окно закроется и появятся данные по подключенному магазину.
    Если вышла ошибка, перезагрузите страницу и войдите в ЮKassa ещё раз.
How to set up payment acceptance
  1. Click Modules — Modules/Extensions in the website's dashboard, then indicate "Payment" in the Select extension type list.
  2. You will see a list of payment extensions: find YooMoney and click "Edit" (blue square with a pencil icon on the right side).
  3. View the YooMoney tab and check the Enable payment acceptance via YooMoney box.
  4. Fill out the shopId and Secret key fields: you can get both parameters in your YooMoney Merchant Profile.
  5. Indicate the preferable scenario of selecting a payment method:
    • On YooMoney's side,
    • On the store's side.
  6. If you selected the payment scenario to be played out on the store's side, check the boxes corresponding to payment methods indicated in your contract with YooMoney.
  7. Indicate "YooMoney (bank cards, e-money, etc.)" in the Payment service name field.
  8. If you configured the transmission of receipts to the Tax service via YooMoney partner services (in accordance with Federal Law No. 54-FZ), enable the transmission of receipt data, then indicate the VAT rate to be specified in the receipt.
    • The default rate will be indicated in the receipt for the products that you didn't previously indicate the VAT rate for,
    • The rates in your store, have to be compared against the YooMoney rates.
  9. Configure the Payment method attribute and Payment subject attribute so the fiscal documents will meet FFD 1.05 requirements.
    Payment method attribute is the category of the method you use to accept payment (installments, prepayment, full settlement, etc).
    Payment subject attribute is the category of goods and services that you sell (product, service, gaming bids, etc).
    In the module settings, values of these parameters are set separately for products and for delivery.
    Second receipt
    Once you set up everything for 54-FZ, you can proceed to the second receipt. If you enable this option, the module will generate a closing receipt. This will happen automatically if the order has items with full prepayment and this order has moved to the selected status. For example, "Completed".
    The second receipt will be recorded in the order history.
  10. In the "Order status after the payment" field, select the status to be assigned to an order after it's been paid via YooMoney.
  11. If required, enable "Invoicing via email" and create a template for the email. After that, you will be able to send invoices for orders made on your website in one click.
    How to set up invoices
    How to issue invoices
  12. When you're finished, scroll to the top of the page and click Save (the blue square with the floppy disc icon). That's it: you can test payment acceptance.
How to make refunds
  1. In the left-side menu, select "Sales", then "Orders", then find the required order in the list (if the list is too long, use the filter at the top).
  2. In the "Action" field click on the green "Order management" icon in the line containing the order.
  3. Indicate the amount of the refund. Specify the reason behind the refund: this message will be displayed to the customer.
  4. Click "Refund". If everything is done correctly, you will see the "Payment successfully refunded" message. If the refund was not successful, you will see an error notification.
How to use deferred payments (preauthorization)
If you have enabled deferred payments, bank card payments will be made in two steps:
  1. When the customer places an order on the website, the bank blocks the required amount on their card.
  2. The store captures the payment or returns the money to the customer.
In this case, if the order is canceled or the product is out of stock, the store can easily refund the money. No commission is charged for this refund.
How to enable holding
  1. Navigate to Modules / Extensions section.
  2. Select the "Payment" extension type in the drop-down list.
  3. Find the YooMoney module in the list of extensions and click "Edit".
  4. Check the box next to "Enable deferred payments" box in the module settings to enable the feature.
    After that, orders will have new statuses: "Awaiting capture" and "Cancelled". You will need to configure the statuses in a form that appears after you enable deferred payments.
    Don't forget to save the settings afterwards.
How to capture or cancel a payment
  1. Navigate to Orders section.
  2. Find an order waiting for capture in the list of orders: there is a "Capture payment" button next to it. Click it to proceed to the payment capture or cancellation form.
  3. This form displays basic information about the payment. There are two buttons, "Capture payment" and "Cancel payment".
    Click "Capture payment" to capture the payment.
    Click "Cancel payment" to cancel the payment.
    You will see the results immediately after clicking the button.
Setting up B2B payments
B2B-платежи в ЮKassa позволяют принимать на сайте оплату от юридических лиц.
  1. After installing the YooMoney module, find "YooMoney: Sberbank Business Online" in the list of payment modules, and make sure it's activated. If not, click Activate.
  2. To use B2B payments via Sberbank Business Online, enable this option in the module settings:
  3. Specify the tax rate that will be sent to Sberbank Business Online if a different rate is not specified in the product description.
  4. Compare the VAT rates in your store against the rates that will be sent to Sberbank Business Online.
  5. After setting up B2B payments, don't forget to save your changes.
    When a payment is made via Sberbank Business Online, the payer information is recorded in the order history.
«Покупки в кредит» от СберБанка
В этот способ оплаты входит кредит и рассрочка. Если покупатель платит в рассрочку, в модуле может отображаться неверная сумма покупки (верная будет в личном кабинете ЮKassa). На покупателя это никак не повлияет — он всегда оплатит верную сумму.
Ниже объясняем подробнее, почему так происходит — в двух разных случаях.
Если в заказе не применяется одновременно налог и доставка
Когда вы получите уведомление от ЮKassa о том, что статус платежа изменился на «Успешно» — модуль пересчитает общую сумму заказа и стоимость каждой позиции в заказе, чтобы они соответствовали значениям в чеке в личном кабинете ЮKassa.
Заказ для покупателя перед оплатой:
Заказ в модуле до перерасчёта:
Чек в личном кабинете ЮKassa после оплаты:
Заказ в модуле после пересчёта. В истории указана скидка:
Если применяется и налог, и доставка
В заказе пересчитается только итоговая сумма заказа. Так происходит потому, что OpenCart показывает налоги отдельно от товаров, а в чеке в личном кабинете ЮKassa цены отображаются вместе с налогами. Также может возникнуть неточность, когда данные для чека отправляются из модуля: доставка указывается без налогов, затем ЮKassa формирует чек по этим данным, а модуль отображает в админке другую стоимость.
Заказ для покупателя перед оплатой:
Заказ в модуле до пересчёта:
Чек в личном кабинете ЮKassa после оплаты:
Заказ в модуле после пересчёта:
YooMoney
How to set up payment acceptance to a YooMoney wallet
Using this module, you can accept payments to your YooMoney wallet without a contract.
  1. Click Modules — Modules/Extensions in the website's dashboard, then indicate "Payment" in the Select extension type list.
  2. You will see a list of payment extensions: find YooMoney and click "Edit" (blue square with a pencil icon on the right side).
  3. Open the "YooMoney" tab and check the "Enable payment acceptance to the YooMoney wallet" box.
  4. Enter the number of the wallet for accepting the money in the "Wallet number" field.
  5. You can get the "App ID" and "Code word" values on the YooMoney website
    by following this link and filling out the fields:
    • "Name" is the name of your store, it will be shown to the user.
    • "URL" is the website where you will accept payments.
    • "Email address for contact" is your email address.
    • "Redirect URL" is RedirectURL in the module's settings (simply copy this link).
    • "Logo" is not required but it helps users to recognize your service.
    • Be sure to check the "Use app authentication" box.
    When you fill out all the fields on the registration page, click "Confirm". The website will generate ID and the "Code word": copy and paste them into the module's settings.
  6. Indicate "YooMoney (bank cards, e-money, etc.)" in the Payment service name field.
  7. In the Order status after the payment field, select the status to be assigned to an order after it's been paid via YooMoney.
  8. The rest of the settings are optional. When you're finished, scroll to the top of the page and click Save (the blue square with the floppy disc icon). That's it, now you can test payment acceptance.