Payment by QR code

This is another payment scenario using Yandex.Checkout. It allows the merchant to generate QR codes that link to the payment form. The QR codes can be displayed in the internet or printed on flat surfaces, such as bills and receipts. To set up payment using a QR code, the merchant must create a payment link and then generate the QR code that will link to it.

Interaction flow

  1. The merchant generates a QR code to pay for a specific order, and shows it to the user (online or offline).
  2. The user scans the QR code in any smartphone app and then sees the payment form for this order.
  3. The user pays for the order.
  4. The merchant gets a notification of payment, the same way as in the standard scenario.

Creating a payment link

Link format
https://money.yandex.ru/eshop.xml?shopId=<shopId>&scid=<scid>&sum=<sum>&orderNumber=<orderNumber>&customerNumber=<customerNumber>&custom_field=qrpayment

Parameters from the payment form for the specific merchant, order, and payer are inserted into the link. Detailed parameter descriptions

If the payment method isn't specified, the user sees all the methods that are available to this merchant.

The custom_field parameter specifies the fixed value qrpayment.

Link example
https://money.yandex.ru/eshop.xml?shopId=15203&scid=6908&sum=3.50&orderNumber=1380_2d3&customerNumber=4QRTests&paymentType=AC&custom_field=qrpayment

Generating a QR code

Address for sending the request

Yandex.Money verifies that the scid specified in the request address exists, and that the payment form works.

https://money.yandex.ru/api/showcase/<scid>/qrCode
Request format

To generate a QR code, send a POST or GET request to this address with the payment link parameters. Detailed parameter descriptions

Response format

The response returns a QR code in .svg format. You can save it and display it to the user or print it.

Reading the QR code opens a payment link with the parameters that were passed in the request.

If the scid specified in the request address doesn't exist, the payment service returns 400 Bad Request.

Request example
https://money.yandex.ru/api/showcase/6908/qrCode?scid=6908&shopId=15203&sum=1500&orderNumber=1380_2d3&paymentType=AC

See also

Payment form

General description of interaction

Processing HTTP notifications