You can test the full functionality of the YooMoney API for payments made with bank cards and from YooMoney wallets, including the sending of data for generating receipts.
You can check the integration in the demo store before accepting actual payments. The payment process in the demo store is identical to the actual payment process, except the money is not transferred anywhere.
The demo store appears in the YooMoney for Business Merchant Profile after you specify your Tax Identification Number (INN) and fill out the technical settings.
The demo store has its own ID and secret key with a test_ prefix: you can issue and view both of them in your YooMoney for Business Merchant Profile.
Do not dispatch products that were purchased in the demo store. To avoid confusion, use a special URL for the test notifications from YooMoney (specify the URL in the demo store’s settings in the Merchant Profile).
You can test the full API functionality, including the sending of data for receipts, for the following payment methods:
- payment via bank card:
- payment via YooMoney wallet.
Do not use real bank cards in the demo store: you can test payment acceptance using of the test cards.
Test bank cards of different payment systems are displayed below: you can choose any card for testing. Specify any month and year (exceeding the current date) for the expiration date, and any numbers for the CVC and the 3-D Secure confirmation code.
You can use bank cards of different payment systems to test payments:
|Number||Type of card|
|5555555555554477||Mastercard (with 3-D Secure)|
|4793128161644804||Visa (with 3-D Secure)|
|2200000000000004||Mir (with 3-D Secure)|
If you want to test the
cancellation_detailsparameter value for unsuccessful payments, use any test bank cards of different payment systems.
|Card number||Reason behind the cancelation|
|5555555555554592 (Mastercard) |
|5555555555554535 (Mastercard) |
|5555555555554543 (Mastercard) |
|5555555555554568 (Mastercard) |
|5555555555554527 (Mastercard) |
|5555555555554600 (Mastercard) |
|5555555555554618 (Mastercard) |
|5555555555554626 (Mastercard) |
|5555555555554501 (Mastercard) |
|5555555555554576 (Mastercard) |
|5555555555554550 (Mastercard) |
|Card number||Reason behind the cancelation|
|5555555555554584 (Mastercard) |
|5555555555554634 (Mastercard) |
You do not need a test wallet to test payments via YooMoney for Shopping, as transactions in the demo store are carried out without an actual wallet.
You can test the payment process in accordance with 54-FZ in the demo store. The interaction with YooMoney in the testing mode is the same as during real payments and refunds: you will need to send data for generating receipts, and you can check the receipt information in your Merchant Profile.
While in receipt-testing mode, YooMoney only imitates the interaction with an online sales register: testing data isn’t being sent to the online sales register and OFD, so no physical receipts are being generated, and the user doesn’t receive emails from YooMoney or receipts from OFD.
How to test the receipt-generating procedure:
- Set up the demo store: navigate to the demo store from your Merchant Profile, activate the receipt-testing mode in the Settings — Online Sales Register section, and select the scenario for sending the data.
- Test the payment and refund procedures in accordance with the selected scenario.
- When you’re ready to accept payments from your real customers, make sure that your real store has the online sales register’s settings.
Generation of receipts is a part of the payment and refund processes. Check the sending of receipts on each stage and see how the receipts are recorded in the payment history of the demo store.
When testing, specify the identifier and secret key of the demo store in the requests and use the special test bank card and test wallet for payments.
Make sure that at each stage you’re generating the relevant receipts. They should be generated in accordance with the selected scenario for sending the receipts.
or Payment after receipt
|Receipt after payment|
|Payment creation||Payment receipt||Payment receipt|
|Full payment capture||No receipt required||No receipt required|
|Partial payment capture||Payment receipt||Refund receipt|
|Payment cancellation||Receipt generated automatically||Refund receipt|
|Delivery of product after prepayment||Transaction completion receipt||Transaction completion receipt|
|Full refund||Receipt generated automatically||Refund receipt|
|Partial refund||Refund receipt||Refund receipt|
Make sure that you’re correctly sending the data for receipts:
- data is sent in the corresponding request (depends on the scenario for sending the receipts);
- all required parameters are included;
- parameters values are sent in the required formats;
- receipt contains no more than 100 items;
- payment amount corresponds to the total receipt amount (to determine the receipt amount, multiply quantitybyamountfor each item, then add them up);
- all amounts in the receipt are positive.
If something goes wrong, YooMoney will return an error.
Make sure that the data you’re sending meets the requirements of 54-FZ and the restrictions of online sales registers:
- the exciseparameter is only specified for the products with the “Excisable goods” payment subject attribute;
- a separate receipt is created for products sold on credit: it’s forbidden to have products with the “Loan” payment method attribute in the same receipt as the products with other payment method attributes;
- the product_code,country_of_origin_code,customs_declaration_numberparameters are only specified for products with the “Product”, “Excisable goods”, “Several subjects”, “Other” payment subject attributes.
If something goes wrong, the online sales register won’t generate a receipt: the error information will be shown in the payment history (the demo store will have an imitation of the response from the online sales register). The payment status will depend on the scenario for sending the receipts: for Payment after receipt, YooMoney will cancel the payment and automatically generate the Refund receipt; for other scenarios, the payment will be processed.Quick startPayment processDeclined paymentsPayment by 54-FZ