Bank card
 Specifics
 Integration scenarios
Ready-made solutions:
Manual integration:
Deprecated solutions:
 Payment on Yandex.Checkout’s page
Step 1. Create a payment  with the
bank_card
type in the
payment_method_data
object, and the
redirect
type as well as the URL of a page on your side for redirecting the user (in the
return_url
parameter) in the
confirmation
object.
Example of request
cURL
PHP
Python
curl https://payment.yandex.net/api/v3/payments \
  -X POST \
  -u <Shop ID>:<Secret Key> \
  -H 'Idempotence-Key: <Idempotence Key>' \
  -H 'Content-Type: application/json' \
  -d '{
        "amount": {
          "value": "2.00",
          "currency": "RUB"
        },
        "payment_method_data": {
          "type": "bank_card"
        },
        "confirmation": {
          "type": "redirect",
          "return_url": "https://www.merchant-website.com/return_url"
        },
        "description": "Order No. 72"
      }'
Step 2. Redirect the user to the data entry page (you will receive the URL in the
confirmation_url
parameter).
Example of a created payment object
JSON
{
  "id": "22c5d173-000f-5000-9000-1bdf241d4651",
  "status": "pending",
  "paid": false,
  "amount": {
    "value": "2.00",
    "currency": "RUB"
  },
  "confirmation": {
    "type": "redirect",
    "return_url": "https://www.merchant-website.com/return_url",
    "confirmation_url": "https://money.yandex.ru/payments/external/confirmation?orderId=22c5d173-000f-5000-9000-1bdf241d4651"
  },
  "created_at": "2018-06-27T16:39:15.865Z",
  "description": "Order No. 72",
  "metadata": {},
  "payment_method": {
    "type": "bank_card",
    "id": "22c5d173-000f-5000-9000-1bdf241d4651",
    "saved": false
  },
  "recipient": {
    "account_id": "100001",
    "gateway_id": "1000001"
  },
  "refundable": false,
  "test": false
}
Step 3. Wait for the payment to be successfully completed: you will receive a notification from Yandex.Checkout, or you can send periodic requests for payment information .
 Payment with data entry on your side
To use this option, you’ll need to get a PCI DSS compliance certificate.
Step 1. Create a payment  with the
bank_card
type and the
card
object (with the bank card details) in the
payment_method_data
object, and the
redirect
type as well as the URL of a page on your side for redirecting the user (in the
return_url
parameter) in the
confirmation
object.
Example of request
cURL
PHP
Python
curl https://payment.yandex.net/api/v3/payments \
  -X POST \
  -u <Shop ID>:<Secret Key> \
  -H 'Idempotence-Key: <Idempotence Key>' \
  -H 'Content-Type: application/json' \
  -d '{
        "amount": {
          "value": "2.00",
          "currency": "RUB"
        },
        "payment_method_data": {
          "type": "bank_card",
          "card": {
            "cardholder": "MR CARDHOLDER",
            "csc": "213",
            "expiry_month": "01",
            "expiry_year": "2020",
            "number": "5469550010800081"
          }
        },
        "confirmation": {
          "type": "redirect",
          "return_url": "https://www.merchant-website.com/return_url"
        },
        "description": "Order No. 72"
      }'
Step 2. Redirect the user to the 3-D Secure authentication page (you will receive the URL in the
confirmation_url
parameter).
Example of a created payment object
JSON
{
  "id": "22c5d173-000f-5000-9000-1bdf241d4651",
  "status": "pending",
  "paid": false,
  "amount": {
    "value": "2.00",
    "currency": "RUB"
  },
  "confirmation": {
    "type": "redirect",
    "confirmation_url": "<Ссылка для прохождения 3-D Secure>"
  },
  "created_at": "2019-03-14T15:20:35.394Z",
  "description": "Order No. 72",
  "metadata": {},
  "payment_method": {
    "type": "bank_card",
    "id": "22c5d173-000f-5000-9000-1bdf241d4651",
    "saved": false
  },
  "recipient": {
    "account_id": "100001",
    "gateway_id": "1000001"
  },
  "refundable": false,
  "test": false
}
Step 3. Wait for the payment to be successfully completed: you will receive a notification from Yandex.Checkout, or you can send periodic requests for payment information .
 Managing 3-D Secure
First, arrange the conditions with the Yandex.Checkout manager.
You can disable 3-D Secure, so you won’t need to send the
confirmation
object. If you want to request the user to be authenticated via 3-D Secure, set the
redirect
type in the
confirmation
object, specify the URL of the page on your side the user will be redirected to after completing the payment (in the
return_url
parameter), and send the
enforce
parameter with the
true
value.
 See also
Payment processDeclined paymentsPayment by 54-FZTesting