Skip to content

Payment method ​

INFO

Каждый ответ приходит в общем конверте — code, message, messages, status_code, time — а полезная нагрузка лежит в data. Таблицы ниже описывают содержимое data.

POST /payment-method/create ​

This method allows adding payment-method into the account.

Тело запроса

ПолеТипОбязательноОписание
namestringДа
shortcutstringНетKeyboard shortcut on the POS, F1–F12.
typestringНетOnly cashless can be created. Every account has exactly one cash method, created by the system; sending cash returns a validation error.. Допустимые значения: cashless. По умолчанию: "cashless"
subtypestringНетFiner classification of a cashless method: terminal, online, bank or bnpl. cash takes no subtype. Omit or send null to leave the method unclassified.. Допустимые значения: terminal, online, bank, bnpl
json
{
  "name": "string",
  "shortcut": "F8",
  "type": "cashless",
  "subtype": "terminal"
}

Ответ

ПолеТипОписание
_idstring
namestring
shortcutstring
typestringcash (exactly one per account, created by the system) or cashless. Earlier versions of the API also returned card, terminal, transfer, gift, integration — these are now cashless, described by subtype and is_integration.. Допустимые значения: cash, cashless
subtypestringClassification of a cashless method. null when the method is cash or has not been classified yet.. Допустимые значения: terminal, online, bank, bnpl
is_integrationbooleanThe method was created by a payment integration (Payme, Click, …) rather than by a person. Replaces the old integration type.. По умолчанию: false
is_enabledbooleanПо умолчанию: true
is_defaultbooleanПо умолчанию: false
is_visiblebooleanПо умолчанию: false
created_atstring (date-time)
updated_atstring (date-time)
json
{
  "code": 0,
  "message": "Success",
  "status_code": 200,
  "data": {
    "_id": "string",
    "name": "string",
    "shortcut": "string",
    "type": "cash",
    "subtype": "terminal",
    "is_integration": false,
    "is_enabled": true,
    "is_default": false,
    "is_visible": false,
    "created_at": "2025-05-01T12:00:00Z",
    "updated_at": "2025-05-01T12:00:00Z"
  },
  "time": "2025-05-01T12:00:00Z"
}

PUT /payment-method/update ​

This method allows updating payment-method in the account.

Тело запроса

ПолеТипОбязательноОписание
namestringДа
shortcutstringНетKeyboard shortcut on the POS, F1–F12.
typestringНетOptional; omit it to keep the current type. A method cannot be changed to or from cash: a type that would do so is ignored and the rest of the update is applied.. Допустимые значения: cash, cashless
subtypestringНетFiner classification of a cashless method: terminal, online, bank or bnpl. cash takes no subtype. Omit or send null to leave the method unclassified.. Допустимые значения: terminal, online, bank, bnpl
_idstringДа
json
{
  "name": "string",
  "shortcut": "F8",
  "type": "cash",
  "subtype": "terminal",
  "_id": "67b486d242ed76693cd2cc59"
}

Ответ

Структура ответа совпадает с POST /payment-method/create.

DELETE /payment-method/delete/{id} ​

Delete a payment-method

Параметры пути

ПараметрТипОбязательноОписание
idstringДа

Тело запроса

Тело запроса не требуется.

Ответ

json
{
  "code": 0,
  "message": "Success",
  "status_code": 200,
  "data": "ok",
  "time": "2025-05-01T12:00:00Z"
}

GET /payment-method/get-all ​

Get all payment-methods

Параметры запроса

ПараметрТипОбязательноОписание
is_enabledbooleanНетFilter payment-methods by enabled status

Тело запроса

Тело запроса не требуется.

Ответ

json
{
  "code": 0,
  "message": "Success",
  "status_code": 200,
  "data": [
    {
      "_id": "string",
      "name": "string",
      "shortcut": "string",
      "type": "cash",
      "subtype": "terminal",
      "is_integration": false,
      "is_enabled": true,
      "is_default": false,
      "is_visible": false,
      "created_at": "2025-05-01T12:00:00Z",
      "updated_at": "2025-05-01T12:00:00Z"
    }
  ],
  "time": "2025-05-01T12:00:00Z"
}

GET /payment-method/get-by-id/{id} ​

Get payment-method using its _id

Параметры пути

ПараметрТипОбязательноОписание
idstringДа

Тело запроса

Тело запроса не требуется.

Ответ

Структура ответа совпадает с POST /payment-method/create.

GET /payment-method/get-deleted ​

Get deleted payment-method ids

Параметры запроса

ПараметрТипОбязательноОписание
deleted_atstringДа

Тело запроса

Тело запроса не требуется.

Ответ

json
{
  "code": 0,
  "message": "Success",
  "status_code": 200,
  "data": [
    "string"
  ],
  "time": "2025-05-01T12:00:00Z"
}

PUT /payment-method/set-active ​

This method allows setActive payment-method in the account.

Тело запроса

ПолеТипОбязательноОписание
is_enabledbooleanДаПо умолчанию: true
_idstringДа
json
{
  "is_enabled": true,
  "_id": "67b486d242ed76693cd2cc59"
}

Ответ

Структура ответа совпадает с POST /payment-method/create.


Эта страница сгенерирована из спецификации OpenAPI.

Bito 2.0 Integration API