Payment type
INFO
Каждый ответ приходит в общем конверте — code, message, messages, status_code, time — а полезная нагрузка лежит в data. Таблицы ниже описывают содержимое data.
POST /payment-type/create
This method allows adding payment-type into the account.
Нужное разрешение: payment_methods · как работают разрешения
Пример запроса
curl -X POST 'https://api.bito.uz/integration-api/integration/api/v2/payment-type/create' \
-H "api-key: $BITO_API_KEY" \
-H 'Content-Type: application/json' \
-d '{
"name": "string"
}'const res = await fetch('https://api.bito.uz/integration-api/integration/api/v2/payment-type/create', {
method: 'POST',
headers: { 'api-key': process.env.BITO_API_KEY, 'Content-Type': 'application/json' },
body: JSON.stringify({
"name": "string"
}),
})
const { code, data } = await res.json()import os
import requests
res = requests.request(
"POST",
"https://api.bito.uz/integration-api/integration/api/v2/payment-type/create",
headers={"api-key": os.environ["BITO_API_KEY"]},
json={
"name": "string",
},
)
print(res.json())<?php
$body = <<<'JSON'
{
"name": "string"
}
JSON;
$ch = curl_init('https://api.bito.uz/integration-api/integration/api/v2/payment-type/create');
curl_setopt_array($ch, [
CURLOPT_CUSTOMREQUEST => 'POST',
CURLOPT_HTTPHEADER => ['api-key: ' . getenv('BITO_API_KEY'), 'Content-Type: application/json'],
CURLOPT_POSTFIELDS => $body,
CURLOPT_RETURNTRANSFER => true,
]);
$response = json_decode(curl_exec($ch), true);Тело запроса
| Поле | Тип | Обязательно | Описание |
|---|---|---|---|
name | string | Да | |
parent_id | string | Нет | |
transaction_type | string | Нет | Допустимые значения: income, expense, transfer, exchange, nothing, exchange_method. По умолчанию: "income" |
user_type | string | Нет | Допустимые значения: supplier, employee, customer, person, other. По умолчанию: "supplier" |
can_be_canceled | boolean | Нет | По умолчанию: false |
{
"name": "string",
"parent_id": "67b486d242ed76693cd2cc59",
"transaction_type": "income",
"user_type": "supplier",
"can_be_canceled": false
}Ответ
| Поле | Тип | Описание |
|---|---|---|
_id | string | |
name | string | |
short_cut | string | |
type | string | Допустимые значения: cash, card, debt, gift, transfer, terminal, by_balance, by_cashback |
is_enabled | boolean | По умолчанию: true |
is_default | boolean | По умолчанию: false |
is_visible | boolean | По умолчанию: false |
created_at | string (date-time) | |
updated_at | string (date-time) |
{
"code": 0,
"message": "Success",
"status_code": 200,
"data": {
"_id": "string",
"name": "string",
"short_cut": "string",
"type": "cash",
"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-type/update
This method allows updating payment-type in the account.
Нужное разрешение: payment_methods · как работают разрешения
Пример запроса
curl -X PUT 'https://api.bito.uz/integration-api/integration/api/v2/payment-type/update' \
-H "api-key: $BITO_API_KEY" \
-H 'Content-Type: application/json' \
-d '{
"name": "string",
"_id": "67b486d242ed76693cd2cc59"
}'const res = await fetch('https://api.bito.uz/integration-api/integration/api/v2/payment-type/update', {
method: 'PUT',
headers: { 'api-key': process.env.BITO_API_KEY, 'Content-Type': 'application/json' },
body: JSON.stringify({
"name": "string",
"_id": "67b486d242ed76693cd2cc59"
}),
})
const { code, data } = await res.json()import os
import requests
res = requests.request(
"PUT",
"https://api.bito.uz/integration-api/integration/api/v2/payment-type/update",
headers={"api-key": os.environ["BITO_API_KEY"]},
json={
"name": "string",
"_id": "67b486d242ed76693cd2cc59",
},
)
print(res.json())<?php
$body = <<<'JSON'
{
"name": "string",
"_id": "67b486d242ed76693cd2cc59"
}
JSON;
$ch = curl_init('https://api.bito.uz/integration-api/integration/api/v2/payment-type/update');
curl_setopt_array($ch, [
CURLOPT_CUSTOMREQUEST => 'PUT',
CURLOPT_HTTPHEADER => ['api-key: ' . getenv('BITO_API_KEY'), 'Content-Type: application/json'],
CURLOPT_POSTFIELDS => $body,
CURLOPT_RETURNTRANSFER => true,
]);
$response = json_decode(curl_exec($ch), true);Тело запроса
| Поле | Тип | Обязательно | Описание |
|---|---|---|---|
_id | string | Да | |
name | string | Да | |
parent_id | string | Нет | |
can_be_canceled | boolean | Нет | По умолчанию: false |
{
"_id": "67b486d242ed76693cd2cc59",
"name": "string",
"parent_id": "67b486d242ed76693cd2cc59",
"can_be_canceled": false
}Ответ
Структура ответа совпадает с POST /payment-type/create.
DELETE /payment-type/delete/{id}
Delete a payment-type
Нужное разрешение: payment_methods · как работают разрешения
Пример запроса
curl -X DELETE 'https://api.bito.uz/integration-api/integration/api/v2/payment-type/delete/6712f0a9c4d1e87b3a0f9911' \
-H "api-key: $BITO_API_KEY"const res = await fetch('https://api.bito.uz/integration-api/integration/api/v2/payment-type/delete/6712f0a9c4d1e87b3a0f9911', {
method: 'DELETE',
headers: { 'api-key': process.env.BITO_API_KEY },
})
const { code, data } = await res.json()import os
import requests
res = requests.request(
"DELETE",
"https://api.bito.uz/integration-api/integration/api/v2/payment-type/delete/6712f0a9c4d1e87b3a0f9911",
headers={"api-key": os.environ["BITO_API_KEY"]},
)
print(res.json())<?php
$ch = curl_init('https://api.bito.uz/integration-api/integration/api/v2/payment-type/delete/6712f0a9c4d1e87b3a0f9911');
curl_setopt_array($ch, [
CURLOPT_CUSTOMREQUEST => 'DELETE',
CURLOPT_HTTPHEADER => ['api-key: ' . getenv('BITO_API_KEY')],
CURLOPT_RETURNTRANSFER => true,
]);
$response = json_decode(curl_exec($ch), true);Параметры пути
| Параметр | Тип | Обязательно | Описание |
|---|---|---|---|
id | string | Да |
Тело запроса
Тело запроса не требуется.
Ответ
{
"code": 0,
"message": "Success",
"status_code": 200,
"data": "ok",
"time": "2025-05-01T12:00:00Z"
}POST /payment-type/get-all
Get all payment-types
Нужное разрешение: payment_methods · как работают разрешения
Пример запроса
curl -X POST 'https://api.bito.uz/integration-api/integration/api/v2/payment-type/get-all' \
-H "api-key: $BITO_API_KEY" \
-H 'Content-Type: application/json' \
-d '{
"transaction_type": "income",
"user_type": "supplier",
"is_visible": false,
"is_active": true
}'const res = await fetch('https://api.bito.uz/integration-api/integration/api/v2/payment-type/get-all', {
method: 'POST',
headers: { 'api-key': process.env.BITO_API_KEY, 'Content-Type': 'application/json' },
body: JSON.stringify({
"transaction_type": "income",
"user_type": "supplier",
"is_visible": false,
"is_active": true
}),
})
const { code, data } = await res.json()import os
import requests
res = requests.request(
"POST",
"https://api.bito.uz/integration-api/integration/api/v2/payment-type/get-all",
headers={"api-key": os.environ["BITO_API_KEY"]},
json={
"transaction_type": "income",
"user_type": "supplier",
"is_visible": False,
"is_active": True,
},
)
print(res.json())<?php
$body = <<<'JSON'
{
"transaction_type": "income",
"user_type": "supplier",
"is_visible": false,
"is_active": true
}
JSON;
$ch = curl_init('https://api.bito.uz/integration-api/integration/api/v2/payment-type/get-all');
curl_setopt_array($ch, [
CURLOPT_CUSTOMREQUEST => 'POST',
CURLOPT_HTTPHEADER => ['api-key: ' . getenv('BITO_API_KEY'), 'Content-Type: application/json'],
CURLOPT_POSTFIELDS => $body,
CURLOPT_RETURNTRANSFER => true,
]);
$response = json_decode(curl_exec($ch), true);Тело запроса
| Поле | Тип | Обязательно | Описание |
|---|---|---|---|
transaction_type | string | Нет | Допустимые значения: income, expense, transfer, exchange, nothing, exchange_method |
user_type | string | Нет | Допустимые значения: supplier, employee, customer, person, other |
is_visible | boolean | Нет | По умолчанию: false |
is_active | boolean | Нет | По умолчанию: true |
{
"transaction_type": "income",
"user_type": "supplier",
"is_visible": false,
"is_active": true
}Ответ
{
"code": 0,
"message": "Success",
"status_code": 200,
"data": [
{
"_id": "string",
"name": "string",
"short_cut": "string",
"type": "cash",
"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-type/get-by-id/{id}
Get payment-type using its _id
Нужное разрешение: payment_methods · как работают разрешения
Пример запроса
curl -X GET 'https://api.bito.uz/integration-api/integration/api/v2/payment-type/get-by-id/6712f0a9c4d1e87b3a0f9911' \
-H "api-key: $BITO_API_KEY"const res = await fetch('https://api.bito.uz/integration-api/integration/api/v2/payment-type/get-by-id/6712f0a9c4d1e87b3a0f9911', {
method: 'GET',
headers: { 'api-key': process.env.BITO_API_KEY },
})
const { code, data } = await res.json()import os
import requests
res = requests.request(
"GET",
"https://api.bito.uz/integration-api/integration/api/v2/payment-type/get-by-id/6712f0a9c4d1e87b3a0f9911",
headers={"api-key": os.environ["BITO_API_KEY"]},
)
print(res.json())<?php
$ch = curl_init('https://api.bito.uz/integration-api/integration/api/v2/payment-type/get-by-id/6712f0a9c4d1e87b3a0f9911');
curl_setopt_array($ch, [
CURLOPT_CUSTOMREQUEST => 'GET',
CURLOPT_HTTPHEADER => ['api-key: ' . getenv('BITO_API_KEY')],
CURLOPT_RETURNTRANSFER => true,
]);
$response = json_decode(curl_exec($ch), true);Параметры пути
| Параметр | Тип | Обязательно | Описание |
|---|---|---|---|
id | string | Да |
Тело запроса
Тело запроса не требуется.
Ответ
Структура ответа совпадает с POST /payment-type/create.
GET /payment-type/get-deleted
Get deleted payment-type ids
Нужное разрешение: payment_methods · как работают разрешения
Пример запроса
curl -X GET 'https://api.bito.uz/integration-api/integration/api/v2/payment-type/get-deleted?deleted_at=DELETED_AT' \
-H "api-key: $BITO_API_KEY"const res = await fetch('https://api.bito.uz/integration-api/integration/api/v2/payment-type/get-deleted?deleted_at=DELETED_AT', {
method: 'GET',
headers: { 'api-key': process.env.BITO_API_KEY },
})
const { code, data } = await res.json()import os
import requests
res = requests.request(
"GET",
"https://api.bito.uz/integration-api/integration/api/v2/payment-type/get-deleted?deleted_at=DELETED_AT",
headers={"api-key": os.environ["BITO_API_KEY"]},
)
print(res.json())<?php
$ch = curl_init('https://api.bito.uz/integration-api/integration/api/v2/payment-type/get-deleted?deleted_at=DELETED_AT');
curl_setopt_array($ch, [
CURLOPT_CUSTOMREQUEST => 'GET',
CURLOPT_HTTPHEADER => ['api-key: ' . getenv('BITO_API_KEY')],
CURLOPT_RETURNTRANSFER => true,
]);
$response = json_decode(curl_exec($ch), true);Параметры запроса
| Параметр | Тип | Обязательно | Описание |
|---|---|---|---|
deleted_at | string | Да |
Тело запроса
Тело запроса не требуется.
Ответ
{
"code": 0,
"message": "Success",
"status_code": 200,
"data": [
"string"
],
"time": "2025-05-01T12:00:00Z"
}PUT /payment-type/set-state
This method allows setActive payment-type in the account.
Нужное разрешение: payment_methods · как работают разрешения
Пример запроса
curl -X PUT 'https://api.bito.uz/integration-api/integration/api/v2/payment-type/set-state' \
-H "api-key: $BITO_API_KEY" \
-H 'Content-Type: application/json' \
-d '{
"_id": "67b486d242ed76693cd2cc59",
"is_active": true
}'const res = await fetch('https://api.bito.uz/integration-api/integration/api/v2/payment-type/set-state', {
method: 'PUT',
headers: { 'api-key': process.env.BITO_API_KEY, 'Content-Type': 'application/json' },
body: JSON.stringify({
"_id": "67b486d242ed76693cd2cc59",
"is_active": true
}),
})
const { code, data } = await res.json()import os
import requests
res = requests.request(
"PUT",
"https://api.bito.uz/integration-api/integration/api/v2/payment-type/set-state",
headers={"api-key": os.environ["BITO_API_KEY"]},
json={
"_id": "67b486d242ed76693cd2cc59",
"is_active": True,
},
)
print(res.json())<?php
$body = <<<'JSON'
{
"_id": "67b486d242ed76693cd2cc59",
"is_active": true
}
JSON;
$ch = curl_init('https://api.bito.uz/integration-api/integration/api/v2/payment-type/set-state');
curl_setopt_array($ch, [
CURLOPT_CUSTOMREQUEST => 'PUT',
CURLOPT_HTTPHEADER => ['api-key: ' . getenv('BITO_API_KEY'), 'Content-Type: application/json'],
CURLOPT_POSTFIELDS => $body,
CURLOPT_RETURNTRANSFER => true,
]);
$response = json_decode(curl_exec($ch), true);Тело запроса
| Поле | Тип | Обязательно | Описание |
|---|---|---|---|
is_active | boolean | Да | По умолчанию: true |
_id | string | Да |
{
"is_active": true,
"_id": "67b486d242ed76693cd2cc59"
}Ответ
Структура ответа совпадает с POST /payment-type/create.
Эта страница сгенерирована из спецификации OpenAPI.