Test payment

Attention. This is an old version of the API. Switch to the Yandex.Checkout API.
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 Yandex.Money wallet.

The demo store is available in Merchant Profile, where you can select it via the All stores and payouts button.

Learn more about the demo store and how to configure it

Important. If you didn't find the demo store in your Merchant Profile, you might have previously used the Yandex.Checkout testing environment. If you want to use the demo store instead of the testing environment, contact your manager.

Preparation

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.

Test payments made using the CMS payment module

To test payments, view to the Yandex.Checkout payment module settings:

  • switch the module to work mode (if you enable test mode, the payment will not be processed);
  • specify shopId and scid of the demo store.

For instructions on installing and configuring the payment module, see the Setting up CMS, Framework, or CRM section of the Yandex.Checkout website or ask your system's developers for help.

Test payments made using the payment form
  1. Create an empty file with the *.html extension.
  2. Copy the sample of the required payment form code to it.
  3. Change the values of the shopId and scid parameters to shopId and scid values of the demo store.
  4. 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://money.yandex.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">
Способ оплаты:<br>
<input name="paymentType" value="PC" type="radio">Payment from a Yandex.Money 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 Yandex.Checkout'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://money.yandex.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>

Making a test payment

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 Yandex.Checkout side (this depends on the payment scenario).

Step 2. Pay for the order using the test bank card or the test Yandex.Money 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.

Important. Don't dispatch the products that were purchased in the test store. To avoid mistakes, use a special URL for our notifications about testing payments (specify this URL under your Demo Store settings in your Merchant Profile).

Paying with a debit or credit card

Test bank cards

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.

Testing successful scenarios

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
Testing unsuccessful scenarios

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

Payment from a Yandex.Money wallet

You do not need a test wallet to test payments made from Yandex.Money wallets as payments in the demo store can be made without a real wallet.

Important. You need to log out of your Yandex.Money account before making a test payment from wallet.

Real payments

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

Payment form