Api Yandex cash register mobile layout. Yandex.Checkout is an acquiring solution for an online store. Connecting Yandex.Checkout for static lead forms

I wrote an article about... Today he will talk about online payment. So, here's Roman's article.

Online payment allows you to significantly increase the turnover of your money; you do not need to wait until the package arrives, until it is redeemed, etc. The money comes instantly, even before the goods are shipped.

In this article I will show you a tool like Yandex Cashier. With its help you can easily install the form for online payment on your website.

To get started, go through the registration process. It's very simple. Go to link and click “Connect cash register”.

How to connect Yandex Cashier for individuals

Individuals can only accept payments in Ya.Money, so you must have this wallet registered. The buyer can pay for the order in three ways:

  1. Wallets on Yandex:
    - owners of registered and identified wallets will be able to send a transfer;
    - a commission is taken from the recipient, 3.5% of the amount.
  2. Bank cards:
    - you can pay with Visa cards, MasterCard, Maestro;
    - commission is taken from the recipient, 3.5% of the amount;
    - minimum transfer amount: 1 ruble 2 kopecks.
  3. Cell phones:
    - fit Russian license plates Beeline, MTS, Tele2;
    - the commission is taken from the sender, mobile operator adds it to the payment amount. Beeline - 7.95% + 10 rubles, MTS - 10.86% + 10 rubles, Tele2 - 15.86%;
    - you can make only three payments per day from one phone, the maximum for each is 500 rubles.

To connect a form to pay for an order, you need to go to your Y.Money personal account and select the “Accepting payments” tab. A window will open with payment acceptance methods; select the one called “Button”.

In the form designer, check the required fields.

I advise you to mark the fields of full name, address, phone number, so as not to ask the buyer for them, but simply confirm the address.

In addition to the fields, be sure to put a link in the redirect field. To do this, create separate page on your website, which will inform the buyer that his payment has been received and that an operator will call him soon. detailed instructions shown in the video tutorial at the end of the article.

How to connect individual entrepreneurs and LLCs

For those who work officially, there are 2 ways to connect payment from Yandex.

Without an agreement

IN personal account Click on the “Accepting payments” tab and select the last item called “Form”. Next, fill out your form, enter your product or service in the name of the payment and add additional fields as necessary (I recommend adding fields: address, telephone). After this, click the “next” button and you will be taken to a page where you enter your details. Then click on the “Create Form” button, and on the right you will be given a code that you need to insert into your website. What you need to know:

  • The commission is taken from the payer in the amount of 3%, but not less than 30 rubles.
  • The money is transferred to the PC on the next business day.
  • A payment notification is sent to the email address to which your Ya.Money wallet is linked.

With a contract

In order to connect this payment method, you also need to go to the “Accepting payments” tab, and in the right top corner select “Cashier for business”. After this, you will be taken to a promo page that describes all the benefits and tariffs this method payment. By clicking on the “connect cash register” button, you fill out the form and then submit a connection request. Within a few hours, a Yandex manager will contact you, confirm the data, and ask for scans of documents (as far as I remember: passport, INN, OGRNIP). Then you need to sign the agreement (you will fill it out using a special constructor) sent by email, and send a scan of the signed agreement back to Yandex.

Within 24 hours, you will receive a form code by email, which you can place on your website.

The advantages of this method:

  • You connect a payment aggregator, which means you can accept many payment options.
  • Every day you receive payment reports through this form.

Minuses:

  • In my opinion, the tariffs are high
  • It is impossible, without knowledge of the code, to configure appearance forms of payment. Accordingly, it is necessary to look for a person who knows how to do this.
  • Linking to one site

I also want to note that if you do not have a one-page website, but a website on some kind of CMS, then there is already ready-made solutions in the form of extensions. Yandex Cashier has extensions for most popular engines.

Video tutorial

In this video I show everything clearly.

If you have questions, write in the comments!

A payment form is a set of fields with information about the payment and order. The form is placed in the store interface, on the page that the user sees after placing an order. You can get the form code when you connect, or you can create the form yourself.

When the user clicks on the button Pay, payment information is sent to Yandex.Checkout in the form of a set of parameters according to standard address(https://money.yandex.ru/eshop.xml, POST method). The store can add to the form Extra options.

Sending the form initiates the generation and processing of a transfer order on the Yandex.Checkout side.

There are two payment scenarios: the main one, with the choice of payment method on the Yandex.Checkout side, and with the choice of the payment method on the store website.

Form with a choice of payment method on the Yandex.Checkout side

In this form, you do not need to specify the payment method; the paymentType parameter contains an empty value (paymentType="" ).

All methods available to this store will appear on the Yandex.Checkout side. New payment methods will be added automatically.

Form with a choice of payment method on the store website

In this case, the form indicates all payment methods available to this store. The user's choice is sent to the Yandex.Checkout service (in the paymentType parameter).

The store independently organizes the choice of payment method in its interface. To add new way payment, the store needs to make changes to payment form.

To configure you need:

Registration in Yandex.Checkout is available only to legal entities and individual entrepreneurs. Status legal entity or an individual entrepreneur will need to fill out the form. Without the form, you will not be able to register further.

Connecting the Cashier

Registration

Step 1. Click " Connect the Cashier» on the Yandex Cashier website.



Step 2.We indicate all the necessary information.


Filling out the form

We indicate all the necessary data and send the form for verification. When the questionnaire is checked, you will need to sign an agreement and also send it for verification.


Settings

After the Questionnaire, fill out the section “Settings».



Method tab

Select " Payment module" and click "Continue".


Options Tab

Step 1. In field " Your System» select « LP platform».



Step 2.We indicate information about "Battle payments»



For the field " checkUr"indicate the link:
http:// YOUR_DOMAIN /gw/yandex/check

For field « avisoUrl» indicate the link:
http:// YOUR_DOMAIN /gw/yandex/ok
For the field " shopSuccessUrl» indicate
http://YOUR_DOMAIN /success
For the field " shopFailUrl» indicate http://YOUR_DOMAIN /fail

* WhereYOUR_DOMAIN
Important!
Example:
Domain: http://testdomain.rf/
Domain in punycode:
You can convert a domain to puonycode via "Punycode converter" Or open the page in a browser and copy the address from the address bar.

Step 3.We indicate information about "Test payments».



Let's enable the function "I will make test payments" and provide links.

For the field " checkUrl» indicate the link:
http:// YOUR_DOMAIN /gw/yandex/test/check

For field « avisoUrl» let's indicate the link:
http:// YOUR_DOMAIN /gw/yandex/test/ok
For the field " shopSuccessUrl» indicate a link to the page where the visitor will go after a successful payment (you can create a special page or select any one). For example, the link might look like this:
http://YOUR_DOMAIN /success
For the field " shopFailUrl» indicate a link where you need to redirect if the payment did not go through (for example, there were insufficient funds). The link might look like this:http://YOUR_DOMAIN /fail

* WhereYOUR_DOMAIN - This Domain name your page.

Important!If your domain name is written in Russian, it must be specified in punycode.
Example:
Domain: http://testdomain.rf/
Domain in punycode: http://xn--b1aebcsticdzjc3j.xn--p1ai/
You can convert a domain to punycode using "Punycode converter" Or open the page in a browser and copy the address from the address bar.

Step 4.We indicate valid mail, where the registers will be sent.
Step 5.We come up with and indicate any password in the “shopPassword» , you will need it when creating an integration on the LP Platform.
Step 6.Save and continue setting.


Tab " Online cash register»


Yandex.Checkout makes it possible – just select the method of working with the online cash register via Yandex.Checkout and specify a partner.


We fill in information about the selected partner and send data for the check.


Creating an integration in your personal account on the LP Platform

Step 1.Let's go to LP Platform personal account to the section " Integrations».



Step 2. Click " Add integration" and select " Yandex.Cash».



Step 3.After registering with Yandex.Checkout, you will receive an email with “Store ID» ( ShopID) And " Storefront ID» ( Scid). We enter this data and password into the appropriate integration fields.



Also Store ID (ShopID)may be displayed .

Step 4.When all the fields for the new integration are filled in, click “Add”.
If all the data is correct, a page with integration settings will open, where you can enable and configure data transfer for the check.

Since July 2017, entrepreneurs undertake, instead of the usual cash registers install online cash registers that transmit information about each purchase directly to the tax authorities.
.


You can also specify scid for demo mode and make a test payment.



Step 5. Save.


Connecting integration to the page

Step 1.Go to page settings.



Step 2.Go to the tab " Store setup" and select the newly created integration with Yandex.Checkout.



Step 3.Let's go to the page editor.



Step 4.Go to the cart settings. Open the form and go to the form settings, where we indicate in the list “Action after sending» « Proceed to payment».


After all changes, republish the page.
You have just set up integration with the Yandex.Checkout service.
Have a nice work!

If your page has a product and a button under it"Order", but there is no cart into which you can add several products at once, do this:

Important: after enabling the transition to payment, we indicate the product parameters - name and price in the form settings and in the widgets “ Product Name / The price of the product” (the price can only be specified in RUB currency).

What will paid applications look like?

A notification about a paid application can be seen in the section “ Applications".
It will also be sent to the email specified in the Yandex.Checkout settings.

Attention! The archives are signed by the store version, different archives for different versions not compatible. The archive name has the prefix _for_

  • oc3 - only for 3 stores
  • oc2.3 - only for 2.3 stores
  • oc2.2 - only for 2.2 stores
  • oc2.0-2.1 - only for stores 2.0 and 2.1
  • oc1.5 - only for stores 1.5.3, 1.5.4, 1.5.5, 1.5.6

If you haven't found the archive for your version of the store , we will add this archive in downloads.

a) Stores 3, 2.3, 2.2, 2.1, 2.0

Automatic installation:

  1. In the admin panel of the site, menu Add-ons - Install add-ons - Download the archive yandexur-pro.ocmod.zip
  2. If you encounter errors with the installer, check ftp settings or install the extension (manual installation is also possible - see Manual installation)

Manual installation:

  1. Unzip the archive, there are 2 files inside the archive - readme.txt and yandexur-pro.ocmod.zip
  2. Unzip the archive yandexur-pro.ocmod.zip, inside the upload folder and the install.xml file
  3. Rename install.xml to yandexur.ocmod.xml
  4. In the admin panel of the site, menu Add-ons - Install add-ons - Upload the file yandexur.ocmod.xml
  5. Menu Add-on Manager (Modifications) - update the modification cache
  6. Install required modules in the section Add-ons - payments (Payment)

b) Stores 1.5

  1. Unzip the archive, inside the archive there are 2 objects - readme.txt and the upload folder
  2. By using file access to the site (ftp or ssh) upload all the contents of the upload folder to the root of the site
  3. Install the necessary modules in the Add-ons - Payments (Payment) section

II. Settings

  1. Submit a request to connect to YandexKassa
  2. You will have a personal account - then Personal Account
  3. Fill out copies of documents in LC
  4. Sign the contract -
  5. In the tab Settings click Fill. Choose a method API connections protocol and press Continue.
  6. Specify notification addresses and other settings.
  7. Select how to send data for checks:

    Via Yandex.Checkout— in this case, you will need to connect the online cash register of one of Yakassa’s partners. -
    Decide later— if you don’t know exactly what to do with fiscalization, you can start connecting and fill out these settings later.
    On one's own— payments through Yandex.Checkout proceed as usual, you send fiscal data to your online cash register (manually or through another service).

    Click send.

    In the module settings enter license key() set the statuses “Order status after unsuccessful or expected payment” and “Status after successful payment”. Attention different statuses must be specified.

    For bank cards, a choice of Transaction Method is available (API protocol ONLY):
    ATTENTION - TWO-STAGE PAYMENTS ARE NOT AVAILABLE AT THIS MOMENT
    One-stage - money is debited from the card without additional confirmations
    Two-stage - money is blocked on the buyer’s card. You have 7 days to confirm payment by bank card. If you do not confirm payment within the allotted time, the money will be returned to the buyer. Once you are sure that you are ready to provide the service or issue the goods, you need to confirm the payment. If you cannot provide a service or issue a product, you must cancel the payment. The money will be returned to the user; Yandex.Checkout will not charge a commission for the transaction.

    Set the module status to "enabled" and save the settings

    ATTENTION! Order statuses must be different (created, paid - either in the deferred or availability control scheme, created, waiting, paid)

    ATTENTION! If you use the Select payment method on the Yakassa side, then for it you need to configure all the modules that will be on the Yakassa side (it is not necessary to enable them)

III. Setting up interaction with the online cash register

This step is necessary only for those who are going to set up interaction with their online cash register through Yandex.Checkout. You should skip this if you submit check information to your online cash register yourself or issue checks manually. This section documentation allows you to choose the method of sending fiscal data to your online cash register (according to law 54-FZ). You can send them using Yandex.Checkout or another method.

a) What to do:

  1. Buy or rent an online cash register (KKT - cash register equipment).
  2. Conclude an agreement with the fiscal data operator (FDO).
  3. Get qualified electronic signature(KEP, needed to register an online cash register with the tax office).
  4. Register an online cash register with the tax office: in the personal account of a legal entity or individual entrepreneur on the website nalog.ru.
  5. Send fiscal data via the online cash register after each payment.

b) How the solution works:

  1. The buyer pays in your store as usual. Along with the payment request, the module transmits data for the receipt to YandexCash: names of goods, quantity, price, VAT rate, email address buyer.
  2. YandexKassa sends your online cash register the details for the receipt and waits for a response.
  3. The online cash register generates a check and sends it to the fiscal data operator (FDO).
  4. The operator assigns a fiscal tag to the check and sends it to your online cash register.
  5. The online cash register responds to YandexKassa that everything is in order with the check.
  6. YandexKassa understands that everything is according to the law: the tax office will receive a check from the OFD on the same day, and sends you a message about successful payment.
  7. The OFD sends the check data to the tax office once a day.
  8. OFD sends a check to the buyer by email or SMS (this is an additional service).

c) How to send data for checks via Yandex.Cash

  1. Buy or rent an online cash register from one of YandexKassa’s partners ( ATOL Online, ModuleCashier And Orange Data, support for other services is in development), enter into an agreement with the OFD (for example ofd.ru), register an online cash register with the tax office.
  2. Change the settings in your Yandex.Checkout personal account. Store settings menu - button to connect our solution.
  3. Example of editing online cash register settings:

    Type of online cash register— Yakassa partner from whom you bought or rented online cash registers.
    Data in block Integration are needed for the partner’s service to pass requests to your online cash register. They can be copied in your personal account at your online cash register (or requested from your provider).
    Address on check- this is the point of sale, printed in electronic receipt. This could be your store address (on the map) or website address (URL).
    Mail for errors— the email address to which Yakass sends messages about problems with sending data for checks. If your online checkout stops responding, an email will be sent to this address.
    Sending data for a check Defines the scheme by which Yakassa works with your online cash register. In 7 days: first the payment is made, and then the details for the check are sent to the online cash register. If the online cash register does not respond, the payment will go through, but the check may never be sent. In this case, a letter will be sent to Mail for errors.
    In 5 minutes: First, the check information is sent to your online cash register. When she receives a response that everything is in order with the data, Yakassa will send you a payment notification. If the online cash register does not respond within 5 minutes (for example, something happens on the provider’s side), the payment will not go through: the money will be returned to the buyer. This option ensures that the tax authorities will know about the paid item.

  4. In the module settings, check the "Transfer cart" item to "Yes"
  5. Below, set VAT - Without VAT - all goods in the cart will be assigned tax without VAT. Forced - VAT will be assigned to all items in the cart, select the desired percentage. The "From product card" option allows you to set an individual rate for each product in the cart - to do this, be sure to create a tax class; if the first field on the right is empty (system-localization-taxes-tax class), you do not need to create tax rates. Specify the desired tax class when editing the product, and in the table on the right, set the correspondence of your tax class to the VAT rate.

Attention! In the module "Yandex.Kassa PRO - Mobile terminal (Advanced protocol) - Beta version" YKassa cannot send data for checks when paying through the mobile terminal. You need to do this yourself.

You can accept payments through Yandex.Checkout, and send data for checks in another way (manually or through another service) - If on the Yandex Checkout side you selected the “Independent” option, then in the module settings, check the “Transfer cart” item to the “No” position

d) Integration with orange data

Enter the cash register group code (ask support) - default is Main
Select your tax system

e) Integration with ModulKassa

Login for token- this is your login from your ModulKassa Personal Account (e-mail);
Password for token- password from the ModulKassa Personal Account;
Cash register group code is the point of sale ID that you copied to your clipboard ( Personal account ModulKassy→Menu→Points of sale);

f) Integration with AtolOnline

In the fields “Login for token”, “Password for token” and “Cash desk group code” the data received after registration in ATOL Online is indicated; you can find them in your atol-online personal account. Attention! "Login for token","Password for token" Not coincide with login and password from your personal account ATOL Online

IV. Payment testing (HTTP PROTOCOL ONLY)

If you plan to test the operation of your store, when choosing a connection method in your personal account, check the “I will make test payments” checkbox. When your store is connected to the test environment (demomoney.yandex.ru), you will receive a letter with test parameters. (The letter is sent to the address contact person By technical issues, which you specified in your personal account.) These parameters also appear in your personal account, in the section Settings. Substitute them into the payment form on your website.

  1. In the module settings Select the module operation mode: "Testing"
  2. On the Yakassa gateway, enter test data

    Card number: 4444 4444 4444 4448
    Valid until: any year and month in the future
    CVV code: 000

  3. If you receive an error on the Yakassa side after entering the card, then this indicates a problem with checkurl - make sure that your checkurl returns code 200 in the server access logs, this entry should appear immediately after sending the card data, make sure there are no errors in the error log store (see faq for error codes), make sure https is working, make sure the checkurl address specified on the Yandex side is correct)

    Once you return to the store, you should see a successful payment page and your order status should change. (If the order status has not changed, this indicates problems with AvisoUrl - make sure that your AvisoUrl gives code 200 in the server access logs, this entry should appear immediately after returning to the site, make sure there are no errors in the store error log (see faq by error codes), make sure the AvisoUrl address specified on the Yandex side is correct)

V. Transferring payment acceptance to operating mode

You can put the payment form into working mode if:

  • your store has successfully received notifications about all test payments;
  • in the daily register that you received by e-mail, there is all the necessary payment information.

After this, technical specialists will configure the store on the Yandex.Checkout side and inform you of all the necessary parameters.

  1. In the module settings, enter new data if you received it
  2. In the store window, add the product to your cart and place an order using the payment method ( Bank cards- this is the simplest and convenient option for testing)
  3. If you receive an error on the Yakassa side after proceeding to payment, turn on the debugging mode in the module settings and make sure that the transmitted data is correct (the amount to be paid, and also if you have enabled work with online cash registers on the Yakassa side, then the correctness of the transferred product items, as well as total amount for payment and the amount of commodity items)
  4. At the Yakassa gateway, enter payment details
  5. Once you return to the store, you should see a successful payment page and your order status should change.

If after some time you receive a payment fiscalization error (When the online cash register mode is turned on)
Here is a list of the main errors:

  • Your accountant “out of habit” closed the shift in the online cash register interface (Atol, Module.Kassa, etc.). While the shift is closed, payments will not be fiscalized. Typically, a shift is closed automatically using the online cash register used.
  • Primary fiscalization was not carried out at the cash desk

Contact Yakass support as well as your support online cash register to resolve these issues

VI. Updating the module version

  1. Be sure to backup your website and database files
  2. Remove the module modifier (modifiers menu or add-on manager or system folder) if you use it (only for store version 2.x)
  3. overwriting files
  4. Update the modifier cache (only for store version 2.x)
  5. Be sure to re-insert api_key or shopPassword. Resave the settings if necessary, make changes to the settings
  6. Make sure that the notification address or checkUrl and AvisioUrl have not changed both in the module and on the Yandex side
  7. For 3x stores, update twig cache ( home page admin panel, gear at the top right)
  1. Remove or disable payment for the native YandexKassa module
  2. Change the notification address or checkUrl and AvisioUrl on the YaKassa side in LC
  3. Repeat partly step II Settings

1. When you go to payment, the text No Data
In the module settings, enable debugging mode, the last line is an error from Yandex cash register
Description of errors

Also, errors from No Data are available in the store log without enabling debugging mode.

This error is a response from Yandex checkout, read the text, the most common is incorrect authorization (shopid or api) or incorrect password - spaces at the beginning at the end (Password has illegal format), the method is not available on the Yandex checkout side (connect through the manager), method not available in module (

2. Deciphering errors from the store log (error log)

YandexUr Error: Hash not equal- the secret phrase specified in the module settings and written in the questionnaire does not match

YandexUr Error: Amount of payment not equal- the amount does not add up, the payment went through one and the order was different.

YandexUr Error: This order alredy paid- the order has already been paid

Other errors are the response from Yandex checkout, read the text, the most common is incorrect authorization (shopid or api), the method is not available on the Yandex checkout side (connect through the manager), the method is not available in the module ( on this moment Alpha click is not available for API, Promsvyazbank, mobile terminal, Masterpass, Kupivkredit, Erip- these methods are only for the old HTTP protocol)

3. How to add an icon to a payment method

In the module settings

field name of payment method add img tag(what is an img tag and how it works is described in the link)

Yandex money

4. Successful, unsuccessful payment and repeat payment pages are displayed incorrectly



copy the module templates catalog/view/theme/default/template/account/
yandexur_fail.tpl
yandexur_success.tpl
yandexur.tpl to your template folder in the appropriate path, correct the layout in them to suit your template

Stores 3.x
It is necessary to bring the tpl of the module in accordance with your template (take common/success.tpl as a standard)
copy the module templates catalog/view/theme/default/template/extension/payment/
yandexur_fail.twig
yandexur_success.twig
yandexur_view.twig
to your template folder in the appropriate path, correct the layout in them to suit your template

5. The re-payment link is not displayed in your personal account
the button can be added in the module settings in the comments in the letter - the instructions field in the letter, add a link variable, the link will be displayed in the order view, create a tag for the button and give it styles

Corrections for the template

Stores 1.5
Edit xml file from the vqmod folder
block catalog/view/theme/*/template/account/order_list.tpl in accordance with your template

Stores 1.5, 2.0, 2.1, 2.2, 2.3
Remove the modifier, open the module archive file instal.xml
edit the catalog/view/theme/*/template/account/order_list.tpl block according to your template
rename the file to yandexur.ocmod.xml and install via the installer, update the modifier cache

Stores 3.x
edit catalog/view/theme/default/template/extension/payment/yandexur_aclink.twig
update twig template cache

In the module settings, specify the Attribute of the payment method and subject - this data will be used by default if you select the Attribute of the subject and/or method for a product - the default item

If you specify your field from the product card, the data will be taken from of this field, if the field is empty, the default setting for this product will be used.

For individual values, you must select the field from which the value will be taken; the list of fields is available in the drop-down list.

For values ​​in the product card, indicate one of the following values ​​in the required field

Attribute of the subject of calculation

Meaning Description
commodity Product
excise Excise goods
job Job
service Service
gambling_bet Bet in a gambling game
gambling_prize Winning in a gambling game
lottery Lottery ticket
lottery_prize Winning the lottery
intellectual_activity Results of intellectual activity
payment Payment
agent_commission Agent's commission
composite Several variants
another Other