YooMoney API
Old versions of the API
Help
Sign up for YooMoney
YooMoney for MODX Revolution
Configuration manual
The module works with two YooMoney payment services.
YooMoney
YooMoney allows accepting payments on the website. All popular methods are available: bank cards, e-wallets, cash, online banking, direct carrier billing, and others.
This is a service for business: it requires a contract, and the funds are credited to the company's settlement account.
Sing up for YooMoney
YooMoney
YooMoney allows accepting payments on your website from bank cards and e-wallets. The funds will be credited to your YooMoney wallet, the contract is not required.
 
How to install the module
  1. Click Apps — Installer in website's dashboard. A page with the list of packages will open.
  2. Click Download add-ons — Download the package.
  3. Download the archive containing the module (Select package — Download).
  4. Close the downloads window once its done. Find YooMoney on the page with the list of packages, and click Install — Installation options — Install package.
  5. Open the payment form chunk and enter ~[[!YooMoney?&action=showMethods]] in the list of payment methods. It looks like this:
    <select name="payment" style="width:200px;">
    <option value="On receipt" [[!+fi.payment:FormItIsSelected=`On receipt`]]>On receipt</option>
    [[!YooMoney? &action=`showMethods` ]]
    </select>
    
  6. Open the checkout page chunk and add YooMoneyHook to the FormIt list of hooks, It looks like this:
    [[!FormIt?
    &hooks=`spam,shk_fihook,YooMoneyHook,email,FormItAutoResponder,redirect`
    &submitVar=`order`
    &emailTpl=`shopOrderReport`
    &fiarTpl=`shopOrderReport`
    &emailSubject=`New order made in «[[++site_name]]» online store`
    &fiarSubject=`You made an order in the online store "[[++site_name]]"`
    &emailTo=`[[++emailsender]]`
    &redirectTo=`25`
    &validate=`address:required,fullname:required,email:email:required,phone:required`
    &errTpl=`<br /><span class="error«>[[+error]]</span>`
    ]]
    
  7. Create a successful payment page and a payment error page.
    After that, you can set up payment acceptance using one of two methods:
    • via YooMoney,
    • via YooMoney,
How to enable payment acceptance via YooMoney
To set up payment acceptance using this manual, you need to sign up for YooMoney and get the shopId and Secret key parameters.
Once you get both parameters, you can proceed with the configuration following this manual.
  1. Open the website's dashboard and select YooMoney in the left-hand menu (Elements tab in the Snippets section).
  2. Select the Parameters tab and click Default settings are blocked: this button unlocks the module settings so you can configure them.
  3. Fill out the module settings as in the table below.
    accountDon't change
    fail_page_idIndicate the ID of the page to show the user in case of payment failure
    method_cardsSet Yes if the Bank cards payment method is provided for in your YooMoney contract
    method_cashSet Yes if the Cash payment method is provided for in your YooMoney contract
    method_qwSet Yes if the Qiwi payment method is provided for in your YooMoney contract
    method_sbSet Yes if the SberPay payment method is provided for in your YooMoney contract
    method_ymSet Yes if the YooMoney wallet payment method is provided for in your YooMoney contract
    mode
    Indicate Legal entity (payment method selection on the store's side) if you want all payment methods to be placed on your website.
    Indicate Legal entity (payment method selection on YooMoney's side) if you want all payment methods to be placed on YooMoney's side.
    passwordIndicate the Secret key parameter in this field, you will need to issue and activate it in your YooMoney Merchant Profile
    shopidIndicate the shopId parameter in this field, you can copy it from your YooMoney Merchant Profile
    success_page_idSpecify the ID of the page to show the user if the payment was successful
    tax_id
    If you fiscalize payments using the YooMoney solution, select your VAT rate on the right.
    If you fiscalize payments independently (without the use of YooMoney), leave the field unchanged. More about the YooMoney's solution for Federal Law No. 54-FZ
    yookassa_send_checkSet Yes if you fiscalize using the YooMoney solution. More about the YooMoney's solution for Federal Law No. 54-FZ
  4. Save the settings. That's it, now you can test payment acceptance.
How to set up payment acceptance to YooMoney wallet
To set up payment acceptance using this manual, you will need a YooMoney wallet number. Create a wallet
  1. Open the website's dashboard and select YooMoney in the left-hand menu (Elements tab in the Snippets section).
  2. Select the Parameters tab and click Default settings are blocked: this button unlocks the module settings so you can configure them.
  3. Fill out the module settings as in the table below.
    accountIndicate the number of the wallet to send money to
    fail_page_idDon't change
    method_abDon't change
    method_cardsSet Yes if you want to accept payments from bank cards
    method_cashDon't change
    method_qwDon't change
    method_sbDon't change
    method_wmDon't change
    method_ymSet Yes if you want to accept payments from YooMoney wallets
    modeIndicate Individual
    passwordIssue the Code word in the wallet settings and copy it here Issue code word
    shopidDon't change
    success_page_idSpecify the ID of the page to show the user if the payment was successful
    tax_idDon't change
    yookassa_send_checkDon't change
  4. Save the settings. That's it, now you can test payment acceptance.