Payment type
INFO
Every response arrives in the shared envelope — code, message, messages, status_code, time — with the payload in data. The tables below describe what is inside data.
POST /payment-type/create
This method allows adding payment-type into the account.
Request body
| Field | Type | Required | Description |
|---|---|---|---|
name | string | Yes | |
parent_id | string | No | |
transaction_type | string | No | One of: income, expense, transfer, exchange, nothing, exchange_method. Default: "income" |
user_type | string | No | One of: supplier, employee, customer, person, other. Default: "supplier" |
can_be_canceled | boolean | No | Default: false |
{
"name": "string",
"parent_id": "67b486d242ed76693cd2cc59",
"transaction_type": "income",
"user_type": "supplier",
"can_be_canceled": false
}Response
| Field | Type | Description |
|---|---|---|
_id | string | |
name | string | |
short_cut | string | |
type | string | One of: cash, card, debt, gift, transfer, terminal, by_balance, by_cashback |
is_enabled | boolean | Default: true |
is_default | boolean | Default: false |
is_visible | boolean | Default: 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.
Request body
| Field | Type | Required | Description |
|---|---|---|---|
_id | string | Yes | |
name | string | Yes | |
parent_id | string | No | |
transaction_type | string | No | One of: income, expense, transfer, exchange, nothing, exchange_method. Default: "income" |
user_type | string | No | One of: supplier, employee, customer, person, other. Default: "supplier" |
can_be_canceled | boolean | No | Default: false |
{
"_id": "67b486d242ed76693cd2cc59",
"name": "string",
"parent_id": "67b486d242ed76693cd2cc59",
"transaction_type": "income",
"user_type": "supplier",
"can_be_canceled": false
}Response
Same response shape as POST /payment-type/create.
DELETE /payment-type/delete/{id}
Delete a payment-type
Path parameters
| Parameter | Type | Required | Description |
|---|---|---|---|
id | string | Yes |
Request body
No request body.
Response
{
"code": 0,
"message": "Success",
"status_code": 200,
"data": "ok",
"time": "2025-05-01T12:00:00Z"
}POST /payment-type/get-all
Get all payment-types
Request body
| Field | Type | Required | Description |
|---|---|---|---|
transaction_type | string | No | One of: income, expense, transfer, exchange, nothing, exchange_method |
user_type | string | No | One of: supplier, employee, customer, person, other |
is_visible | boolean | No | Default: false |
is_active | boolean | No | Default: true |
search | string | No |
{
"transaction_type": "income",
"user_type": "supplier",
"is_visible": false,
"is_active": true,
"search": "string"
}Response
{
"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
Path parameters
| Parameter | Type | Required | Description |
|---|---|---|---|
id | string | Yes |
Request body
No request body.
Response
Same response shape as POST /payment-type/create.
GET /payment-type/get-deleted
Get deleted payment-type ids
Query parameters
| Parameter | Type | Required | Description |
|---|---|---|---|
deleted_at | string | Yes |
Request body
No request body.
Response
{
"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.
Request body
| Field | Type | Required | Description |
|---|---|---|---|
is_active | boolean | Yes | Default: true |
_id | string | Yes |
{
"is_active": true,
"_id": "67b486d242ed76693cd2cc59"
}Response
Same response shape as POST /payment-type/create.
This page is generated from the OpenAPI spec.