Payment transfer via redirect queries

If the popup window with the Yandex Pay form is blocked, the SDK switches to a redirection mode. In this mode, the Yandex Pay form opens in the current window instead of in a new one. After the user has selected the payment method, they go back to the store site.

The redirection mode is useful if the user opens the Yandex Pay form link in WebView or uses an ad blocker.

How it works

In redirection mode, a __YP__ parameter is added to the online store's URL. The parameter contains payment information.

The __YP__ parameter doesn't need additional processing, and the Yandex Pay SDK works in the same way.

Warning

Don't delete the __YP__ parameter from the online store's URL.

Work scenario

  1. The user opens the store site https://my-site.com/payment/?id=794769a6f0590ba5eba7d2c86f2aaaab.
  2. The user selects payment via Yandex Pay.
  3. The user opens the Yandex Pay payment form in the current window https://pay.yandex.ru/form/.
  4. The user clicks the "Pay" button in the Yandex Pay form.
  5. The user returns to the online store https://my-site.com/payment/?id=794769a6f0590ba5eba7d2c86f2aaaab&__YP__=<yandex-pay-data>. After the payment is created, the YaPay.PaymentEventType.Process event will be triggered on the page, and you'll receive a payment token.