Alfa-Click
 Specifics
 Integration scenarios
Ready-made solutions: Smart payment
Manual integration:
 Payment at the Alfa-Click website
Step 1. Create a payment  with the
alfabank
type (and, if available, user’s login in Alfa-Click) in the
payment_method_data
object, and the
redirect
type 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": "alfabank",
          "login": "79990000000"
        },
        "confirmation": {
          "type": "redirect",
          "return_url": "https://yandex.ru"
        },
        "description": "Order No. 72"
      }'
Step 2. Redirect the user to the payment confirmation page (you will receive the URL in the
confirmation_url
parameter).
Example of a created payment object
JSON
{
  "id": "22c80e01-000f-5000-a000-14ce15eb7b74",
  "status": "pending",
  "paid": false,
  "amount": {
    "value": "2.00",
    "currency": "RUB"
  },
  "confirmation": {
    "type": "redirect"
    "confirmation_url": "https://click.alfabank.ru/"
  },
  "created_at": "2019-03-20T09:22:09.367Z",
  "description": "Order No. 72",
  "metadata": {},
  "payment_method": {
    "type": "alfabank",
    "id": "22c80e01-000f-5000-a000-14ce15eb7b74",
    "saved": false,
    "login": "79990000000"
  },
  "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 without redirecting to the Alfa-Click website
Step 1. Create a payment  with the
alfabank
type in the
payment_method_data
object, and the
external
type 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": "alfabank",
          "login": "79990000000"
        },
        "confirmation": {
          "type": "external"
        },
        "description": "Order No. 72"
      }'
Example of a created payment object
JSON
{
  "id": "22c80e01-000f-5000-a000-14ce15eb7b74",
  "status": "pending",
  "paid": false,
  "amount": {
    "value": "2.00",
    "currency": "RUB"
  },
  "confirmation": {
    "type": "external"
  },
  "created_at": "2018-06-29T09:22:09.367Z",
  "description": "Order No. 72",
  "metadata": {},
  "payment_method": {
    "type": "alfabank",
    "id": "22c80e01-000f-5000-a000-14ce15eb7b74",
    "saved": false,
    "login": "79990000000"
  },
  "refundable": false,
  "test": false
}
Step 2. Inform the user that they need to confirm the payment in Alfa-Click.
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 .
 See also
Payment processDeclined paymentsPayment by 54-FZ