Versions Compared

Key

  • This line was added.
  • This line was removed.
  • Formatting was changed.

Метод для отримання інформації щодо можливої суми комісії по створеному інвойсуMethod for obtaining information on the possible amount of commission on the created invoice.

Tip

URI

POST /api/invoicer/payments/showCommission

ЗапитRequest:

Ключ

Key

Опис

Description

Тип

Type

Обов'язковість

Mandatory

Приклад

Example

params

 

 

 

 

sessionId

client session id

сессії клієнта

string, uuid

так

yes

"00684a7f-3d5c-43f4-b4d1-ea994226be9c"

invoiceId

invoice id

інвойсу

string, uuid

так

yes

"6e391161-94ff-41a3-bd22-c6d77509bff6"

data

 

 

 

 

amount

сума платежу в копійках.

the amount of payment in kopecks

integer

так

yes

2300

Параметр amount є обов'язковим, але враховується при розрахунку це поле лише для інвойсів з відкритою сумою. Для інших інвойсів сума не залежить від значення цього параметру і комісія буде розраховуватися від суми, вказаної при створенні інвойсуThe amount parameter is mandatory, but this field is taken into account in the calculation only for invoices with an open amount. For other invoices, the amount does not depend on the value of this parameter and the commission will be calculated from the amount specified when creating the invoice.

Expand
titleПриклад запитуExample of a query
Code Block
{
   "params": {
      "sessionId": "00684a7f-3d5c-43f4-b4d1-ea994226be9c",
      "invoiceId": ""6e391161-94ff-41a3-bd22-c6d77509bff6"
   },
   "data": {
      "amount": 50000
   }
}

ВідповідьReply:

Ключ

Key

Опис

Description

Тип

Type

Приклад

Example

status

Статус

Status. 0 -

помилка

error, 1 -

успіх

success

integer

1

data

 

 

 

commissionAmount

Сума комісії

The amount of commission

integer

102

commission

 

percents

відсоток комісії

commission percentage

integer

2

fixed

фіксоване значення комісії

fixed value of the commission

integer

100

Expand
titleПриклад відповідіExample of an answer
Code Block
{
    "status": 1,
    "data": {
        "commission": {
            "percents": 2,
            "fixed": 100
        },
        "commissionAmount": 1100
    }
}

...