Old versions of the API
Help
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.
Specifics
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.

Test mode features all the main API capabilities, even those that for the real marketplace require activation through the YooMoney manager.

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
JSON
{
  "type": "safe_deal",
  "fee_moment": "payment_succeeded",
  "id": "dl-285e5ee7-0022-5000-8000-01516a44b147",
  "balance": {
    "value": "0.00",
    "currency": "RUB"
  },
  "payout_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
}
Preparation

If you didn't enter the information about your company when signing up, you can only test regular payments and payouts as well as the partnership program. If you'd like to test the Safe deal feature, contact your YooMoney manager.

Step 1. Add the test marketplace via the YooMoney Merchant Profile and set up the required parameters. It will appear in the list of your stores and platforms within a minute after the creation. Learn more about creating a test marketplace
Step 2. Set up the test marketplace to work with payments and payouts.
Step 3. If you use the YooMoney solution for 54-FZ, enable the receipt verification mode.
Testing integration

To authenticate requests, use the ID and secret key of the test marketplace.

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