Testing payments
If you use the Payment module implementation scheme or HTTP protocol, you can check the integration in the demo store. The payment process is identical to the actual payment process, except the money is not transferred anywhere. You can test payments made using two methods: via a bank card, or from a YooMoney for Shopping wallet.
Contact your manager if you want to connect the demo store. The demo store is available in the Merchant Profile, you can select it by clicking the All stores and payouts button. Learn more about the demo store and how to configure it
To test payments, you will need
shopId
and scid
of your demo store. You can find them in the demo store settings of your Merchant Profile.To test payments, view to the YooMoney payment module settings:
- switch the module to work mode (if you enable test mode, the payment will not be processed);
- specify
shopId
andscid
of the demo store.
For instructions on installing and configuring the payment module, see the Setting up CMS, Framework, or CRM section of the YooMoney website or ask your system’s developers for help.
- Create an empty file with the
*.html
extension. - Copy the sample of the required payment form code to it.
- Change the values of the
shopId
andscid
parameters toshopId
andscid
values of the demo store. - Save the file.
Example of a form for selecting payment method on store’s website
<html> <head> <meta charset="utf-8"> <meta content="IE=edge" http-equiv="X-UA-Compatible">> <meta content="width=device-width, initial-scale=1" name="viewport">> <title>Test payment form</title> </head> <body> <form action="https://yoomoney.ru/eshop.xml" method="post"> <!-- Required fields --> <input name="shopId" value="151" type="hidden"/> <input name="scid" value="363" type="hidden"/> <input name="customerNumber" value="100500"/> <input name="sum" value="100"> Payment method:<br/> <input name="paymentType" value="PC" type="radio">Payment from YooMoney for Shopping wallet<br/> <input name="paymentType" value="AC" type="radio">Payment from any bank card<br/> <input type="submit" value="Pay"/> </form> </body> </html>
Example of a form with the payment method selection on YooMoney’s side
<html> <head> <meta charset="utf-8"> <meta content="IE=edge" http-equiv="X-UA-Compatible"> <meta content="width=device-width, initial-scale=1" name="viewport"> <title>Test payment form</title> </head> <body> <form action="https://yoomoney.ru/eshop.xml" method="post"> <!-- Required fields --> <input name="paymentType" value="" type="hidden"> <input name="shopId" value="151" type="hidden"/> <input name="scid" value="363" type="hidden"/> <input name="sum" value="100"/> <input name="customerNumber" value="100500"/> <input name="cps_phone" value="79110000000"/> <input name="cps_email" value="user@domain.com"/> </form> </body> </html>
Step 1. Proceed to payment:
- If you use a payment module, place an order as if you were a customer and proceed to payment.
- If you’re using the payment form, open the HTML file in the browser, select the payment method, and click Pay. The payment method is selected on the store’s website or on the YooMoney side (this depends on the payment scenario).
Step 2. Pay for the order using the test bank card or the test YooMoney for Shopping wallet.
Step 3. If your store gets HTTP notifications (it is activated using the HTTP protocol or a Payment module), make sure that the order is marked as paid in your system.
Real cards can’t be used in the demo store. Use test cards provided below for testing payments. Enter any month and year for the expiration date (but greater than the current date), and any numbers for the CVC and the 3‑D Secure passcode.
You can test payments with different types of bank cards.
Number | Card type |
---|---|
5555555555554477 | MasterCard (with 3‑D Secure) |
5555555555554444 | MasterCard |
6759649826438453 | Maestro |
4111111111111111 | Visa |
4175001000000017 | Visa Electron |
370000000000002 | American Express |
3528000700000000 | JCB |
36700102000000 | Diners Club |
Select a test card depending on your required scenario.
Card number | Reason behind the payment cancelation |
---|---|
5555555555554592 | 3‑D Secure authentication failed. The buyer should repeat the payment, contact their bank for details, or use another payment method |
5555555555554535 | Payment made with this payment method was declined for unknown reasons. The buyer should contact the organization that provides the payment method |
5555555555554543 | The bank card has expired. The buyer should use a different payment method |
5555555555554568 5555555555554634 | The payment was blocked due to suspected fraud. The buyer should use a different payment method |
5555555555554527 | No detailed reason provided. The buyer should contact the initiator of the payment cancellation for more details |
5555555555554600 | Not enough money to make the payment. The buyer should add money to the account balance or select other payment method |
5555555555554618 | Invalid card number. The buyer should repeat the payment and enter the correct card details |
5555555555554626 | The CVV2 code (CVC2, CID) was entered incorrectly. The buyer should repeat the payment and enter the correct card details |
5555555555554501 | The organization that provides the payment method is not available. The buyer should repeat the payment later or use another payment method |
5555555555554576 | You have reached the payment limit for this payment method or your store. The buyer should repeat the payment on the next day or select another payment method |
5555555555554550 | Transactions made with payment method are forbidden (for example, the card is blocked due to loss or the wallet is blocked due to hacking). The buyer should contact the organization that provides the payment method |
5555555555554584 | Payments a bank card issued in this country are not allowed. The buyer should use a different payment method. You can configure limits for payments made via foreign bank cards |
You do not need a test wallet to test payments made from YooMoney for Shopping wallets as payments in the demo store can be made without a real wallet.
Stores using a CMS or other ready-made system will need to change the
shopId
and scid
parameters to real ones in the payment module settings and make sure the module’s work mode is enabled.If you do not use a payment module or other ready-made solution, change the
shopId
and scid
parameters to real ones in the payment form.See also