{"templateId":"markdown","sharedDataIds":{"sidebar":"sidebar-sidebars.yaml"},"props":{"metadata":{"markdoc":{"tagList":["signatureVerifier","codeTabs","tab"]},"type":"markdown"},"seo":{"title":"Создание платежа по host2host (GATE)","description":"Документация API 1Payment — приём платежей и выплаты.","llmstxt":{"hide":false,"sections":[{"title":"Table of contents","includeFiles":["**/*"],"excludeFiles":[]}],"excludeFiles":[]}},"dynamicMarkdocComponents":[],"compilationErrors":[],"ast":{"$$mdtype":"Tag","name":"article","attributes":{},"children":[{"$$mdtype":"Tag","name":"Heading","attributes":{"level":1,"id":"создание-платежа-по-host2host-gate","__idx":0},"children":["Создание платежа по host2host (GATE)"]},{"$$mdtype":"Tag","name":"p","attributes":{},"children":["Интеграция ",{"$$mdtype":"Tag","name":"strong","attributes":{},"children":["GATE"]}," позволяет инициировать платёж ",{"$$mdtype":"Tag","name":"strong","attributes":{},"children":["банковской картой"]}," напрямую с вашего сервера: вы передаёте реквизиты карты и параметры заказа в API 1Payment. При необходимости 3-D Secure в ответе приходит ",{"$$mdtype":"Tag","name":"code","attributes":{},"children":["redirect_url"]}," для перенаправления плательщика."]},{"$$mdtype":"Tag","name":"Heading","attributes":{"level":2,"id":"принцип-работы","__idx":1},"children":["Принцип работы"]},{"$$mdtype":"Tag","name":"ol","attributes":{},"children":[{"$$mdtype":"Tag","name":"li","attributes":{},"children":[{"$$mdtype":"Tag","name":"strong","attributes":{},"children":["Запрос"]}," — ваш сервер отправляет параметры платежа и данные карты на эндпоинт ",{"$$mdtype":"Tag","name":"code","attributes":{},"children":["init_payment"]}," с ",{"$$mdtype":"Tag","name":"code","attributes":{},"children":["payment_type=card"]},"."]},{"$$mdtype":"Tag","name":"li","attributes":{},"children":[{"$$mdtype":"Tag","name":"strong","attributes":{},"children":["Ответ"]}," — система возвращает ",{"$$mdtype":"Tag","name":"code","attributes":{},"children":["order_id"]},", ",{"$$mdtype":"Tag","name":"code","attributes":{},"children":["status"]}," и при необходимости ",{"$$mdtype":"Tag","name":"code","attributes":{},"children":["redirect_url"]}," для прохождения 3-D Secure."]},{"$$mdtype":"Tag","name":"li","attributes":{},"children":[{"$$mdtype":"Tag","name":"strong","attributes":{},"children":["3-D Secure"]}," — если в ответе есть ",{"$$mdtype":"Tag","name":"code","attributes":{},"children":["redirect_url"]},", перенаправьте плательщика по этому адресу для завершения оплаты."]},{"$$mdtype":"Tag","name":"li","attributes":{},"children":[{"$$mdtype":"Tag","name":"strong","attributes":{},"children":["Уведомление (колбек)"]}," — финальный статус приходит на ваш ",{"$$mdtype":"Tag","name":"code","attributes":{},"children":["notify_url"]},"."]}]},{"$$mdtype":"Tag","name":"Heading","attributes":{"level":2,"id":"техническая-информация","__idx":2},"children":["Техническая информация"]},{"$$mdtype":"Tag","name":"div","attributes":{"className":"md-table-wrapper"},"children":[{"$$mdtype":"Tag","name":"table","attributes":{"className":"md"},"children":[{"$$mdtype":"Tag","name":"thead","attributes":{},"children":[{"$$mdtype":"Tag","name":"tr","attributes":{},"children":[{"$$mdtype":"Tag","name":"th","attributes":{"data-label":""},"children":[]},{"$$mdtype":"Tag","name":"th","attributes":{"data-label":""},"children":[]}]}]},{"$$mdtype":"Tag","name":"tbody","attributes":{},"children":[{"$$mdtype":"Tag","name":"tr","attributes":{},"children":[{"$$mdtype":"Tag","name":"td","attributes":{},"children":[{"$$mdtype":"Tag","name":"strong","attributes":{},"children":["Эндпоинт"]}]},{"$$mdtype":"Tag","name":"td","attributes":{},"children":[{"$$mdtype":"Tag","name":"code","attributes":{},"children":["https://api.1payment.com/init_payment"]}]}]},{"$$mdtype":"Tag","name":"tr","attributes":{},"children":[{"$$mdtype":"Tag","name":"td","attributes":{},"children":[{"$$mdtype":"Tag","name":"strong","attributes":{},"children":["Методы"]}]},{"$$mdtype":"Tag","name":"td","attributes":{},"children":[{"$$mdtype":"Tag","name":"code","attributes":{},"children":["GET"]},", ",{"$$mdtype":"Tag","name":"code","attributes":{},"children":["POST"]}]}]},{"$$mdtype":"Tag","name":"tr","attributes":{},"children":[{"$$mdtype":"Tag","name":"td","attributes":{},"children":[{"$$mdtype":"Tag","name":"strong","attributes":{},"children":["Формат ответа"]}]},{"$$mdtype":"Tag","name":"td","attributes":{},"children":["JSON"]}]},{"$$mdtype":"Tag","name":"tr","attributes":{},"children":[{"$$mdtype":"Tag","name":"td","attributes":{},"children":[{"$$mdtype":"Tag","name":"strong","attributes":{},"children":["Тип платежа"]}]},{"$$mdtype":"Tag","name":"td","attributes":{},"children":["В запросе обязательно ",{"$$mdtype":"Tag","name":"code","attributes":{},"children":["payment_type=card"]}]}]}]}]}]},{"$$mdtype":"Tag","name":"Heading","attributes":{"level":2,"id":"параметры-запроса","__idx":3},"children":["Параметры запроса"]},{"$$mdtype":"Tag","name":"Heading","attributes":{"level":3,"id":"обязательные","__idx":4},"children":["Обязательные"]},{"$$mdtype":"Tag","name":"div","attributes":{"className":"md-table-wrapper"},"children":[{"$$mdtype":"Tag","name":"table","attributes":{"className":"md"},"children":[{"$$mdtype":"Tag","name":"thead","attributes":{},"children":[{"$$mdtype":"Tag","name":"tr","attributes":{},"children":[{"$$mdtype":"Tag","name":"th","attributes":{"data-label":"Параметр"},"children":["Параметр"]},{"$$mdtype":"Tag","name":"th","attributes":{"data-label":"Тип"},"children":["Тип"]},{"$$mdtype":"Tag","name":"th","attributes":{"data-label":"Описание"},"children":["Описание"]}]}]},{"$$mdtype":"Tag","name":"tbody","attributes":{},"children":[{"$$mdtype":"Tag","name":"tr","attributes":{},"children":[{"$$mdtype":"Tag","name":"td","attributes":{},"children":[{"$$mdtype":"Tag","name":"code","attributes":{},"children":["partner_id"]}]},{"$$mdtype":"Tag","name":"td","attributes":{},"children":["Integer"]},{"$$mdtype":"Tag","name":"td","attributes":{},"children":["Ваш уникальный ID в системе 1Payment."]}]},{"$$mdtype":"Tag","name":"tr","attributes":{},"children":[{"$$mdtype":"Tag","name":"td","attributes":{},"children":[{"$$mdtype":"Tag","name":"code","attributes":{},"children":["payment_type"]}]},{"$$mdtype":"Tag","name":"td","attributes":{},"children":["String"]},{"$$mdtype":"Tag","name":"td","attributes":{},"children":["Всегда значение ",{"$$mdtype":"Tag","name":"code","attributes":{},"children":["card"]},"."]}]},{"$$mdtype":"Tag","name":"tr","attributes":{},"children":[{"$$mdtype":"Tag","name":"td","attributes":{},"children":[{"$$mdtype":"Tag","name":"code","attributes":{},"children":["project_id"]}]},{"$$mdtype":"Tag","name":"td","attributes":{},"children":["Integer"]},{"$$mdtype":"Tag","name":"td","attributes":{},"children":["Идентификатор вашего проекта."]}]},{"$$mdtype":"Tag","name":"tr","attributes":{},"children":[{"$$mdtype":"Tag","name":"td","attributes":{},"children":[{"$$mdtype":"Tag","name":"code","attributes":{},"children":["account"]}]},{"$$mdtype":"Tag","name":"td","attributes":{},"children":["String"]},{"$$mdtype":"Tag","name":"td","attributes":{},"children":["Номер банковской карты."]}]},{"$$mdtype":"Tag","name":"tr","attributes":{},"children":[{"$$mdtype":"Tag","name":"td","attributes":{},"children":[{"$$mdtype":"Tag","name":"code","attributes":{},"children":["card_holder"]}]},{"$$mdtype":"Tag","name":"td","attributes":{},"children":["String"]},{"$$mdtype":"Tag","name":"td","attributes":{},"children":["Имя держателя карты (как указано на карте)."]}]},{"$$mdtype":"Tag","name":"tr","attributes":{},"children":[{"$$mdtype":"Tag","name":"td","attributes":{},"children":[{"$$mdtype":"Tag","name":"code","attributes":{},"children":["year"]}]},{"$$mdtype":"Tag","name":"td","attributes":{},"children":["String"]},{"$$mdtype":"Tag","name":"td","attributes":{},"children":["Год окончания действия карты, две последние цифры (например, ",{"$$mdtype":"Tag","name":"code","attributes":{},"children":["22"]},")."]}]},{"$$mdtype":"Tag","name":"tr","attributes":{},"children":[{"$$mdtype":"Tag","name":"td","attributes":{},"children":[{"$$mdtype":"Tag","name":"code","attributes":{},"children":["month"]}]},{"$$mdtype":"Tag","name":"td","attributes":{},"children":["String"]},{"$$mdtype":"Tag","name":"td","attributes":{},"children":["Месяц окончания действия карты (например, ",{"$$mdtype":"Tag","name":"code","attributes":{},"children":["01"]},")."]}]},{"$$mdtype":"Tag","name":"tr","attributes":{},"children":[{"$$mdtype":"Tag","name":"td","attributes":{},"children":[{"$$mdtype":"Tag","name":"code","attributes":{},"children":["cvc"]}]},{"$$mdtype":"Tag","name":"td","attributes":{},"children":["String"]},{"$$mdtype":"Tag","name":"td","attributes":{},"children":["CVV/CVC код карты."]}]},{"$$mdtype":"Tag","name":"tr","attributes":{},"children":[{"$$mdtype":"Tag","name":"td","attributes":{},"children":[{"$$mdtype":"Tag","name":"code","attributes":{},"children":["amount"]}]},{"$$mdtype":"Tag","name":"td","attributes":{},"children":["Number"]},{"$$mdtype":"Tag","name":"td","attributes":{},"children":["Сумма платежа в валюте проекта (например, ",{"$$mdtype":"Tag","name":"code","attributes":{},"children":["50.00"]},")."]}]},{"$$mdtype":"Tag","name":"tr","attributes":{},"children":[{"$$mdtype":"Tag","name":"td","attributes":{},"children":[{"$$mdtype":"Tag","name":"code","attributes":{},"children":["user_data"]}]},{"$$mdtype":"Tag","name":"td","attributes":{},"children":["String"]},{"$$mdtype":"Tag","name":"td","attributes":{},"children":["Ваш внутренний ID заказа (вернётся в колбеке)."]}]},{"$$mdtype":"Tag","name":"tr","attributes":{},"children":[{"$$mdtype":"Tag","name":"td","attributes":{},"children":[{"$$mdtype":"Tag","name":"code","attributes":{},"children":["shop_url"]}]},{"$$mdtype":"Tag","name":"td","attributes":{},"children":["String"]},{"$$mdtype":"Tag","name":"td","attributes":{},"children":["URL сайта источника платежа."]}]},{"$$mdtype":"Tag","name":"tr","attributes":{},"children":[{"$$mdtype":"Tag","name":"td","attributes":{},"children":[{"$$mdtype":"Tag","name":"code","attributes":{},"children":["sign"]}]},{"$$mdtype":"Tag","name":"td","attributes":{},"children":["String"]},{"$$mdtype":"Tag","name":"td","attributes":{},"children":["Контрольная подпись запроса (см. раздел «Подпись»)."]}]}]}]}]},{"$$mdtype":"Tag","name":"Heading","attributes":{"level":3,"id":"дополнительные","__idx":5},"children":["Дополнительные"]},{"$$mdtype":"Tag","name":"div","attributes":{"className":"md-table-wrapper"},"children":[{"$$mdtype":"Tag","name":"table","attributes":{"className":"md"},"children":[{"$$mdtype":"Tag","name":"thead","attributes":{},"children":[{"$$mdtype":"Tag","name":"tr","attributes":{},"children":[{"$$mdtype":"Tag","name":"th","attributes":{"data-label":"Параметр"},"children":["Параметр"]},{"$$mdtype":"Tag","name":"th","attributes":{"data-label":"Тип"},"children":["Тип"]},{"$$mdtype":"Tag","name":"th","attributes":{"data-label":"Описание"},"children":["Описание"]}]}]},{"$$mdtype":"Tag","name":"tbody","attributes":{},"children":[{"$$mdtype":"Tag","name":"tr","attributes":{},"children":[{"$$mdtype":"Tag","name":"td","attributes":{},"children":[{"$$mdtype":"Tag","name":"code","attributes":{},"children":["description"]}]},{"$$mdtype":"Tag","name":"td","attributes":{},"children":["String"]},{"$$mdtype":"Tag","name":"td","attributes":{},"children":["Описание платежа."]}]},{"$$mdtype":"Tag","name":"tr","attributes":{},"children":[{"$$mdtype":"Tag","name":"td","attributes":{},"children":[{"$$mdtype":"Tag","name":"code","attributes":{},"children":["subscription"]}]},{"$$mdtype":"Tag","name":"td","attributes":{},"children":["Integer"]},{"$$mdtype":"Tag","name":"td","attributes":{},"children":["Только для ",{"$$mdtype":"Tag","name":"MarkdownLink","attributes":{"href":"/pages/card/recurring"},"children":["подписочных платежей"]},": передайте ",{"$$mdtype":"Tag","name":"code","attributes":{},"children":["1"]},", чтобы получить ",{"$$mdtype":"Tag","name":"code","attributes":{},"children":["token"]}," для рекуррентных списаний."]}]},{"$$mdtype":"Tag","name":"tr","attributes":{},"children":[{"$$mdtype":"Tag","name":"td","attributes":{},"children":[{"$$mdtype":"Tag","name":"code","attributes":{},"children":["token"]}]},{"$$mdtype":"Tag","name":"td","attributes":{},"children":["String"]},{"$$mdtype":"Tag","name":"td","attributes":{},"children":["ID токена привязанной подписки."]}]},{"$$mdtype":"Tag","name":"tr","attributes":{},"children":[{"$$mdtype":"Tag","name":"td","attributes":{},"children":[{"$$mdtype":"Tag","name":"code","attributes":{},"children":["ip"]}]},{"$$mdtype":"Tag","name":"td","attributes":{},"children":["String"]},{"$$mdtype":"Tag","name":"td","attributes":{},"children":["IP-адрес плательщика."]}]},{"$$mdtype":"Tag","name":"tr","attributes":{},"children":[{"$$mdtype":"Tag","name":"td","attributes":{},"children":[{"$$mdtype":"Tag","name":"code","attributes":{},"children":["destination"]}]},{"$$mdtype":"Tag","name":"td","attributes":{},"children":["String"]},{"$$mdtype":"Tag","name":"td","attributes":{},"children":["Номер карты для пополнения (опционально, для P2P-сценариев)."]}]},{"$$mdtype":"Tag","name":"tr","attributes":{},"children":[{"$$mdtype":"Tag","name":"td","attributes":{},"children":[{"$$mdtype":"Tag","name":"code","attributes":{},"children":["return_url"]}]},{"$$mdtype":"Tag","name":"td","attributes":{},"children":["String"]},{"$$mdtype":"Tag","name":"td","attributes":{},"children":["URL, куда вернуть плательщика после оплаты в банке."]}]},{"$$mdtype":"Tag","name":"tr","attributes":{},"children":[{"$$mdtype":"Tag","name":"td","attributes":{},"children":[{"$$mdtype":"Tag","name":"code","attributes":{},"children":["user_id"]}]},{"$$mdtype":"Tag","name":"td","attributes":{},"children":["String"]},{"$$mdtype":"Tag","name":"td","attributes":{},"children":["ID плательщика в вашей системе."]}]}]}]}]},{"$$mdtype":"Tag","name":"Heading","attributes":{"level":3,"id":"параметры-3-d-secure-2x","__idx":6},"children":["Параметры 3-D Secure 2.x"]},{"$$mdtype":"Tag","name":"p","attributes":{},"children":["Передаются для прохождения 3-D Secure версии 2.x."]},{"$$mdtype":"Tag","name":"div","attributes":{"className":"md-table-wrapper"},"children":[{"$$mdtype":"Tag","name":"table","attributes":{"className":"md"},"children":[{"$$mdtype":"Tag","name":"thead","attributes":{},"children":[{"$$mdtype":"Tag","name":"tr","attributes":{},"children":[{"$$mdtype":"Tag","name":"th","attributes":{"data-label":"Параметр"},"children":["Параметр"]},{"$$mdtype":"Tag","name":"th","attributes":{"data-label":"Тип"},"children":["Тип"]},{"$$mdtype":"Tag","name":"th","attributes":{"data-label":"Описание"},"children":["Описание"]}]}]},{"$$mdtype":"Tag","name":"tbody","attributes":{},"children":[{"$$mdtype":"Tag","name":"tr","attributes":{},"children":[{"$$mdtype":"Tag","name":"td","attributes":{},"children":[{"$$mdtype":"Tag","name":"code","attributes":{},"children":["ext_notification_url"]}]},{"$$mdtype":"Tag","name":"td","attributes":{},"children":["String"]},{"$$mdtype":"Tag","name":"td","attributes":{},"children":["Адрес возврата плательщика после 3DS (",{"$$mdtype":"Tag","name":"code","attributes":{},"children":["TermUrl"]},")."]}]},{"$$mdtype":"Tag","name":"tr","attributes":{},"children":[{"$$mdtype":"Tag","name":"td","attributes":{},"children":[{"$$mdtype":"Tag","name":"code","attributes":{},"children":["ext_browser_accept_header"]}]},{"$$mdtype":"Tag","name":"td","attributes":{},"children":["String"]},{"$$mdtype":"Tag","name":"td","attributes":{},"children":["Содержимое HTTP-заголовка ",{"$$mdtype":"Tag","name":"code","attributes":{},"children":["Accept"]}," (макс. 2048 символов)."]}]},{"$$mdtype":"Tag","name":"tr","attributes":{},"children":[{"$$mdtype":"Tag","name":"td","attributes":{},"children":[{"$$mdtype":"Tag","name":"code","attributes":{},"children":["ext_browser_color_depth"]}]},{"$$mdtype":"Tag","name":"td","attributes":{},"children":["String"]},{"$$mdtype":"Tag","name":"td","attributes":{},"children":["Битовая глубина цветовой палитры браузера."]}]},{"$$mdtype":"Tag","name":"tr","attributes":{},"children":[{"$$mdtype":"Tag","name":"td","attributes":{},"children":[{"$$mdtype":"Tag","name":"code","attributes":{},"children":["ext_browser_ip"]}]},{"$$mdtype":"Tag","name":"td","attributes":{},"children":["String"]},{"$$mdtype":"Tag","name":"td","attributes":{},"children":["IP-адрес браузера плательщика."]}]},{"$$mdtype":"Tag","name":"tr","attributes":{},"children":[{"$$mdtype":"Tag","name":"td","attributes":{},"children":[{"$$mdtype":"Tag","name":"code","attributes":{},"children":["ext_browser_language"]}]},{"$$mdtype":"Tag","name":"td","attributes":{},"children":["String"]},{"$$mdtype":"Tag","name":"td","attributes":{},"children":["Язык браузера, IETF BCP47 (макс. 8 символов)."]}]},{"$$mdtype":"Tag","name":"tr","attributes":{},"children":[{"$$mdtype":"Tag","name":"td","attributes":{},"children":[{"$$mdtype":"Tag","name":"code","attributes":{},"children":["ext_browser_screen_height"]}]},{"$$mdtype":"Tag","name":"td","attributes":{},"children":["String"]},{"$$mdtype":"Tag","name":"td","attributes":{},"children":["Высота экрана браузера, ",{"$$mdtype":"Tag","name":"code","attributes":{},"children":["window.screen.height"]}," (макс. 6 символов)."]}]},{"$$mdtype":"Tag","name":"tr","attributes":{},"children":[{"$$mdtype":"Tag","name":"td","attributes":{},"children":[{"$$mdtype":"Tag","name":"code","attributes":{},"children":["ext_browser_screen_width"]}]},{"$$mdtype":"Tag","name":"td","attributes":{},"children":["String"]},{"$$mdtype":"Tag","name":"td","attributes":{},"children":["Ширина экрана браузера, ",{"$$mdtype":"Tag","name":"code","attributes":{},"children":["window.screen.width"]}," (макс. 6 символов)."]}]},{"$$mdtype":"Tag","name":"tr","attributes":{},"children":[{"$$mdtype":"Tag","name":"td","attributes":{},"children":[{"$$mdtype":"Tag","name":"code","attributes":{},"children":["ext_browser_tz"]}]},{"$$mdtype":"Tag","name":"td","attributes":{},"children":["String"]},{"$$mdtype":"Tag","name":"td","attributes":{},"children":["Смещение локального времени от UTC в минутах (макс. 5 символов)."]}]},{"$$mdtype":"Tag","name":"tr","attributes":{},"children":[{"$$mdtype":"Tag","name":"td","attributes":{},"children":[{"$$mdtype":"Tag","name":"code","attributes":{},"children":["ext_browser_user_agent"]}]},{"$$mdtype":"Tag","name":"td","attributes":{},"children":["String"]},{"$$mdtype":"Tag","name":"td","attributes":{},"children":["Содержимое HTTP-заголовка ",{"$$mdtype":"Tag","name":"code","attributes":{},"children":["User-Agent"]}," (макс. 2048 символов)."]}]},{"$$mdtype":"Tag","name":"tr","attributes":{},"children":[{"$$mdtype":"Tag","name":"td","attributes":{},"children":[{"$$mdtype":"Tag","name":"code","attributes":{},"children":["ext_browser_java_enabled"]}]},{"$$mdtype":"Tag","name":"td","attributes":{},"children":["String"]},{"$$mdtype":"Tag","name":"td","attributes":{},"children":["Включён ли JavaScript: ",{"$$mdtype":"Tag","name":"code","attributes":{},"children":["true"]}," или ",{"$$mdtype":"Tag","name":"code","attributes":{},"children":["false"]},"."]}]},{"$$mdtype":"Tag","name":"tr","attributes":{},"children":[{"$$mdtype":"Tag","name":"td","attributes":{},"children":[{"$$mdtype":"Tag","name":"code","attributes":{},"children":["ext_window_width"]}]},{"$$mdtype":"Tag","name":"td","attributes":{},"children":["String"]},{"$$mdtype":"Tag","name":"td","attributes":{},"children":["Ширина окна браузера, ",{"$$mdtype":"Tag","name":"code","attributes":{},"children":["window.innerWidth"]}," (в пикселях)."]}]},{"$$mdtype":"Tag","name":"tr","attributes":{},"children":[{"$$mdtype":"Tag","name":"td","attributes":{},"children":[{"$$mdtype":"Tag","name":"code","attributes":{},"children":["ext_window_height"]}]},{"$$mdtype":"Tag","name":"td","attributes":{},"children":["String"]},{"$$mdtype":"Tag","name":"td","attributes":{},"children":["Высота окна браузера, ",{"$$mdtype":"Tag","name":"code","attributes":{},"children":["window.innerHeight"]}," (в пикселях)."]}]}]}]}]},{"$$mdtype":"Tag","name":"Heading","attributes":{"level":2,"id":"формирование-подписи--sign-","__idx":7},"children":["Формирование подписи (",{"$$mdtype":"Tag","name":"code","attributes":{},"children":["sign"]},")"]},{"$$mdtype":"Tag","name":"p","attributes":{},"children":["Подпись: MD5, lowercase (hex). Общие правила — ",{"$$mdtype":"Tag","name":"MarkdownLink","attributes":{"href":"/pages/init-request#%D0%BF%D0%BE%D0%B4%D0%BF%D0%B8%D1%81%D1%8C-%D0%B7%D0%B0%D0%BF%D1%80%D0%BE%D1%81%D0%B0-sign"},"children":["Формат запроса к API"]},"."]},{"$$mdtype":"Tag","name":"p","attributes":{},"children":[{"$$mdtype":"Tag","name":"strong","attributes":{},"children":["Формула:"]}]},{"$$mdtype":"Tag","name":"CodeBlock","attributes":{"data-language":"text","header":{"controls":{"copy":{}}},"source":"MD5(init_payment + <параметры_без_sign_в_алфавитном_порядке_через_&> + <API_KEY>)\n","lang":"text"},"children":[]},{"$$mdtype":"Tag","name":"p","attributes":{},"children":[{"$$mdtype":"Tag","name":"strong","attributes":{},"children":["Пример строки до хеширования:"]}]},{"$$mdtype":"Tag","name":"CodeBlock","attributes":{"data-language":"text","header":{"controls":{"copy":{}}},"source":"init_paymentaccount=4111111111111111&amount=50&card_holder=TEST&cvc=111&description=test_payment&month=01&partner_id=1234&payment_type=card&project_id=5678&year=22secret_key\n","lang":"text"},"children":[]},{"$$mdtype":"Tag","name":"Heading","attributes":{"level":3,"id":"проверка-подписи-в-документации","__idx":8},"children":["Проверка подписи в документации"]},{"$$mdtype":"Tag","name":"SignatureVerifier","attributes":{"method":"init_payment","preset":"card_init_payment"},"children":[]},{"$$mdtype":"Tag","name":"Heading","attributes":{"level":2,"id":"примеры-запроса","__idx":9},"children":["Примеры запроса"]},{"$$mdtype":"Tag","name":"CodeTabs","attributes":{},"children":[{"$$mdtype":"Tag","name":"Tab","attributes":{"label":"Node.js"},"children":[{"$$mdtype":"Tag","name":"CodeBlock","attributes":{"data-language":"javascript","header":{"controls":{"copy":{}}},"source":"const crypto = require('crypto');\nconst axios = require('axios');\n\nasync function createCardPayment(apiKey, params) {\n  // 1. Сортируем параметры по алфавиту\n  const sortedKeys = Object.keys(params).sort();\n  const queryString = sortedKeys.map((key) => `${key}=${params[key]}`).join('&');\n\n  // 2. Генерируем подпись с префиксом init_payment\n  const baseString = `init_payment${queryString}${apiKey}`;\n  params.sign = crypto.createHash('md5').update(baseString).digest('hex');\n\n  // 3. Отправляем POST-запрос\n  try {\n    const response = await axios.post('https://api.1payment.com/init_payment', params);\n    return response.data;\n  } catch (error) {\n    console.error('Ошибка:', error.message);\n  }\n}\n\n// Пример данных запроса\nconst mockApiKey = process.env.ONEPAYMENT_API_KEY;\nconst mockData = {\n  partner_id: 1234,\n  payment_type: 'card',\n  project_id: 5678,\n  account: '4111111111111111',\n  card_holder: 'TEST',\n  year: '22',\n  month: '01',\n  cvc: '111',\n  amount: '50.00',\n  user_data: 'order_777',\n  shop_url: 'https://test.com',\n  description: 'test_payment',\n};\n\ncreateCardPayment(mockApiKey, mockData).then(console.log);\n","lang":"javascript"},"children":[]}]},{"$$mdtype":"Tag","name":"Tab","attributes":{"label":"Python"},"children":[{"$$mdtype":"Tag","name":"CodeBlock","attributes":{"data-language":"python","header":{"controls":{"copy":{}}},"source":"import hashlib\nimport os\nimport requests\n\ndef create_card_payment(api_key: str, params: dict) -> dict:\n    # 1. Сортировка параметров по алфавиту\n    sorted_keys = sorted(params.keys())\n    query_string = \"&\".join(f\"{k}={params[k]}\" for k in sorted_keys)\n\n    # 2. Формирование подписи (префикс init_payment)\n    base_string = f\"init_payment{query_string}{api_key}\"\n    params[\"sign\"] = hashlib.md5(base_string.encode(\"utf-8\")).hexdigest()\n\n    # 3. Запрос к API\n    response = requests.post(\"https://api.1payment.com/init_payment\", data=params)\n    response.raise_for_status()\n    return response.json()\n\n# Пример данных запроса\napi_key = os.environ[\"ONEPAYMENT_API_KEY\"]\ndata = {\n    \"partner_id\": 1234,\n    \"payment_type\": \"card\",\n    \"project_id\": 5678,\n    \"account\": \"4111111111111111\",\n    \"card_holder\": \"TEST\",\n    \"year\": \"22\",\n    \"month\": \"01\",\n    \"cvc\": \"111\",\n    \"amount\": \"50.00\",\n    \"user_data\": \"order_777\",\n    \"shop_url\": \"https://test.com\",\n    \"description\": \"test_payment\",\n}\n\nprint(create_card_payment(api_key, data))\n","lang":"python"},"children":[]}]},{"$$mdtype":"Tag","name":"Tab","attributes":{"label":"PHP"},"children":[{"$$mdtype":"Tag","name":"CodeBlock","attributes":{"data-language":"php","header":{"controls":{"copy":{}}},"source":"<?php\n\nfunction createCardPayment(string $apiKey, array $params): string\n{\n    // 1. Сортировка параметров по алфавиту\n    ksort($params, SORT_LOCALE_STRING);\n    $tail = '';\n    foreach ($params as $k => $v) {\n        if ($k === 'sign') {\n            continue;\n        }\n        $tail .= \"{$k}={$v}&\";\n    }\n    $tail = substr($tail, 0, -1);\n\n    // 2. Формирование подписи (префикс init_payment)\n    $params['sign'] = md5('init_payment' . $tail . $apiKey);\n\n    // 3. Запрос к API\n    $ch = curl_init('https://api.1payment.com/init_payment');\n    curl_setopt($ch, CURLOPT_POST, true);\n    curl_setopt($ch, CURLOPT_POSTFIELDS, http_build_query($params));\n    curl_setopt($ch, CURLOPT_RETURNTRANSFER, true);\n    $response = curl_exec($ch);\n    curl_close($ch);\n\n    return $response;\n}\n\n// Пример данных запроса\n$apiKey = getenv('ONEPAYMENT_API_KEY');\n$data = [\n    'partner_id' => 1234,\n    'payment_type' => 'card',\n    'project_id' => 5678,\n    'account' => '4111111111111111',\n    'card_holder' => 'TEST',\n    'year' => '22',\n    'month' => '01',\n    'cvc' => '111',\n    'amount' => '50.00',\n    'user_data' => 'order_777',\n    'shop_url' => 'https://test.com',\n    'description' => 'test_payment',\n];\n\necho createCardPayment($apiKey, $data);\n","lang":"php"},"children":[]}]},{"$$mdtype":"Tag","name":"Tab","attributes":{"label":"cURL"},"children":[{"$$mdtype":"Tag","name":"CodeBlock","attributes":{"data-language":"bash","header":{"controls":{"copy":{}}},"source":"# 1–2. Подпись: md5(\"init_payment\" + account=4111111111111111&amount=50&card_holder=TEST&cvc=111&description=test_payment&month=01&partner_id=1234&payment_type=card&project_id=5678&year=22 + API_KEY)\n\ncurl -sS -X POST \"https://api.1payment.com/init_payment\" \\\n  -d \"partner_id=1234&payment_type=card&project_id=5678&account=4111111111111111&card_holder=TEST&year=22&month=01&cvc=111&amount=50&description=test_payment&sign=PASTE_MD5_HEX\"\n","lang":"bash"},"children":[]}]}]},{"$$mdtype":"Tag","name":"Heading","attributes":{"level":2,"id":"ответ-api","__idx":10},"children":["Ответ API"]},{"$$mdtype":"Tag","name":"p","attributes":{},"children":["Успешный ответ (",{"$$mdtype":"Tag","name":"code","attributes":{},"children":["200"]},"):"]},{"$$mdtype":"Tag","name":"CodeBlock","attributes":{"data-language":"json","header":{"controls":{"copy":{}}},"source":"{\n  \"order_id\": \"8p3brmb19gfg0sg8gcwhws8kgc748s87\",\n  \"status\": 2,\n  \"status_description\": \"PENDING\",\n  \"status_code\": 0,\n  \"redirect_url\": \"https://testsite.com\"\n}\n","lang":"json"},"children":[]},{"$$mdtype":"Tag","name":"div","attributes":{"className":"md-table-wrapper"},"children":[{"$$mdtype":"Tag","name":"table","attributes":{"className":"md"},"children":[{"$$mdtype":"Tag","name":"thead","attributes":{},"children":[{"$$mdtype":"Tag","name":"tr","attributes":{},"children":[{"$$mdtype":"Tag","name":"th","attributes":{"data-label":"Поле"},"children":["Поле"]},{"$$mdtype":"Tag","name":"th","attributes":{"data-label":"Описание"},"children":["Описание"]}]}]},{"$$mdtype":"Tag","name":"tbody","attributes":{},"children":[{"$$mdtype":"Tag","name":"tr","attributes":{},"children":[{"$$mdtype":"Tag","name":"td","attributes":{},"children":[{"$$mdtype":"Tag","name":"code","attributes":{},"children":["order_id"]}]},{"$$mdtype":"Tag","name":"td","attributes":{},"children":["ID платежа в системе 1Payment; используйте для ",{"$$mdtype":"Tag","name":"MarkdownLink","attributes":{"href":"/pages/card/status"},"children":["запроса статуса"]},"."]}]},{"$$mdtype":"Tag","name":"tr","attributes":{},"children":[{"$$mdtype":"Tag","name":"td","attributes":{},"children":[{"$$mdtype":"Tag","name":"code","attributes":{},"children":["status"]}]},{"$$mdtype":"Tag","name":"td","attributes":{},"children":["Числовой код состояния (",{"$$mdtype":"Tag","name":"code","attributes":{},"children":["2"]}," — ожидание)."]}]},{"$$mdtype":"Tag","name":"tr","attributes":{},"children":[{"$$mdtype":"Tag","name":"td","attributes":{},"children":[{"$$mdtype":"Tag","name":"code","attributes":{},"children":["status_description"]}]},{"$$mdtype":"Tag","name":"td","attributes":{},"children":["Текстовое описание статуса (",{"$$mdtype":"Tag","name":"code","attributes":{},"children":["PENDING"]}," и др.)."]}]},{"$$mdtype":"Tag","name":"tr","attributes":{},"children":[{"$$mdtype":"Tag","name":"td","attributes":{},"children":[{"$$mdtype":"Tag","name":"code","attributes":{},"children":["status_code"]}]},{"$$mdtype":"Tag","name":"td","attributes":{},"children":["Код ошибки при отказе (см. ",{"$$mdtype":"Tag","name":"MarkdownLink","attributes":{"href":"/pages/decline-error-codes"},"children":["коды отказов"]},")."]}]},{"$$mdtype":"Tag","name":"tr","attributes":{},"children":[{"$$mdtype":"Tag","name":"td","attributes":{},"children":[{"$$mdtype":"Tag","name":"code","attributes":{},"children":["redirect_url"]}]},{"$$mdtype":"Tag","name":"td","attributes":{},"children":["URL для перенаправления плательщика при прохождении 3-D Secure (может отсутствовать)."]}]}]}]}]},{"$$mdtype":"Tag","name":"p","attributes":{},"children":["Если в ответе присутствует ",{"$$mdtype":"Tag","name":"code","attributes":{},"children":["redirect_url"]},", перенаправьте плательщика по этому адресу для завершения оплаты."]},{"$$mdtype":"Tag","name":"p","attributes":{},"children":["Ошибка запроса (",{"$$mdtype":"Tag","name":"code","attributes":{},"children":["400"]},"):"]},{"$$mdtype":"Tag","name":"CodeBlock","attributes":{"data-language":"json","header":{"controls":{"copy":{}}},"source":"{\n  \"error_code\": 2\n}\n","lang":"json"},"children":[]},{"$$mdtype":"Tag","name":"Heading","attributes":{"level":2,"id":"тестирование","__idx":11},"children":["Тестирование"]},{"$$mdtype":"Tag","name":"p","attributes":{},"children":["Для тестирования платежей по картам можно использовать следующие данные:"]},{"$$mdtype":"Tag","name":"div","attributes":{"className":"md-table-wrapper"},"children":[{"$$mdtype":"Tag","name":"table","attributes":{"className":"md"},"children":[{"$$mdtype":"Tag","name":"thead","attributes":{},"children":[{"$$mdtype":"Tag","name":"tr","attributes":{},"children":[{"$$mdtype":"Tag","name":"th","attributes":{"data-label":"Результат"},"children":["Результат"]},{"$$mdtype":"Tag","name":"th","attributes":{"data-label":"Номер карты"},"children":["Номер карты"]},{"$$mdtype":"Tag","name":"th","attributes":{"data-label":"CARDHOLDER"},"children":["CARDHOLDER"]},{"$$mdtype":"Tag","name":"th","attributes":{"data-label":"EXP"},"children":["EXP"]},{"$$mdtype":"Tag","name":"th","attributes":{"data-label":"CVC"},"children":["CVC"]}]}]},{"$$mdtype":"Tag","name":"tbody","attributes":{},"children":[{"$$mdtype":"Tag","name":"tr","attributes":{},"children":[{"$$mdtype":"Tag","name":"td","attributes":{},"children":["Успешная оплата"]},{"$$mdtype":"Tag","name":"td","attributes":{},"children":[{"$$mdtype":"Tag","name":"code","attributes":{},"children":["4111111111111111"]}]},{"$$mdtype":"Tag","name":"td","attributes":{},"children":[{"$$mdtype":"Tag","name":"code","attributes":{},"children":["TEST"]}]},{"$$mdtype":"Tag","name":"td","attributes":{},"children":[{"$$mdtype":"Tag","name":"code","attributes":{},"children":["01/01"]}]},{"$$mdtype":"Tag","name":"td","attributes":{},"children":[{"$$mdtype":"Tag","name":"code","attributes":{},"children":["123"]}]}]},{"$$mdtype":"Tag","name":"tr","attributes":{},"children":[{"$$mdtype":"Tag","name":"td","attributes":{},"children":["Неуспешная оплата"]},{"$$mdtype":"Tag","name":"td","attributes":{},"children":[{"$$mdtype":"Tag","name":"code","attributes":{},"children":["4111111111111112"]}]},{"$$mdtype":"Tag","name":"td","attributes":{},"children":[{"$$mdtype":"Tag","name":"code","attributes":{},"children":["TEST"]}]},{"$$mdtype":"Tag","name":"td","attributes":{},"children":[{"$$mdtype":"Tag","name":"code","attributes":{},"children":["01/01"]}]},{"$$mdtype":"Tag","name":"td","attributes":{},"children":[{"$$mdtype":"Tag","name":"code","attributes":{},"children":["123"]}]}]}]}]}]},{"$$mdtype":"Tag","name":"Heading","attributes":{"level":2,"id":"уведомления-о-статусе-колбеки","__idx":12},"children":["Уведомления о статусе (колбеки)"]},{"$$mdtype":"Tag","name":"p","attributes":{},"children":["После изменения статуса на ваш ",{"$$mdtype":"Tag","name":"code","attributes":{},"children":["notify_url"]}," будет отправлено ",{"$$mdtype":"Tag","name":"strong","attributes":{},"children":["POST"]},"-уведомление в формате JSON."]},{"$$mdtype":"Tag","name":"div","attributes":{"className":"md-table-wrapper"},"children":[{"$$mdtype":"Tag","name":"table","attributes":{"className":"md"},"children":[{"$$mdtype":"Tag","name":"thead","attributes":{},"children":[{"$$mdtype":"Tag","name":"tr","attributes":{},"children":[{"$$mdtype":"Tag","name":"th","attributes":{"data-label":"Параметр"},"children":["Параметр"]},{"$$mdtype":"Tag","name":"th","attributes":{"data-label":"Тип"},"children":["Тип"]},{"$$mdtype":"Tag","name":"th","attributes":{"data-label":"Обяз."},"children":["Обяз."]},{"$$mdtype":"Tag","name":"th","attributes":{"data-label":"Описание"},"children":["Описание"]}]}]},{"$$mdtype":"Tag","name":"tbody","attributes":{},"children":[{"$$mdtype":"Tag","name":"tr","attributes":{},"children":[{"$$mdtype":"Tag","name":"td","attributes":{},"children":[{"$$mdtype":"Tag","name":"code","attributes":{},"children":["payment_type"]}]},{"$$mdtype":"Tag","name":"td","attributes":{},"children":["String"]},{"$$mdtype":"Tag","name":"td","attributes":{},"children":["Да"]},{"$$mdtype":"Tag","name":"td","attributes":{},"children":["Тип платежа (",{"$$mdtype":"Tag","name":"code","attributes":{},"children":["card"]},")."]}]},{"$$mdtype":"Tag","name":"tr","attributes":{},"children":[{"$$mdtype":"Tag","name":"td","attributes":{},"children":[{"$$mdtype":"Tag","name":"code","attributes":{},"children":["order_id"]}]},{"$$mdtype":"Tag","name":"td","attributes":{},"children":["String"]},{"$$mdtype":"Tag","name":"td","attributes":{},"children":["Да"]},{"$$mdtype":"Tag","name":"td","attributes":{},"children":["ID платежа в системе 1Payment."]}]},{"$$mdtype":"Tag","name":"tr","attributes":{},"children":[{"$$mdtype":"Tag","name":"td","attributes":{},"children":[{"$$mdtype":"Tag","name":"code","attributes":{},"children":["project_id"]}]},{"$$mdtype":"Tag","name":"td","attributes":{},"children":["Integer"]},{"$$mdtype":"Tag","name":"td","attributes":{},"children":["Да"]},{"$$mdtype":"Tag","name":"td","attributes":{},"children":["ID вашего проекта."]}]},{"$$mdtype":"Tag","name":"tr","attributes":{},"children":[{"$$mdtype":"Tag","name":"td","attributes":{},"children":[{"$$mdtype":"Tag","name":"code","attributes":{},"children":["status"]}]},{"$$mdtype":"Tag","name":"td","attributes":{},"children":["Integer"]},{"$$mdtype":"Tag","name":"td","attributes":{},"children":["Да"]},{"$$mdtype":"Tag","name":"td","attributes":{},"children":["Статус: ",{"$$mdtype":"Tag","name":"code","attributes":{},"children":["2"]}," (ожидание), ",{"$$mdtype":"Tag","name":"code","attributes":{},"children":["3"]}," (успех), ",{"$$mdtype":"Tag","name":"code","attributes":{},"children":["4"]}," (отказ)."]}]},{"$$mdtype":"Tag","name":"tr","attributes":{},"children":[{"$$mdtype":"Tag","name":"td","attributes":{},"children":[{"$$mdtype":"Tag","name":"code","attributes":{},"children":["status_description"]}]},{"$$mdtype":"Tag","name":"td","attributes":{},"children":["String"]},{"$$mdtype":"Tag","name":"td","attributes":{},"children":["Да"]},{"$$mdtype":"Tag","name":"td","attributes":{},"children":[{"$$mdtype":"Tag","name":"code","attributes":{},"children":["PENDING"]},", ",{"$$mdtype":"Tag","name":"code","attributes":{},"children":["SUCCESS"]}," или ",{"$$mdtype":"Tag","name":"code","attributes":{},"children":["FAILURE"]},"."]}]},{"$$mdtype":"Tag","name":"tr","attributes":{},"children":[{"$$mdtype":"Tag","name":"td","attributes":{},"children":[{"$$mdtype":"Tag","name":"code","attributes":{},"children":["redirect_url"]}]},{"$$mdtype":"Tag","name":"td","attributes":{},"children":["String"]},{"$$mdtype":"Tag","name":"td","attributes":{},"children":["Нет"]},{"$$mdtype":"Tag","name":"td","attributes":{},"children":["URL для перенаправления, если требуется завершить оплату."]}]},{"$$mdtype":"Tag","name":"tr","attributes":{},"children":[{"$$mdtype":"Tag","name":"td","attributes":{},"children":[{"$$mdtype":"Tag","name":"code","attributes":{},"children":["init_time"]}]},{"$$mdtype":"Tag","name":"td","attributes":{},"children":["String"]},{"$$mdtype":"Tag","name":"td","attributes":{},"children":["Да"]},{"$$mdtype":"Tag","name":"td","attributes":{},"children":["Время создания платежа."]}]},{"$$mdtype":"Tag","name":"tr","attributes":{},"children":[{"$$mdtype":"Tag","name":"td","attributes":{},"children":[{"$$mdtype":"Tag","name":"code","attributes":{},"children":["status_time"]}]},{"$$mdtype":"Tag","name":"td","attributes":{},"children":["String"]},{"$$mdtype":"Tag","name":"td","attributes":{},"children":["Да"]},{"$$mdtype":"Tag","name":"td","attributes":{},"children":["Время получения финального статуса."]}]},{"$$mdtype":"Tag","name":"tr","attributes":{},"children":[{"$$mdtype":"Tag","name":"td","attributes":{},"children":[{"$$mdtype":"Tag","name":"code","attributes":{},"children":["merchant_price"]}]},{"$$mdtype":"Tag","name":"td","attributes":{},"children":["Number"]},{"$$mdtype":"Tag","name":"td","attributes":{},"children":["Да"]},{"$$mdtype":"Tag","name":"td","attributes":{},"children":["Стоимость для плательщика."]}]},{"$$mdtype":"Tag","name":"tr","attributes":{},"children":[{"$$mdtype":"Tag","name":"td","attributes":{},"children":[{"$$mdtype":"Tag","name":"code","attributes":{},"children":["init_price"]}]},{"$$mdtype":"Tag","name":"td","attributes":{},"children":["Number"]},{"$$mdtype":"Tag","name":"td","attributes":{},"children":["Нет"]},{"$$mdtype":"Tag","name":"td","attributes":{},"children":["Сумма при инициации."]}]},{"$$mdtype":"Tag","name":"tr","attributes":{},"children":[{"$$mdtype":"Tag","name":"td","attributes":{},"children":[{"$$mdtype":"Tag","name":"code","attributes":{},"children":["user_price"]}]},{"$$mdtype":"Tag","name":"td","attributes":{},"children":["Number"]},{"$$mdtype":"Tag","name":"td","attributes":{},"children":["Да"]},{"$$mdtype":"Tag","name":"td","attributes":{},"children":["Отчисления партнёра."]}]},{"$$mdtype":"Tag","name":"tr","attributes":{},"children":[{"$$mdtype":"Tag","name":"td","attributes":{},"children":[{"$$mdtype":"Tag","name":"code","attributes":{},"children":["currency"]}]},{"$$mdtype":"Tag","name":"td","attributes":{},"children":["String"]},{"$$mdtype":"Tag","name":"td","attributes":{},"children":["Да"]},{"$$mdtype":"Tag","name":"td","attributes":{},"children":["Валюта платежа (ISO 4217)."]}]},{"$$mdtype":"Tag","name":"tr","attributes":{},"children":[{"$$mdtype":"Tag","name":"td","attributes":{},"children":[{"$$mdtype":"Tag","name":"code","attributes":{},"children":["account"]}]},{"$$mdtype":"Tag","name":"td","attributes":{},"children":["String"]},{"$$mdtype":"Tag","name":"td","attributes":{},"children":["Да"]},{"$$mdtype":"Tag","name":"td","attributes":{},"children":["Маска номера карты."]}]},{"$$mdtype":"Tag","name":"tr","attributes":{},"children":[{"$$mdtype":"Tag","name":"td","attributes":{},"children":[{"$$mdtype":"Tag","name":"code","attributes":{},"children":["user_data"]}]},{"$$mdtype":"Tag","name":"td","attributes":{},"children":["String"]},{"$$mdtype":"Tag","name":"td","attributes":{},"children":["Да"]},{"$$mdtype":"Tag","name":"td","attributes":{},"children":["ID транзакции, переданный при создании."]}]},{"$$mdtype":"Tag","name":"tr","attributes":{},"children":[{"$$mdtype":"Tag","name":"td","attributes":{},"children":[{"$$mdtype":"Tag","name":"code","attributes":{},"children":["sign"]}]},{"$$mdtype":"Tag","name":"td","attributes":{},"children":["String"]},{"$$mdtype":"Tag","name":"td","attributes":{},"children":["Да"]},{"$$mdtype":"Tag","name":"td","attributes":{},"children":["Контрольная подпись колбека."]}]},{"$$mdtype":"Tag","name":"tr","attributes":{},"children":[{"$$mdtype":"Tag","name":"td","attributes":{},"children":[{"$$mdtype":"Tag","name":"code","attributes":{},"children":["token"]}]},{"$$mdtype":"Tag","name":"td","attributes":{},"children":["String"]},{"$$mdtype":"Tag","name":"td","attributes":{},"children":["Нет"]},{"$$mdtype":"Tag","name":"td","attributes":{},"children":["Идентификатор сохранённой карты при успешной оплате (если подключено)."]}]},{"$$mdtype":"Tag","name":"tr","attributes":{},"children":[{"$$mdtype":"Tag","name":"td","attributes":{},"children":[{"$$mdtype":"Tag","name":"code","attributes":{},"children":["test"]}]},{"$$mdtype":"Tag","name":"td","attributes":{},"children":["Integer"]},{"$$mdtype":"Tag","name":"td","attributes":{},"children":["Нет"]},{"$$mdtype":"Tag","name":"td","attributes":{},"children":[{"$$mdtype":"Tag","name":"code","attributes":{},"children":["1"]}," при тестовых платежах."]}]},{"$$mdtype":"Tag","name":"tr","attributes":{},"children":[{"$$mdtype":"Tag","name":"td","attributes":{},"children":[{"$$mdtype":"Tag","name":"code","attributes":{},"children":["status_code"]}]},{"$$mdtype":"Tag","name":"td","attributes":{},"children":["String"]},{"$$mdtype":"Tag","name":"td","attributes":{},"children":["Нет"]},{"$$mdtype":"Tag","name":"td","attributes":{},"children":["Код причины отказа."]}]}]}]}]},{"$$mdtype":"Tag","name":"p","attributes":{},"children":[{"$$mdtype":"Tag","name":"strong","attributes":{},"children":["Важно:"]}," ваш сервер должен вернуть ",{"$$mdtype":"Tag","name":"strong","attributes":{},"children":["HTTP 200 OK"]},". Иначе система повторяет отправку колбека ",{"$$mdtype":"Tag","name":"strong","attributes":{},"children":["раз в минуту в течение 10 минут"]},"."]},{"$$mdtype":"Tag","name":"p","attributes":{},"children":[{"$$mdtype":"Tag","name":"strong","attributes":{},"children":["Проверка подписи колбека:"]}," MD5 от всех параметров в алфавитном порядке через ",{"$$mdtype":"Tag","name":"code","attributes":{},"children":["&"]}," + ",{"$$mdtype":"Tag","name":"code","attributes":{},"children":["API_KEY"]}," (",{"$$mdtype":"Tag","name":"strong","attributes":{},"children":["без"]}," префикса ",{"$$mdtype":"Tag","name":"code","attributes":{},"children":["init_payment"]},"). Подробнее — в разделе ",{"$$mdtype":"Tag","name":"MarkdownLink","attributes":{"href":"/pages/init-request#%D0%BA%D0%BE%D0%BB%D0%B1%D0%B5%D0%BA%D0%B8-%D1%83%D0%B2%D0%B5%D0%B4%D0%BE%D0%BC%D0%BB%D0%B5%D0%BD%D0%B8%D1%8F"},"children":["Формат запроса к API"]},"."]},{"$$mdtype":"Tag","name":"Heading","attributes":{"level":2,"id":"связанные-разделы","__idx":13},"children":["Связанные разделы"]},{"$$mdtype":"Tag","name":"ul","attributes":{},"children":[{"$$mdtype":"Tag","name":"li","attributes":{},"children":[{"$$mdtype":"Tag","name":"MarkdownLink","attributes":{"href":"/pages/card/init-form"},"children":["Создание платежа по форме"]}]},{"$$mdtype":"Tag","name":"li","attributes":{},"children":[{"$$mdtype":"Tag","name":"MarkdownLink","attributes":{"href":"/pages/card/recurring"},"children":["Создание подписочного платежа"]}]},{"$$mdtype":"Tag","name":"li","attributes":{},"children":[{"$$mdtype":"Tag","name":"MarkdownLink","attributes":{"href":"/pages/card/status"},"children":["Статусы платежей"]}]},{"$$mdtype":"Tag","name":"li","attributes":{},"children":[{"$$mdtype":"Tag","name":"MarkdownLink","attributes":{"href":"/pages/card/refund"},"children":["Возвраты платежей"]}]},{"$$mdtype":"Tag","name":"li","attributes":{},"children":[{"$$mdtype":"Tag","name":"MarkdownLink","attributes":{"href":"/pages/transaction-statuses"},"children":["Статусы транзакций"]}]},{"$$mdtype":"Tag","name":"li","attributes":{},"children":[{"$$mdtype":"Tag","name":"MarkdownLink","attributes":{"href":"/pages/error-codes-api"},"children":["Коды ошибок (API)"]}]},{"$$mdtype":"Tag","name":"li","attributes":{},"children":[{"$$mdtype":"Tag","name":"MarkdownLink","attributes":{"href":"/pages/decline-error-codes"},"children":["Коды ошибок (отказы)"]}]}]}]},"headings":[{"value":"Создание платежа по host2host (GATE)","id":"создание-платежа-по-host2host-gate","depth":1},{"value":"Принцип работы","id":"принцип-работы","depth":2},{"value":"Техническая информация","id":"техническая-информация","depth":2},{"value":"Параметры запроса","id":"параметры-запроса","depth":2},{"value":"Обязательные","id":"обязательные","depth":3},{"value":"Дополнительные","id":"дополнительные","depth":3},{"value":"Параметры 3-D Secure 2.x","id":"параметры-3-d-secure-2x","depth":3},{"value":"Формирование подписи ( sign )","id":"формирование-подписи--sign-","depth":2},{"value":"Проверка подписи в документации","id":"проверка-подписи-в-документации","depth":3},{"value":"Примеры запроса","id":"примеры-запроса","depth":2},{"value":"Ответ API","id":"ответ-api","depth":2},{"value":"Тестирование","id":"тестирование","depth":2},{"value":"Уведомления о статусе (колбеки)","id":"уведомления-о-статусе-колбеки","depth":2},{"value":"Связанные разделы","id":"связанные-разделы","depth":2}],"frontmatter":{"seo":{"title":"Создание платежа по host2host (GATE)"}},"lastModified":"2026-07-16T16:38:52.000Z","pagePropGetterError":{"message":"","name":""}},"slug":"/pages/card/host2host","userData":{"isAuthenticated":false,"teams":["anonymous"]},"isPublic":true}