YooMoney API
Old versions of the API
Help
Sign up for YooMoney
YooMoney for MODX Revolution
 
How to install the module
  1. Download the archive containing the module
  2. Click Apps — Installer in website's dashboard. A page with the list of packages will open.
  3. Click Download add-ons — Download the package.
  4. Download the archive containing the module (Select package — Download).
  5. Close the downloads window once its done. Find YooMoney on the page with the list of packages, and click Install — Installation options — Install package.
  6. 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>
    
  7. 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>`
    ]]
    
  8. Create a successful payment page and a payment error page.
    After that, you can set up payment acceptance 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_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.