Old versions of the API
Help
Sign up for YooMoney
Smart payment
The most simple method of integration with YooMoney. You only need to redirect the user to the YooMoney page where they’ll select one of the available payment methods, enter information for the payment, and confirm the payment. To accept a payment using this method, you’ll need to create a payment and implement the Redirect confirmation scenario.
Standard payment form
Payment form with Mir Pay (on Android)
Example of a payment form
Specifics
Smart payment supports all payment methods except SberBank Business Online. The payment form displays all the payment methods available for your store.
If you process two-stage payments or if you save the payment method for autopayments, only the payment methods which support the feature you're using are displayed in the payment form. Learn more about payment methods and their features
Payment via Mir Pay will be only available for mobile devices on Android.
If a payment doesn't go through, the payment form processes unsuccessful attempts: it displays an error message to the user and prompts them to try again and select the payment method once more. Available for payments via any bank card, Mir Pay, SberPay, T-Pay, Faster Payments System, or YooMoney wallet. Contact your manager if you'd like to disable this feature and process unsuccessful attempts on your own.
Payment process
Step 1. Create a payment  with the redirect type as well as the URL of a page on your side for redirecting the user after the payment in the confirmation object. The address must be absolute (with the protocol and website domain specified). Example: https://example.com/return_url.
You don’t need to specify the payment method information in the request (payment_method_data, payment_token, payment_method_id).
Example of request
cURL
PHP
Python
curl https://api.yookassa.ru/v3/payments \
  -X POST \
  -u <Shop ID>:<Secret Key> \
  -H 'Idempotence-Key: <Idempotence Key>' \
  -H 'Content-Type: application/json' \
  -d '{
        "amount": {
          "value": "100.00",
          "currency": "RUB"
        },
        "capture": true,
        "confirmation": {
          "type": "redirect",
          "return_url": "https://www.example.com/return_url"
        },
        "description": "Order No. 1"
      }'
Step 2. Redirect the user to the confirmation_url that you received in the payment  object. This is a link to the YooMoney page where the user will select the required method and enter information for the payment.
Example of a created payment object
JSON
{
  "id": "23d93cac-000f-5000-8000-126628f15141",
  "status": "pending",
  "paid": false,
  "amount": {
    "value": "100.00",
    "currency": "RUB"
  },
  "confirmation": {
    "type": "redirect",
    "confirmation_url": "https://yoomoney.ru/api-pages/v2/payment-confirm/epl?orderId=23d93cac-000f-5000-8000-126628f15141"
  },
  "created_at": "2019-01-22T14:30:45.129Z",
  "description": "Order No. 1",
  "metadata": {},
  "recipient": {
    "account_id": "100500",
    "gateway_id": "100700"
  },
  "refundable": false,
  "test": false
}
Step 3. Wait for the payment to be successfully completed: you will receive a notification from YooMoney, or you can send periodic requests for payment information .
See also
Integration scenarios