YooMoney API
Sign up for YooMoney
Testing Safe deal
To test integration, you will need to use the test marketplace in YooMoney. It works just like the real one and allows making payments and payouts except the money will not be transferred anywhere.
Test mode is available right after you sign up for the Merchant Profile and fill out the onboarding application form. You can test the Safe deal feature at any time, even before entering into a contract.
In test mode, only two payment methods are available: bank cards and YooMoney wallets. Other payment methods are not available for testing. Also, when testing payments, you need to use special test data.
In the objects of transactions, payments, and payouts created for the test marketplace, the test parameter is set to true.
Example of a test deal
	"type": "safe_deal",
	"fee_moment": "payment_succeeded",
	"id": "dl-285e5ee7-0022-5000-8000-01516a44b147",
	"balance": {
		"value": "0.00",
		"currency": "RUB"
	"status": "opened",
	"created_at": "2021-06-18T07:28:39.390497Z",
	"expires_at": "2021-09-16T07:28:39.390513Z",
	"metadata": {
		"order_id": "37"
	"description": "SAFE_DEAL 123554642-2432FF344R",
	"test": true
Step 1. Create a test marketplace:
  1. Go to your Merchant Profile.
  2. Click All stores and payouts, then Add marketplace.
  3. Specify that the payments will be received by individuals, then click Continue.
  4. Add the test marketplace, specify how you’re going to accept payments, on the website or without a website, then click Add. You will see the created test marketplace.
Step 2. Set up the test marketplace:
Testing integration
Test your successful scenario, for example, create a deal, receive the payment from the customer and send the details for the receipt if necessary, then make the payout to the seller. Use special test data for payments and payouts:
StageTest data
Accepting a payment from customer
  • card number — 5555555555554477
  • expiration date — 01/30 (or other date later than the current one)
  • CVC — 123 (or any other three digits)
  • 3-D Secure authentication code — 123 (or any other three digits)
Payout to seller
Bank card: get a synonym for any bank card (real or test), and the money will not be actually transferred.
YooMoney wallet: use the test number wallets:
  • reviewed wallet  — 4100116075156746
  • identified wallet — 4100116074720387
Test your alternative and unsuccessful scenarios, for example:
  • simulate an unsuccessful payment using special test cards;
  • if you accept payments in two stages, capture a payment partially;
  • if you accept payments in two stages, cancel a payment;
  • make a partial payment refund;
  • make a full payment refund;
  • simulate a payout of a smaller than minimum amount by specifying an incorrect amount in the payment creation request and the payout creation request;
  • simulate a payout exceeding the maximum payout amount by specifying an incorrect amount;
  • if you make payouts to YooMoney wallets, simulate an unsuccessful payout to an anonymous wallet using test wallet 41001614575714.
Check how the transactions you have carried out are displayed in the Merchant Profile of the test marketplace.
Conducting real deals
Before conducting deals with real users of your marketplace, make sure that:
  • You use the ID and secret key of your real marketplace to authenticate requests.
  • If you use the YooMoney solution for 54-FZ, you have configured the settings of your online sales register for your real marketplace.
  • You have access to all features of YooMoney for Business that you’re planning to use (for example you can make autopayments). If something is working in the test marketplace but it doesn’t work in the real one, contact your YooMoney manager.
See also
Declined payments