Основні запити та відповіді: відмінності між версіями

Матеріал з apidocs
Перейти до: навігація, пошук
Мітки: Очищення Ручний відкіт
Рядок 1: Рядок 1:
== Реєстрація точки та створення сесії ==
Цей метод слід викликати, коли користувач вперше звертається до платіжної сторінки. Якщо браузер або пристрій змінюються, метод знову з'являється
<p style="border: 1px solid #9ACD32; background-color: rgba(192, 255, 192, 0.5); padding: 10px; border-radius: 8px; font-family: Arial, sans-serif; font-size: 14px; font-weight: normal; position: relative; padding-left: 80px;">
    <span style="position: absolute; top: 10px; left: 10px; background-color: #006400; color: white; padding: 2px 12px; border-radius: 4px; font-size: 14px; font-weight: bold;">POST</span>
    <span style="margin-left: 5px; font-weight: bold; font-size: 16px;">/api/system/createApp</span>
</p>
'''Request'''<syntaxhighlight line="1" lang="json">
headers:


"PartnerKey": "partnerName",
"locale": "ua"
</syntaxhighlight>'''Response'''<syntaxhighlight lang="json-object" line="1">
body:
{
  "logoPath": "https://cdn.easypay.ua/logo/",
  "hintImagesPath": "https://cdn.easypay.ua/hint_images/",
  "apiVersion": "1.0",
  "appId": "a5806a5f-dbb8-496a-a23f-aab6d2fcbce1",
  "pageId": "f3f2b678-a3c4-45ba-a865-a136fe4a62bd",
  "error": null
}
</syntaxhighlight>'''Характеристика параметрів'''<table style="border-collapse: collapse; width: 100%; font-family: Roboto, sans-serif; font-weight: 100; font-size: 0.8em; color: #333;">        '''Параметри''' <table style="border-collapse: collapse; width: 100%; font-family: Roboto, sans-serif; font-weight: 100; font-size: 0.8em; color: #333;">
    <!-- Перший рядок - заголовок -->
    <tr>
      <th style="border: none; border-bottom: 1px solid #d3d3d3; text-align: center; padding: 8px;">Параметр</th>
      <th style="border: none; border-bottom: 1px solid #d3d3d3; text-align: center; padding: 8px;">Характеристика</th>
      <th style="border: none; border-bottom: 1px solid #d3d3d3; text-align: center; padding: 8px;">Коментарій</th>
    </tr>
    <!-- Другий рядок --><!-- Третій рядок --><!-- Четвертий рядок --><!-- П'ятий рядок -->
    <tr>
      <td style="border: none; border-bottom: 1px solid #d3d3d3; padding-right: 10px; text-align: left;">'''<code>AppId</code>'''</td>
      <td style="border: none; border-bottom: 1px solid #d3d3d3; padding-right: 10px; text-align: left;">ідентифікатор торгової точки партнера </td>
      <td style="border: none; border-bottom: 1px solid #d3d3d3; text-align: left;">за замовчуванням, якщо не було активності за запитами,
час життя AppId - 3 місяці. З кожним запитом життя AppId автоматично продовжується.
</td>
    </tr>
    <!-- Шостий рядок -->
    <tr>
      <td style="border: none; padding-right: 10px; text-align: left;">'''<code>PageId</code>'''</td>
      <td style="border: none; padding-right: 10px; text-align: left;">ідентифікатор сесії </td>
      <td style="border: none; text-align: left;">параметр валідний протягом 20 хв. Для кожного запиту CreateOrder потрібно використовувати унікальний PageID</td>
    </tr>
  </table>
<br>
==== Створення сесії ====
----Даний метод створює новий екземпляр сеансу для користувача , <code>PageId</code>.
<p style="border: 1px solid #9ACD32; background-color: rgba(144, 238, 144, 0.5); padding: 10px; border-radius: 8px; font-family: Arial, sans-serif; font-size: 14px; font-weight: normal; position: relative; padding-left: 80px;">
    <span style="position: absolute; top: 10px; left: 10px; background-color: #006400; color: white; padding: 2px 12px; border-radius: 4px; font-size: 14px; font-weight: bold;">POST</span>
    <span style="margin-left: 5px; font-weight: bold; font-size: 16px;">/api/system/createPage</span>
</p>'''Request'''<syntaxhighlight line="1" lang="json">
headers
"PartnerKey":  "partnerName"
"locale": "ua"
"AppId": "a5806a5f-dbb8-496a-a23f-aab6d2fcbce1"
</syntaxhighlight>'''Response'''<syntaxhighlight lang="json" line="1">
body:
{
    "logoPath": "https://cdn.easypay.ua/logo/",
    "hintImagesPath": null,
    "apiVersion": "1.0",
    "appId": "a5806a5f-dbb8-496a-a23f-aab6d2fcbce1",
    "pageId": "29bd7237-6b8d-4048-b028-6efc23d05988",
    "requestedSessionId": "fa3595d3-52de-4744-9fc6-ec2d3507d5a5",
    "error": null
}
</syntaxhighlight>'''Характеристика параметрів''' <table style="border-collapse: collapse; width: 100%; font-family: Roboto, sans-serif; font-weight: 100; font-size: 0.8em; color: #333;">        <table style="border-collapse: collapse; width: 100%; font-family: Roboto, sans-serif; font-weight: 100; font-size: 0.8em; color: #333;">
    <!-- Перший рядок - заголовок -->
    <tr>
      <th style="border: none; border-bottom: 1px solid #d3d3d3; text-align: center; padding: 8px;">Параметр</th>
      <th style="border: none; border-bottom: 1px solid #d3d3d3; text-align: center; padding: 8px;">Характеристика</th>
      <th style="border: none; border-bottom: 1px solid #d3d3d3; text-align: center; padding: 8px;">Коментарій</th>
    </tr>
    <!-- Другий рядок --><!-- Третій рядок --><!-- Четвертий рядок --><!-- П'ятий рядок -->
    <tr>
      <td style="border: none; border-bottom: 1px solid #d3d3d3; padding-right: 10px; text-align: left;">'''<code>AppId</code>'''</td>
      <td style="border: none; border-bottom: 1px solid #d3d3d3; padding-right: 10px; text-align: left;">ідентифікатор торгової точки партнера </td>
      <td style="border: none; border-bottom: 1px solid #d3d3d3; text-align: left;">за замовчуванням, якщо не було активності за запитами,
час життя AppId - 3 місяці. З кожним запитом життя AppId автоматично продовжується.
</td>
    </tr>
    <!-- Шостий рядок -->
    <tr>
      <td style="border: none; padding-right: 10px; text-align: left;">'''<code>PageId</code>'''</td>
      <td style="border: none; padding-right: 10px; text-align: left;">ідентифікатор сесії </td>
      <td style="border: none; text-align: left;">За замовчуванням, якщо не було активності за запитами, час життя PageId - 20 хвилин. З кожним запитом життя PageId автоматично продовжується.</td>
    </tr>
  </table>
<br><!-- Перший рядок - заголовок --><!-- Другий рядок --><!-- Третій рядок --><!-- Четвертий рядок --><!-- П'ятий рядок -->

Версія за 16:07, 12 серпня 2025