Testing
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.
 
Demo store
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.
Create the demo store for testing and configure it: specify the URL for receiving HTTP notifications, get an ID and a secret key with the test_ prefix in your Merchant Profile. Use the received data to authenticate requests in the API.
You can create a maximum of 5 demo stores. Learn more about the demo store and how to configure it
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).
 
Testing options
You can test the full API functionality, including the sending of data for receipts, for the following payment methods:
 
Payment via a bank card
 
Payment via a bank card
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.
 
Testing successful scenarios
You can use bank cards of different payment systems to test payments:
NumberType of card
5555555555554477Mastercard (with 3-D Secure)
5555555555554444Mastercard
6759649826438453Maestro
4793128161644804Visa (with 3-D Secure)
4111111111111111Visa
4175001000000017Visa Electron
2200000000000004Mir (with 3-D Secure)
2202474301322987Mir
370000000000002American Express
3528000700000000JCB
36700102000000Diners Club
 
Testing unsuccessful scenarios
If you want to test the
cancellation_details
parameter value for unsuccessful payments, use any test bank cards of different payment systems.
 
Transaction cancelled by “external” participants of the payment process (payment_network)
Card numberReason behind the cancelation
5555555555554592 (Mastercard)
4839665499603842 (Visa)
2200000000000012 (Mir)
3d_secure_failed
5555555555554535 (Mastercard)
4926946416239025 (Visa)
2200000000000020 (Mir)
call_issuer
5555555555554543 (Mastercard)
4141435412630840 (Visa)
2200000000000038 (Mir)
card_expired
5555555555554568 (Mastercard)
4483274282299972 (Visa)
2200000000000046 (Mir)
fraud_suspected
5555555555554527 (Mastercard)
4889971706588753 (Visa)
2202202212312379 (Mir)
general_decline
5555555555554600 (Mastercard)
4562265587712390 (Visa)
2200000000000053 (Mir)
insufficient_funds
5555555555554618 (Mastercard)
4951017853630544 (Visa)
2201382000000013 (Mir)
invalid_card_number
5555555555554626 (Mastercard)
4194180666146368 (Visa)
2200770212727079 (Mir)
invalid_csc
5555555555554501 (Mastercard)
4654130848359150 (Visa)
2201382000000021 (Mir)
issuer_unavailable
5555555555554576 (Mastercard)
4565231022577548 (Visa)
2201382000000039 (Mir)
payment_method_limit_exceeded
5555555555554550 (Mastercard)
4233961169071671 (Visa)
2201382000000047 (Mir)
payment_method_restricted
 
Transaction cancelled by YooMoney (yoo_money)
Card numberReason behind the cancelation
5555555555554584 (Mastercard)
4969751510013864 (Visa)
2201382000000054 (Mir)
country_forbidden
5555555555554634 (Mastercard)
4119098878796485 (Visa)
2201696981989955 (Mir)
fraud_suspected
 
Payment from the YooMoney wallet
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.
Log out of your YooMoney for Shopping account before making a test payment from wallet.
 
Working with receipts
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:
  1. 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.
  2. Test the payment and refund procedures in accordance with the selected scenario.
  3. When you’re ready to accept payments from your real customers, make sure that your real store has the online sales register’s settings.
 
Testing payments in accordance with 54-FZ
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.
 
Checklist for preparing the data for receipts
 
Correctness of requests
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
    quantity
    by 
    amount
    for each item, then add them up);
  • all amounts in the receipt are positive.
If something goes wrong, YooMoney will return an error.
 
Correctness of data
Make sure that the data you’re sending meets the requirements of 54-FZ and the restrictions of online sales registers:
  • the
    excise
    parameter 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_number
    parameters 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.

Do you have any questions or comments regarding the documentation?

We can set up a call and discuss them: we'll help you solve the problem and you'll help us understand what we need to improve. To do that, share your contact information and select the time.
Yes, I'd like to set up a meeting
 
See also
Quick startPayment processDeclined paymentsPayment by 54-FZ