Scenarios for receiving payments using Yandex.Checkout

There are two scenarios for using Yandex.Checkout to receive payments in mobile apps: using Yandex.Checkout payment forms, or using the API for Apps. Payment forms are easier to integrate, and they allow you to receive payments in all the ways that are available according to your agreement with Yandex.Checkout. However, you can only get data from Yandex.Money on the server or by email. The API only lets you receive payments from a user's Wallet or from bank cards, but it allows you to process payment information directly in the app.

You can combine these scenarios.

Note.
  • Yandex.Checkout is a payment service for business entities and sole proprietors. To activate it, you need to submit an activation request and sign an agreement with Yandex.Money.
  • The parameters for accepting payments are independent of the scenario.

Receiving payments using forms

This scenario is unique in its simplicity of integration and variety of payment methods. There are several steps for using Yandex.Checkout payment forms in a mobile app:

  1. Initializing WebView with POST parameters according to the payment form.
  2. Server-side processing of HTTP requests for order verification and notification of payment (if activation is performed using HTTP notifications with either HTTP Protocol or CMS Module implementation).
  3. Processing redirects from the payment information page when clicking the "Go to the store's site" button (WebView closes).
Note.

You can turn on automatically redirecting the user from the successful payment and error pages, a few seconds after payment. To find out how to turn on redirection, contact a Yandex.Checkout manager.

Tip. You can receive payments in a mobile app using WebView, or using a payment form on the site with the payment solution protocol for merchants. You can implement your own logic for transmitting payment information from the server application to the mobile app, if necessary. You get the successful payment ID in the notification of payment.
Payment process

A user initiates a payment (for example, clicks the Pay button when making an order) and is shown the page with information about the payment.

Payment from an external (arbitrary) bank card Payment from an account

After the user clicks Pay, Yandex.Money sends an order verification request to the store and sends a notification of payment (if required). The HTTP order verification request checks the validity of payment parameters, and the notification of payment informs the store of successful payment. After payment, the user sees the success or error page.

Payment completed successfully Payment failed

Receiving payments using the API for Apps

Integration using the API for Apps lets you control the payment process within the app, get the payment status from the Yandex.Money server, and store user data for future payments. You can use this scenario to receive payments in two ways: from a Yandex.Money Wallet or from an arbitrary bank card.

The integration process depends on the payment method.

In any case, you first need to register the app in a Yandex.Money Wallet (you can create a Wallet just for registration).

Payments from the Yandex.Money wallet

To make a payment this way, the user must log in on the Yandex.Money site. The user can pay from the Wallet or using bank cards that are linked to it. To complete the payment, the app must:

  1. Complete authorization on the Yandex.Money server and get an access_token.
  2. Initialize a payment using the request-payment method.
  3. Process the payment using the process-payment method and process the checkOrder and paymentAviso notifications if the store has Yandex.Checkout activated using the HTTP method.

Payments from bank cards

For this type of payment, the user doesn't need to register on the Yandex.Money site. The user can pay with any bank card. To complete the payment, the app must:

  1. Get the app instance ID.
  2. Initialize a payment using the request-external-payment method.
  3. Use the process-external-payment method to process the payment, and process the checkOrder and paymentAviso notifications if the store has Yandex.Checkout activated via the HTTP method.

The process of paying with a bank card looks the same as when paying through a payment form (see above).

Note.

The payment parameters in the request-payment and request-external-payment methods generally match the parameters in payment forms. Exceptions: You don't need to pass shopId and paymentType, but you must pass scid in pattern_id. The other parameters are passed the same way as for integration with a payment form.

Note.

If you have already activated Yandex.Checkout, you don't need to contact your manager and fill out additional paperwork. You can use the API for Apps for integration in individual cases, as described in the introduction.

SDK

You can use the libraries for programmatic implementation of the API for Apps:

All the branches have links to documentation.