{"openapi":"3.1.0","info":{"title":"Qajet Pay","description":"\nӨз Kaspi Pay аккаунтыңызды өз жобаңызға қосуға арналған шағын интеграция.\n\n* **Телефон бойынша шот** — клиентке Kaspi-де push келеді, 24 сағат күтеді\n* **QR-шот** — сканерлеуге бірнеше минут\n* **Тұрақты QR** — қағазға басуға болатын сілтеме\n* **Webhook** — HMAC-SHA256 қолтаңбасымен, қайталаумен\n* **Қайтару** — толық және жартылай\n\nАутентификация: барлық сұраныста `X-API-Key` тақырыбы (`/api/v1/status`-тан басқа).\n","version":"1.0.0"},"paths":{"/api/v1/status":{"get":{"tags":["System"],"summary":"Health-check","description":"Авторизациясыз қолжетімді — мониторингке арналған.","operationId":"status_api_v1_status_get","responses":{"200":{"description":"Successful Response","content":{"application/json":{"schema":{"$ref":"#/components/schemas/StatusResponse"}}}}}}},"/api/v1/invoices":{"post":{"tags":["Invoices"],"summary":"Телефон бойынша шот","description":"Клиентке Kaspi қосымшасында push келеді. Шот 24 сағат күтеді.","operationId":"create_invoice_api_v1_invoices_post","parameters":[{"name":"X-API-Key","in":"header","required":false,"schema":{"anyOf":[{"type":"string"},{"type":"null"}],"title":"X-Api-Key"}}],"requestBody":{"required":true,"content":{"application/json":{"schema":{"$ref":"#/components/schemas/CreateInvoiceRequest"}}}},"responses":{"201":{"description":"Successful Response","content":{"application/json":{"schema":{"$ref":"#/components/schemas/InvoiceOut"}}}},"422":{"description":"Validation Error","content":{"application/json":{"schema":{"$ref":"#/components/schemas/HTTPValidationError"}}}}}},"get":{"tags":["Invoices"],"summary":"Шоттар тізімі","operationId":"list_invoices_api_v1_invoices_get","parameters":[{"name":"page","in":"query","required":false,"schema":{"type":"integer","minimum":1,"default":1,"title":"Page"}},{"name":"per_page","in":"query","required":false,"schema":{"type":"integer","maximum":100,"minimum":1,"default":25,"title":"Per Page"}},{"name":"status","in":"query","required":false,"schema":{"anyOf":[{"type":"string"},{"type":"null"}],"title":"Status"}},{"name":"kind","in":"query","required":false,"schema":{"anyOf":[{"type":"string"},{"type":"null"}],"title":"Kind"}},{"name":"phone","in":"query","required":false,"schema":{"anyOf":[{"type":"string"},{"type":"null"}],"title":"Phone"}},{"name":"external_order_id","in":"query","required":false,"schema":{"anyOf":[{"type":"string"},{"type":"null"}],"title":"External Order Id"}},{"name":"search","in":"query","required":false,"schema":{"anyOf":[{"type":"string"},{"type":"null"}],"description":"Сипаттама/заметка ішінен","title":"Search"},"description":"Сипаттама/заметка ішінен"},{"name":"created_from","in":"query","required":false,"schema":{"anyOf":[{"type":"string","format":"date-time"},{"type":"null"}],"title":"Created From"}},{"name":"created_to","in":"query","required":false,"schema":{"anyOf":[{"type":"string","format":"date-time"},{"type":"null"}],"title":"Created To"}},{"name":"X-API-Key","in":"header","required":false,"schema":{"anyOf":[{"type":"string"},{"type":"null"}],"title":"X-Api-Key"}}],"responses":{"200":{"description":"Successful Response","content":{"application/json":{"schema":{"$ref":"#/components/schemas/Page_InvoiceOut_"}}}},"422":{"description":"Validation Error","content":{"application/json":{"schema":{"$ref":"#/components/schemas/HTTPValidationError"}}}}}}},"/api/v1/invoices/qr":{"post":{"tags":["Invoices"],"summary":"QR-шот","description":"QR токенін қайтарады. Сканерлеу терезесі — бірнеше минут.","operationId":"create_qr_invoice_api_v1_invoices_qr_post","parameters":[{"name":"X-API-Key","in":"header","required":false,"schema":{"anyOf":[{"type":"string"},{"type":"null"}],"title":"X-Api-Key"}}],"requestBody":{"required":true,"content":{"application/json":{"schema":{"$ref":"#/components/schemas/CreateQrInvoiceRequest"}}}},"responses":{"201":{"description":"Successful Response","content":{"application/json":{"schema":{"$ref":"#/components/schemas/InvoiceOut"}}}},"422":{"description":"Validation Error","content":{"application/json":{"schema":{"$ref":"#/components/schemas/HTTPValidationError"}}}}}}},"/api/v1/invoices/stats":{"get":{"tags":["Invoices"],"summary":"Статистика","operationId":"invoice_stats_api_v1_invoices_stats_get","parameters":[{"name":"created_from","in":"query","required":false,"schema":{"anyOf":[{"type":"string","format":"date-time"},{"type":"null"}],"title":"Created From"}},{"name":"created_to","in":"query","required":false,"schema":{"anyOf":[{"type":"string","format":"date-time"},{"type":"null"}],"title":"Created To"}},{"name":"X-API-Key","in":"header","required":false,"schema":{"anyOf":[{"type":"string"},{"type":"null"}],"title":"X-Api-Key"}}],"responses":{"200":{"description":"Successful Response","content":{"application/json":{"schema":{"$ref":"#/components/schemas/InvoiceStats"}}}},"422":{"description":"Validation Error","content":{"application/json":{"schema":{"$ref":"#/components/schemas/HTTPValidationError"}}}}}}},"/api/v1/invoices/{invoice_id}":{"get":{"tags":["Invoices"],"summary":"Шотты алу","description":"Webhook орнатпасаңыз, статусты осы арқылы сұрауға болады.","operationId":"get_invoice_api_v1_invoices__invoice_id__get","parameters":[{"name":"invoice_id","in":"path","required":true,"schema":{"type":"integer","title":"Invoice Id"}},{"name":"X-API-Key","in":"header","required":false,"schema":{"anyOf":[{"type":"string"},{"type":"null"}],"title":"X-Api-Key"}}],"responses":{"200":{"description":"Successful Response","content":{"application/json":{"schema":{"$ref":"#/components/schemas/InvoiceOut"}}}},"422":{"description":"Validation Error","content":{"application/json":{"schema":{"$ref":"#/components/schemas/HTTPValidationError"}}}}}},"patch":{"tags":["Invoices"],"summary":"Ішкі заметканы өзгерту","description":"Тек ішкі заметка өзгереді — қалғаны Kaspi-де бекітілген.","operationId":"update_invoice_api_v1_invoices__invoice_id__patch","parameters":[{"name":"invoice_id","in":"path","required":true,"schema":{"type":"integer","title":"Invoice Id"}},{"name":"X-API-Key","in":"header","required":false,"schema":{"anyOf":[{"type":"string"},{"type":"null"}],"title":"X-Api-Key"}}],"requestBody":{"required":true,"content":{"application/json":{"schema":{"$ref":"#/components/schemas/UpdateInvoiceRequest"}}}},"responses":{"200":{"description":"Successful Response","content":{"application/json":{"schema":{"$ref":"#/components/schemas/InvoiceOut"}}}},"422":{"description":"Validation Error","content":{"application/json":{"schema":{"$ref":"#/components/schemas/HTTPValidationError"}}}}}}},"/api/v1/invoices/{invoice_id}/qr.png":{"get":{"tags":["Invoices"],"summary":"QR суреті","operationId":"invoice_qr_png_api_v1_invoices__invoice_id__qr_png_get","parameters":[{"name":"invoice_id","in":"path","required":true,"schema":{"type":"integer","title":"Invoice Id"}},{"name":"X-API-Key","in":"header","required":false,"schema":{"anyOf":[{"type":"string"},{"type":"null"}],"title":"X-Api-Key"}}],"responses":{"200":{"description":"Successful Response"},"422":{"description":"Validation Error","content":{"application/json":{"schema":{"$ref":"#/components/schemas/HTTPValidationError"}}}}}}},"/api/v1/invoices/{invoice_id}/cancel":{"post":{"tags":["Invoices"],"summary":"Шотты болдырмау","operationId":"cancel_invoice_api_v1_invoices__invoice_id__cancel_post","parameters":[{"name":"invoice_id","in":"path","required":true,"schema":{"type":"integer","title":"Invoice Id"}},{"name":"X-API-Key","in":"header","required":false,"schema":{"anyOf":[{"type":"string"},{"type":"null"}],"title":"X-Api-Key"}}],"responses":{"200":{"description":"Successful Response","content":{"application/json":{"schema":{"$ref":"#/components/schemas/InvoiceOut"}}}},"422":{"description":"Validation Error","content":{"application/json":{"schema":{"$ref":"#/components/schemas/HTTPValidationError"}}}}}}},"/api/v1/invoices/{invoice_id}/refund":{"post":{"tags":["Invoices"],"summary":"Қайтару жасау","operationId":"create_refund_api_v1_invoices__invoice_id__refund_post","parameters":[{"name":"invoice_id","in":"path","required":true,"schema":{"type":"integer","title":"Invoice Id"}},{"name":"X-API-Key","in":"header","required":false,"schema":{"anyOf":[{"type":"string"},{"type":"null"}],"title":"X-Api-Key"}}],"requestBody":{"required":true,"content":{"application/json":{"schema":{"$ref":"#/components/schemas/CreateRefundRequest"}}}},"responses":{"201":{"description":"Successful Response","content":{"application/json":{"schema":{"$ref":"#/components/schemas/RefundOut"}}}},"422":{"description":"Validation Error","content":{"application/json":{"schema":{"$ref":"#/components/schemas/HTTPValidationError"}}}}}}},"/api/v1/invoices/{invoice_id}/refunds":{"get":{"tags":["Invoices"],"summary":"Шот қайтарулары","operationId":"list_invoice_refunds_api_v1_invoices__invoice_id__refunds_get","parameters":[{"name":"invoice_id","in":"path","required":true,"schema":{"type":"integer","title":"Invoice Id"}},{"name":"X-API-Key","in":"header","required":false,"schema":{"anyOf":[{"type":"string"},{"type":"null"}],"title":"X-Api-Key"}}],"responses":{"200":{"description":"Successful Response","content":{"application/json":{"schema":{"type":"array","items":{"$ref":"#/components/schemas/RefundOut"},"title":"Response List Invoice Refunds Api V1 Invoices  Invoice Id  Refunds Get"}}}},"422":{"description":"Validation Error","content":{"application/json":{"schema":{"$ref":"#/components/schemas/HTTPValidationError"}}}}}}},"/api/v1/invoices/{invoice_id}/simulate":{"post":{"tags":["Invoices"],"summary":"Төлемді имитациялау (тек sandbox)","description":"Шотты қалаған күйге көшіреді — интеграцияны Kaspi-сіз тексеру үшін.\n\nТек `KASPI_DRIVER=mock` режимінде жұмыс істейді. Нақты Kaspi-мен бұл\nэндпоинт әдейі жабық: өндірісте төлем күйін қолмен өзгерту — есепті\nбұзудың ең қысқа жолы.","operationId":"simulate_status_api_v1_invoices__invoice_id__simulate_post","parameters":[{"name":"invoice_id","in":"path","required":true,"schema":{"type":"integer","title":"Invoice Id"}},{"name":"state","in":"query","required":true,"schema":{"enum":["paid","cancelled","expired","error"],"type":"string","title":"State"}},{"name":"X-API-Key","in":"header","required":false,"schema":{"anyOf":[{"type":"string"},{"type":"null"}],"title":"X-Api-Key"}}],"responses":{"200":{"description":"Successful Response","content":{"application/json":{"schema":{"$ref":"#/components/schemas/InvoiceOut"}}}},"422":{"description":"Validation Error","content":{"application/json":{"schema":{"$ref":"#/components/schemas/HTTPValidationError"}}}}}}},"/api/v1/invoices/check-client":{"post":{"tags":["Invoices"],"summary":"Нөмірді Kaspi-де тексеру","description":"Шот шығармас бұрын нөмірдің Kaspi-де бар-жоғын білуге болады.","operationId":"check_client_api_v1_invoices_check_client_post","parameters":[{"name":"phone","in":"query","required":true,"schema":{"type":"string","minLength":10,"description":"Кез келген пішінде","title":"Phone"},"description":"Кез келген пішінде"},{"name":"X-API-Key","in":"header","required":false,"schema":{"anyOf":[{"type":"string"},{"type":"null"}],"title":"X-Api-Key"}}],"responses":{"200":{"description":"Successful Response","content":{"application/json":{"schema":{"$ref":"#/components/schemas/ClientCheckResponse"}}}},"422":{"description":"Validation Error","content":{"application/json":{"schema":{"$ref":"#/components/schemas/HTTPValidationError"}}}}}}},"/api/v1/static-qr":{"post":{"tags":["Static QR"],"summary":"Тұрақты QR жасау","description":"Қағазға басуға жарайтын сілтеме.\n\nKaspi-ге дәл қазір сұраныс кетпейді: нақты QR төлеуші сілтемені ашқанда\nжасалады, сондықтан басылған сурет ешқашан ескірмейді.","operationId":"create_static_qr_api_v1_static_qr_post","parameters":[{"name":"X-API-Key","in":"header","required":false,"schema":{"anyOf":[{"type":"string"},{"type":"null"}],"title":"X-Api-Key"}}],"requestBody":{"required":true,"content":{"application/json":{"schema":{"$ref":"#/components/schemas/CreateStaticQrRequest"}}}},"responses":{"201":{"description":"Successful Response","content":{"application/json":{"schema":{"$ref":"#/components/schemas/StaticQrOut"}}}},"422":{"description":"Validation Error","content":{"application/json":{"schema":{"$ref":"#/components/schemas/HTTPValidationError"}}}}}},"get":{"tags":["Static QR"],"summary":"Тұрақты QR тізімі","operationId":"list_static_qr_api_v1_static_qr_get","parameters":[{"name":"page","in":"query","required":false,"schema":{"type":"integer","minimum":1,"default":1,"title":"Page"}},{"name":"per_page","in":"query","required":false,"schema":{"type":"integer","maximum":100,"minimum":1,"default":25,"title":"Per Page"}},{"name":"status","in":"query","required":false,"schema":{"anyOf":[{"type":"string"},{"type":"null"}],"title":"Status"}},{"name":"X-API-Key","in":"header","required":false,"schema":{"anyOf":[{"type":"string"},{"type":"null"}],"title":"X-Api-Key"}}],"responses":{"200":{"description":"Successful Response","content":{"application/json":{"schema":{"$ref":"#/components/schemas/Page_StaticQrOut_"}}}},"422":{"description":"Validation Error","content":{"application/json":{"schema":{"$ref":"#/components/schemas/HTTPValidationError"}}}}}}},"/api/v1/static-qr/{code_id}":{"get":{"tags":["Static QR"],"summary":"Тұрақты QR-ды алу","operationId":"get_static_qr_api_v1_static_qr__code_id__get","parameters":[{"name":"code_id","in":"path","required":true,"schema":{"type":"integer","title":"Code Id"}},{"name":"X-API-Key","in":"header","required":false,"schema":{"anyOf":[{"type":"string"},{"type":"null"}],"title":"X-Api-Key"}}],"responses":{"200":{"description":"Successful Response","content":{"application/json":{"schema":{"$ref":"#/components/schemas/StaticQrOut"}}}},"422":{"description":"Validation Error","content":{"application/json":{"schema":{"$ref":"#/components/schemas/HTTPValidationError"}}}}}},"delete":{"tags":["Static QR"],"summary":"Тұрақты QR-ды өшіру","operationId":"disable_static_qr_api_v1_static_qr__code_id__delete","parameters":[{"name":"code_id","in":"path","required":true,"schema":{"type":"integer","title":"Code Id"}},{"name":"X-API-Key","in":"header","required":false,"schema":{"anyOf":[{"type":"string"},{"type":"null"}],"title":"X-Api-Key"}}],"responses":{"200":{"description":"Successful Response","content":{"application/json":{"schema":{"$ref":"#/components/schemas/StaticQrOut"}}}},"422":{"description":"Validation Error","content":{"application/json":{"schema":{"$ref":"#/components/schemas/HTTPValidationError"}}}}}}},"/api/v1/static-qr/{code_id}/print.svg":{"get":{"tags":["Static QR"],"summary":"Басып шығаруға арналған SVG","description":"Векторлық нұсқа — қандай өлшемде басылса да анық қалады.","operationId":"static_qr_svg_api_v1_static_qr__code_id__print_svg_get","parameters":[{"name":"code_id","in":"path","required":true,"schema":{"type":"integer","title":"Code Id"}},{"name":"X-API-Key","in":"header","required":false,"schema":{"anyOf":[{"type":"string"},{"type":"null"}],"title":"X-Api-Key"}}],"responses":{"200":{"description":"Successful Response","content":{"application/json":{"schema":{}}}},"422":{"description":"Validation Error","content":{"application/json":{"schema":{"$ref":"#/components/schemas/HTTPValidationError"}}}}}}},"/api/v1/refunds":{"get":{"tags":["Refunds"],"summary":"Барлық қайтару","operationId":"list_refunds_api_v1_refunds_get","parameters":[{"name":"page","in":"query","required":false,"schema":{"type":"integer","minimum":1,"default":1,"title":"Page"}},{"name":"per_page","in":"query","required":false,"schema":{"type":"integer","maximum":100,"minimum":1,"default":25,"title":"Per Page"}},{"name":"status","in":"query","required":false,"schema":{"anyOf":[{"type":"string"},{"type":"null"}],"title":"Status"}},{"name":"X-API-Key","in":"header","required":false,"schema":{"anyOf":[{"type":"string"},{"type":"null"}],"title":"X-Api-Key"}}],"responses":{"200":{"description":"Successful Response","content":{"application/json":{"schema":{"$ref":"#/components/schemas/Page_RefundOut_"}}}},"422":{"description":"Validation Error","content":{"application/json":{"schema":{"$ref":"#/components/schemas/HTTPValidationError"}}}}}}},"/api/v1/subscriptions":{"post":{"tags":["Subscriptions"],"summary":"Жазылым құру","description":"Қайталанатын шот құрады.\n\n`starts_at` берілмесе, бірінші шот бірден шығады (фондық жұмысшы\nбес минут ішінде іске қосады).","operationId":"create_subscription_api_v1_subscriptions_post","parameters":[{"name":"X-API-Key","in":"header","required":false,"schema":{"anyOf":[{"type":"string"},{"type":"null"}],"title":"X-Api-Key"}}],"requestBody":{"required":true,"content":{"application/json":{"schema":{"$ref":"#/components/schemas/CreateSubscriptionRequest"}}}},"responses":{"201":{"description":"Successful Response","content":{"application/json":{"schema":{"$ref":"#/components/schemas/SubscriptionOut"}}}},"422":{"description":"Validation Error","content":{"application/json":{"schema":{"$ref":"#/components/schemas/HTTPValidationError"}}}}}},"get":{"tags":["Subscriptions"],"summary":"Жазылымдар тізімі","operationId":"list_subscriptions_api_v1_subscriptions_get","parameters":[{"name":"page","in":"query","required":false,"schema":{"type":"integer","minimum":1,"default":1,"title":"Page"}},{"name":"per_page","in":"query","required":false,"schema":{"type":"integer","maximum":100,"minimum":1,"default":25,"title":"Per Page"}},{"name":"status","in":"query","required":false,"schema":{"anyOf":[{"type":"string"},{"type":"null"}],"title":"Status"}},{"name":"phone","in":"query","required":false,"schema":{"anyOf":[{"type":"string"},{"type":"null"}],"title":"Phone"}},{"name":"X-API-Key","in":"header","required":false,"schema":{"anyOf":[{"type":"string"},{"type":"null"}],"title":"X-Api-Key"}}],"responses":{"200":{"description":"Successful Response","content":{"application/json":{"schema":{"$ref":"#/components/schemas/Page_SubscriptionOut_"}}}},"422":{"description":"Validation Error","content":{"application/json":{"schema":{"$ref":"#/components/schemas/HTTPValidationError"}}}}}}},"/api/v1/subscriptions/{subscription_id}":{"get":{"tags":["Subscriptions"],"summary":"Жазылымды алу","operationId":"get_subscription_api_v1_subscriptions__subscription_id__get","parameters":[{"name":"subscription_id","in":"path","required":true,"schema":{"type":"integer","title":"Subscription Id"}},{"name":"X-API-Key","in":"header","required":false,"schema":{"anyOf":[{"type":"string"},{"type":"null"}],"title":"X-Api-Key"}}],"responses":{"200":{"description":"Successful Response","content":{"application/json":{"schema":{"$ref":"#/components/schemas/SubscriptionOut"}}}},"422":{"description":"Validation Error","content":{"application/json":{"schema":{"$ref":"#/components/schemas/HTTPValidationError"}}}}}},"patch":{"tags":["Subscriptions"],"summary":"Жазылымды өзгерту","description":"Нөмір мен аралық өзгертілмейді — олар жазылымның мәнін құрайды.","operationId":"update_subscription_api_v1_subscriptions__subscription_id__patch","parameters":[{"name":"subscription_id","in":"path","required":true,"schema":{"type":"integer","title":"Subscription Id"}},{"name":"X-API-Key","in":"header","required":false,"schema":{"anyOf":[{"type":"string"},{"type":"null"}],"title":"X-Api-Key"}}],"requestBody":{"required":true,"content":{"application/json":{"schema":{"$ref":"#/components/schemas/UpdateSubscriptionRequest"}}}},"responses":{"200":{"description":"Successful Response","content":{"application/json":{"schema":{"$ref":"#/components/schemas/SubscriptionOut"}}}},"422":{"description":"Validation Error","content":{"application/json":{"schema":{"$ref":"#/components/schemas/HTTPValidationError"}}}}}}},"/api/v1/subscriptions/{subscription_id}/pause":{"post":{"tags":["Subscriptions"],"summary":"Тоқтату","operationId":"pause_subscription_api_v1_subscriptions__subscription_id__pause_post","parameters":[{"name":"subscription_id","in":"path","required":true,"schema":{"type":"integer","title":"Subscription Id"}},{"name":"X-API-Key","in":"header","required":false,"schema":{"anyOf":[{"type":"string"},{"type":"null"}],"title":"X-Api-Key"}}],"responses":{"200":{"description":"Successful Response","content":{"application/json":{"schema":{"$ref":"#/components/schemas/SubscriptionOut"}}}},"422":{"description":"Validation Error","content":{"application/json":{"schema":{"$ref":"#/components/schemas/HTTPValidationError"}}}}}}},"/api/v1/subscriptions/{subscription_id}/resume":{"post":{"tags":["Subscriptions"],"summary":"Жалғастыру","description":"Тоқтап тұрған кезде өтіп кеткен циклдар қуылмайды.\n\nӘйтпесе клиент бірден бірнеше шот алар еді.","operationId":"resume_subscription_api_v1_subscriptions__subscription_id__resume_post","parameters":[{"name":"subscription_id","in":"path","required":true,"schema":{"type":"integer","title":"Subscription Id"}},{"name":"X-API-Key","in":"header","required":false,"schema":{"anyOf":[{"type":"string"},{"type":"null"}],"title":"X-Api-Key"}}],"responses":{"200":{"description":"Successful Response","content":{"application/json":{"schema":{"$ref":"#/components/schemas/SubscriptionOut"}}}},"422":{"description":"Validation Error","content":{"application/json":{"schema":{"$ref":"#/components/schemas/HTTPValidationError"}}}}}}},"/api/v1/subscriptions/{subscription_id}/cancel":{"post":{"tags":["Subscriptions"],"summary":"Болдырмау","description":"Қайтымсыз: болдырылған жазылымды қайта қосу мүмкін емес.","operationId":"cancel_subscription_api_v1_subscriptions__subscription_id__cancel_post","parameters":[{"name":"subscription_id","in":"path","required":true,"schema":{"type":"integer","title":"Subscription Id"}},{"name":"X-API-Key","in":"header","required":false,"schema":{"anyOf":[{"type":"string"},{"type":"null"}],"title":"X-Api-Key"}}],"responses":{"200":{"description":"Successful Response","content":{"application/json":{"schema":{"$ref":"#/components/schemas/SubscriptionOut"}}}},"422":{"description":"Validation Error","content":{"application/json":{"schema":{"$ref":"#/components/schemas/HTTPValidationError"}}}}}}},"/api/v1/subscriptions/{subscription_id}/run":{"post":{"tags":["Subscriptions"],"summary":"Шотты дәл қазір шығару","description":"Кезекті шотты күтпей шығарады.\n\nЦиклдің есебі жылжиды, келесі мерзім осы сәттен саналады — сондықтан\nбұл «қосымша шот» емес, «мерзімінен бұрын».","operationId":"run_subscription_api_v1_subscriptions__subscription_id__run_post","parameters":[{"name":"subscription_id","in":"path","required":true,"schema":{"type":"integer","title":"Subscription Id"}},{"name":"X-API-Key","in":"header","required":false,"schema":{"anyOf":[{"type":"string"},{"type":"null"}],"title":"X-Api-Key"}}],"responses":{"200":{"description":"Successful Response","content":{"application/json":{"schema":{"$ref":"#/components/schemas/InvoiceOut"}}}},"422":{"description":"Validation Error","content":{"application/json":{"schema":{"$ref":"#/components/schemas/HTTPValidationError"}}}}}}},"/api/v1/subscriptions/{subscription_id}/invoices":{"get":{"tags":["Subscriptions"],"summary":"Жазылым шоттары","operationId":"subscription_invoices_api_v1_subscriptions__subscription_id__invoices_get","parameters":[{"name":"subscription_id","in":"path","required":true,"schema":{"type":"integer","title":"Subscription Id"}},{"name":"page","in":"query","required":false,"schema":{"type":"integer","minimum":1,"default":1,"title":"Page"}},{"name":"per_page","in":"query","required":false,"schema":{"type":"integer","maximum":100,"minimum":1,"default":25,"title":"Per Page"}},{"name":"X-API-Key","in":"header","required":false,"schema":{"anyOf":[{"type":"string"},{"type":"null"}],"title":"X-Api-Key"}}],"responses":{"200":{"description":"Successful Response","content":{"application/json":{"schema":{"$ref":"#/components/schemas/Page_InvoiceOut_"}}}},"422":{"description":"Validation Error","content":{"application/json":{"schema":{"$ref":"#/components/schemas/HTTPValidationError"}}}}}}},"/api/v1/cashiers":{"get":{"tags":["Cashiers"],"summary":"Кассирлер тізімі","operationId":"list_cashiers_api_v1_cashiers_get","parameters":[{"name":"X-API-Key","in":"header","required":false,"schema":{"anyOf":[{"type":"string"},{"type":"null"}],"title":"X-Api-Key"}}],"responses":{"200":{"description":"Successful Response","content":{"application/json":{"schema":{"type":"array","items":{"$ref":"#/components/schemas/CashierOut"},"title":"Response List Cashiers Api V1 Cashiers Get"}}}},"422":{"description":"Validation Error","content":{"application/json":{"schema":{"$ref":"#/components/schemas/HTTPValidationError"}}}}}},"post":{"tags":["Cashiers"],"summary":"Кассир қосу","description":"Жазбасын жасайды; Kaspi авторизациясы бөлек қадамдармен жүреді.\n\nНөмірі белгілі болса, `connect_or_reuse` арқылы бар кассирді қайта\nқолданған дұрыс — сонда дубль пайда болмайды.","operationId":"create_cashier_api_v1_cashiers_post","parameters":[{"name":"X-API-Key","in":"header","required":false,"schema":{"anyOf":[{"type":"string"},{"type":"null"}],"title":"X-Api-Key"}}],"requestBody":{"required":true,"content":{"application/json":{"schema":{"$ref":"#/components/schemas/CreateCashierRequest"}}}},"responses":{"201":{"description":"Successful Response","content":{"application/json":{"schema":{"$ref":"#/components/schemas/CashierOut"}}}},"422":{"description":"Validation Error","content":{"application/json":{"schema":{"$ref":"#/components/schemas/HTTPValidationError"}}}}}}},"/api/v1/cashiers/{cashier_id}/auth/start":{"post":{"tags":["Cashiers"],"summary":"1-қадам: авторизацияны бастау","operationId":"auth_start_api_v1_cashiers__cashier_id__auth_start_post","parameters":[{"name":"cashier_id","in":"path","required":true,"schema":{"type":"integer","title":"Cashier Id"}},{"name":"X-API-Key","in":"header","required":false,"schema":{"anyOf":[{"type":"string"},{"type":"null"}],"title":"X-Api-Key"}}],"responses":{"200":{"description":"Successful Response","content":{"application/json":{"schema":{"$ref":"#/components/schemas/AuthStartResponse"}}}},"422":{"description":"Validation Error","content":{"application/json":{"schema":{"$ref":"#/components/schemas/HTTPValidationError"}}}}}}},"/api/v1/cashiers/{cashier_id}/auth/phone":{"post":{"tags":["Cashiers"],"summary":"2-қадам: нөмірді жіберу (SMS)","description":"Kaspi осы нөмірге SMS жібереді.","operationId":"auth_phone_api_v1_cashiers__cashier_id__auth_phone_post","parameters":[{"name":"cashier_id","in":"path","required":true,"schema":{"type":"integer","title":"Cashier Id"}},{"name":"X-API-Key","in":"header","required":false,"schema":{"anyOf":[{"type":"string"},{"type":"null"}],"title":"X-Api-Key"}}],"requestBody":{"required":true,"content":{"application/json":{"schema":{"$ref":"#/components/schemas/SendPhoneRequest"}}}},"responses":{"200":{"description":"Successful Response","content":{"application/json":{"schema":{"$ref":"#/components/schemas/AuthStartResponse"}}}},"422":{"description":"Validation Error","content":{"application/json":{"schema":{"$ref":"#/components/schemas/HTTPValidationError"}}}}}}},"/api/v1/cashiers/{cashier_id}/auth/otp":{"post":{"tags":["Cashiers"],"summary":"3-қадам: SMS кодын растау","description":"Қайтымсыз қадам: сәтті болса құрылғы Kaspi-де тіркеледі.","operationId":"auth_otp_api_v1_cashiers__cashier_id__auth_otp_post","parameters":[{"name":"cashier_id","in":"path","required":true,"schema":{"type":"integer","title":"Cashier Id"}},{"name":"X-API-Key","in":"header","required":false,"schema":{"anyOf":[{"type":"string"},{"type":"null"}],"title":"X-Api-Key"}}],"requestBody":{"required":true,"content":{"application/json":{"schema":{"$ref":"#/components/schemas/VerifyOtpRequest"}}}},"responses":{"200":{"description":"Successful Response","content":{"application/json":{"schema":{"$ref":"#/components/schemas/CashierOut"}}}},"422":{"description":"Validation Error","content":{"application/json":{"schema":{"$ref":"#/components/schemas/HTTPValidationError"}}}}}}},"/api/v1/cashiers/{cashier_id}/health":{"get":{"tags":["Cashiers"],"summary":"Сессияны тексеру","operationId":"cashier_health_api_v1_cashiers__cashier_id__health_get","parameters":[{"name":"cashier_id","in":"path","required":true,"schema":{"type":"integer","title":"Cashier Id"}},{"name":"X-API-Key","in":"header","required":false,"schema":{"anyOf":[{"type":"string"},{"type":"null"}],"title":"X-Api-Key"}}],"responses":{"200":{"description":"Successful Response","content":{"application/json":{"schema":{"$ref":"#/components/schemas/ActionResult"}}}},"422":{"description":"Validation Error","content":{"application/json":{"schema":{"$ref":"#/components/schemas/HTTPValidationError"}}}}}}},"/api/v1/cashiers/{cashier_id}/primary":{"post":{"tags":["Cashiers"],"summary":"Негізгі ету","operationId":"set_primary_api_v1_cashiers__cashier_id__primary_post","parameters":[{"name":"cashier_id","in":"path","required":true,"schema":{"type":"integer","title":"Cashier Id"}},{"name":"X-API-Key","in":"header","required":false,"schema":{"anyOf":[{"type":"string"},{"type":"null"}],"title":"X-Api-Key"}}],"responses":{"200":{"description":"Successful Response","content":{"application/json":{"schema":{"$ref":"#/components/schemas/CashierOut"}}}},"422":{"description":"Validation Error","content":{"application/json":{"schema":{"$ref":"#/components/schemas/HTTPValidationError"}}}}}}},"/api/v1/cashiers/{cashier_id}":{"delete":{"tags":["Cashiers"],"summary":"Кассирді өшіру","description":"Кассирді жояды. Kaspi-дегі қызметкер жазбасына тиіспейді.\n\nШоты жоқ кассир толық өшіріледі. Шоты бары өшірілмейді — есептегі\nбайланыс сақталуы керек; оның орнына сессиясы жойылып, нөмірі\nбосатылады, сондықтан сол нөмірді кейін қайта қосуға болады.","operationId":"delete_cashier_api_v1_cashiers__cashier_id__delete","parameters":[{"name":"cashier_id","in":"path","required":true,"schema":{"type":"integer","title":"Cashier Id"}},{"name":"X-API-Key","in":"header","required":false,"schema":{"anyOf":[{"type":"string"},{"type":"null"}],"title":"X-Api-Key"}}],"responses":{"200":{"description":"Successful Response","content":{"application/json":{"schema":{"$ref":"#/components/schemas/ActionResult"}}}},"422":{"description":"Validation Error","content":{"application/json":{"schema":{"$ref":"#/components/schemas/HTTPValidationError"}}}}}}},"/api/v1/webhooks":{"post":{"tags":["Webhooks"],"summary":"Webhook қосу","description":"Құпия кілт **тек осы жауапта** көрсетіледі — сақтап қойыңыз.","operationId":"create_webhook_api_v1_webhooks_post","parameters":[{"name":"X-API-Key","in":"header","required":false,"schema":{"anyOf":[{"type":"string"},{"type":"null"}],"title":"X-Api-Key"}}],"requestBody":{"required":true,"content":{"application/json":{"schema":{"$ref":"#/components/schemas/CreateWebhookRequest"}}}},"responses":{"201":{"description":"Successful Response","content":{"application/json":{"schema":{"$ref":"#/components/schemas/WebhookOut"}}}},"422":{"description":"Validation Error","content":{"application/json":{"schema":{"$ref":"#/components/schemas/HTTPValidationError"}}}}}},"get":{"tags":["Webhooks"],"summary":"Webhook тізімі","operationId":"list_webhooks_api_v1_webhooks_get","parameters":[{"name":"X-API-Key","in":"header","required":false,"schema":{"anyOf":[{"type":"string"},{"type":"null"}],"title":"X-Api-Key"}}],"responses":{"200":{"description":"Successful Response","content":{"application/json":{"schema":{"type":"array","items":{"$ref":"#/components/schemas/WebhookOut"},"title":"Response List Webhooks Api V1 Webhooks Get"}}}},"422":{"description":"Validation Error","content":{"application/json":{"schema":{"$ref":"#/components/schemas/HTTPValidationError"}}}}}}},"/api/v1/webhooks/{webhook_id}/test":{"post":{"tags":["Webhooks"],"summary":"Тексеру хабары","description":"Баптау дұрыс па — бірден көру үшін `ping` жібереді.","operationId":"test_webhook_api_v1_webhooks__webhook_id__test_post","parameters":[{"name":"webhook_id","in":"path","required":true,"schema":{"type":"integer","title":"Webhook Id"}},{"name":"X-API-Key","in":"header","required":false,"schema":{"anyOf":[{"type":"string"},{"type":"null"}],"title":"X-Api-Key"}}],"responses":{"200":{"description":"Successful Response","content":{"application/json":{"schema":{"$ref":"#/components/schemas/DeliveryOut"}}}},"422":{"description":"Validation Error","content":{"application/json":{"schema":{"$ref":"#/components/schemas/HTTPValidationError"}}}}}}},"/api/v1/webhooks/{webhook_id}":{"delete":{"tags":["Webhooks"],"summary":"Webhook өшіру","operationId":"delete_webhook_api_v1_webhooks__webhook_id__delete","parameters":[{"name":"webhook_id","in":"path","required":true,"schema":{"type":"integer","title":"Webhook Id"}},{"name":"X-API-Key","in":"header","required":false,"schema":{"anyOf":[{"type":"string"},{"type":"null"}],"title":"X-Api-Key"}}],"responses":{"200":{"description":"Successful Response","content":{"application/json":{"schema":{"$ref":"#/components/schemas/ActionResult"}}}},"422":{"description":"Validation Error","content":{"application/json":{"schema":{"$ref":"#/components/schemas/HTTPValidationError"}}}}}}},"/api/v1/webhooks/deliveries":{"get":{"tags":["Webhooks"],"summary":"Жеткізу логтары","operationId":"list_deliveries_api_v1_webhooks_deliveries_get","parameters":[{"name":"page","in":"query","required":false,"schema":{"type":"integer","minimum":1,"default":1,"title":"Page"}},{"name":"per_page","in":"query","required":false,"schema":{"type":"integer","maximum":100,"minimum":1,"default":25,"title":"Per Page"}},{"name":"status","in":"query","required":false,"schema":{"anyOf":[{"type":"string"},{"type":"null"}],"title":"Status"}},{"name":"event","in":"query","required":false,"schema":{"anyOf":[{"type":"string"},{"type":"null"}],"title":"Event"}},{"name":"X-API-Key","in":"header","required":false,"schema":{"anyOf":[{"type":"string"},{"type":"null"}],"title":"X-Api-Key"}}],"responses":{"200":{"description":"Successful Response","content":{"application/json":{"schema":{"$ref":"#/components/schemas/Page_DeliveryOut_"}}}},"422":{"description":"Validation Error","content":{"application/json":{"schema":{"$ref":"#/components/schemas/HTTPValidationError"}}}}}}},"/api/v1/webhooks/deliveries/{delivery_id}/retry":{"post":{"tags":["Webhooks"],"summary":"Жеткізуді қайталау","operationId":"retry_delivery_api_v1_webhooks_deliveries__delivery_id__retry_post","parameters":[{"name":"delivery_id","in":"path","required":true,"schema":{"type":"integer","title":"Delivery Id"}},{"name":"X-API-Key","in":"header","required":false,"schema":{"anyOf":[{"type":"string"},{"type":"null"}],"title":"X-Api-Key"}}],"responses":{"200":{"description":"Successful Response","content":{"application/json":{"schema":{"$ref":"#/components/schemas/DeliveryOut"}}}},"422":{"description":"Validation Error","content":{"application/json":{"schema":{"$ref":"#/components/schemas/HTTPValidationError"}}}}}}}},"components":{"schemas":{"ActionResult":{"properties":{"success":{"type":"boolean","title":"Success","default":true},"message":{"anyOf":[{"type":"string"},{"type":"null"}],"title":"Message"},"details":{"anyOf":[{"additionalProperties":true,"type":"object"},{"type":"null"}],"title":"Details"}},"type":"object","title":"ActionResult"},"AuthStartResponse":{"properties":{"cashier_id":{"type":"integer","title":"Cashier Id"},"stage":{"type":"string","title":"Stage"},"expires_at":{"type":"string","format":"date-time","title":"Expires At"}},"type":"object","required":["cashier_id","stage","expires_at"],"title":"AuthStartResponse"},"CashierOut":{"properties":{"id":{"type":"integer","title":"Id"},"label":{"type":"string","title":"Label"},"phone":{"anyOf":[{"type":"string"},{"type":"null"}],"title":"Phone","description":"Маскаланған түрде"},"status":{"type":"string","title":"Status"},"is_primary":{"type":"boolean","title":"Is Primary"},"organization_name":{"anyOf":[{"type":"string"},{"type":"null"}],"title":"Organization Name"},"organization_idn":{"anyOf":[{"type":"string"},{"type":"null"}],"title":"Organization Idn"},"authorized_at":{"anyOf":[{"type":"string","format":"date-time"},{"type":"null"}],"title":"Authorized At"},"last_used_at":{"anyOf":[{"type":"string","format":"date-time"},{"type":"null"}],"title":"Last Used At"},"last_error":{"anyOf":[{"type":"string"},{"type":"null"}],"title":"Last Error"}},"type":"object","required":["id","label","status","is_primary"],"title":"CashierOut"},"ClientCheckResponse":{"properties":{"exists":{"type":"boolean","title":"Exists"},"name":{"anyOf":[{"type":"string"},{"type":"null"}],"title":"Name"},"phone":{"type":"string","title":"Phone"}},"type":"object","required":["exists","phone"],"title":"ClientCheckResponse"},"CreateCashierRequest":{"properties":{"label":{"anyOf":[{"type":"string","maxLength":120,"minLength":2},{"type":"null"}],"title":"Label","description":"Берілмесе «Касса N» деп автоматты қойылады."}},"type":"object","title":"CreateCashierRequest"},"CreateInvoiceRequest":{"properties":{"phone_number":{"type":"string","maxLength":20,"minLength":10,"title":"Phone Number","description":"Кез келген пішінде: `87001234567`, `+7 700 123 45 67`, `7001234567`. Сервер оны Kaspi күтетін түрге келтіреді.","examples":["+7 700 123 45 67"]},"amount":{"anyOf":[{"type":"number","maximum":99999999.0,"exclusiveMinimum":0.0},{"type":"string","pattern":"^(?!^[-+.]*$)[+-]?0*\\d*\\.?\\d*$"}],"title":"Amount","examples":[5000]},"description":{"anyOf":[{"type":"string","maxLength":60},{"type":"null"}],"title":"Description","description":"Клиент Kaspi-де көретін мәтін. Kaspi алғашқы ~60 таңбасын ғана көрсетеді, сондықтан ең маңыздысын басына жазыңыз."},"internal_comment":{"anyOf":[{"type":"string","maxLength":255},{"type":"null"}],"title":"Internal Comment","description":"Тек сіз үшін — Kaspi-ге жіберілмейді, клиент көрмейді."},"external_order_id":{"anyOf":[{"type":"string","maxLength":255},{"type":"null"}],"title":"External Order Id"},"idempotency_key":{"anyOf":[{"type":"string","maxLength":191},{"type":"null"}],"title":"Idempotency Key","description":"Қайталанған сұраныс дубль шот жасамауы үшін. Сол кілтпен қайта жіберсеңіз — 409. Бұрынғысы сәтсіз бітсе, жаңасы жасалады."},"cashier_id":{"anyOf":[{"type":"integer"},{"type":"null"}],"title":"Cashier Id","description":"Бірнеше кассир болса — қайсысы. Әдепкі: негізгі."}},"type":"object","required":["phone_number","amount"],"title":"CreateInvoiceRequest","description":"Телефон нөмірі бойынша шот.\n\nНөмір `8XXXXXXXXXX` пішімінде — Kaspi осылай күтеді."},"CreateQrInvoiceRequest":{"properties":{"amount":{"anyOf":[{"type":"number","maximum":99999999.0,"exclusiveMinimum":0.0},{"type":"string","pattern":"^(?!^[-+.]*$)[+-]?0*\\d*\\.?\\d*$"}],"title":"Amount","examples":[5000]},"description":{"anyOf":[{"type":"string","maxLength":100},{"type":"null"}],"title":"Description"},"internal_comment":{"anyOf":[{"type":"string","maxLength":255},{"type":"null"}],"title":"Internal Comment"},"external_order_id":{"anyOf":[{"type":"string","maxLength":255},{"type":"null"}],"title":"External Order Id"},"idempotency_key":{"anyOf":[{"type":"string","maxLength":191},{"type":"null"}],"title":"Idempotency Key"},"cashier_id":{"anyOf":[{"type":"integer"},{"type":"null"}],"title":"Cashier Id"}},"type":"object","required":["amount"],"title":"CreateQrInvoiceRequest","description":"QR-шот — сканерлеуге бірнеше минут беріледі."},"CreateRefundRequest":{"properties":{"amount":{"anyOf":[{"type":"number","exclusiveMinimum":0.0},{"type":"string","pattern":"^(?!^[-+.]*$)[+-]?0*\\d*\\.?\\d*$"},{"type":"null"}],"title":"Amount","description":"Берілмесе — қалдықтың барлығы қайтарылады."},"reason":{"anyOf":[{"type":"string","maxLength":255},{"type":"null"}],"title":"Reason"},"idempotency_key":{"anyOf":[{"type":"string","maxLength":191},{"type":"null"}],"title":"Idempotency Key"}},"type":"object","title":"CreateRefundRequest"},"CreateStaticQrRequest":{"properties":{"amount":{"anyOf":[{"type":"number","maximum":99999999.0,"exclusiveMinimum":0.0},{"type":"string","pattern":"^(?!^[-+.]*$)[+-]?0*\\d*\\.?\\d*$"},{"type":"null"}],"title":"Amount","description":"Берілмесе — төлеуші соманы өзі енгізеді."},"description":{"anyOf":[{"type":"string","maxLength":100},{"type":"null"}],"title":"Description"},"internal_comment":{"anyOf":[{"type":"string","maxLength":255},{"type":"null"}],"title":"Internal Comment"},"external_order_id":{"anyOf":[{"type":"string","maxLength":255},{"type":"null"}],"title":"External Order Id"},"idempotency_key":{"anyOf":[{"type":"string","maxLength":191},{"type":"null"}],"title":"Idempotency Key"},"cashier_id":{"anyOf":[{"type":"integer"},{"type":"null"}],"title":"Cashier Id"},"single_use":{"type":"boolean","title":"Single Use","description":"Бір рет төленгеннен кейін сілтеме жабылады.","default":true},"expires_at":{"anyOf":[{"type":"string","format":"date-time"},{"type":"null"}],"title":"Expires At"}},"type":"object","title":"CreateStaticQrRequest"},"CreateSubscriptionRequest":{"properties":{"name":{"type":"string","maxLength":200,"minLength":2,"title":"Name","examples":["Айлық жазылым"]},"phone":{"type":"string","maxLength":20,"minLength":10,"title":"Phone","examples":["+7 747 411 50 49"]},"amount":{"anyOf":[{"type":"number","maximum":99999999.0,"exclusiveMinimum":0.0},{"type":"string","pattern":"^(?!^[-+.]*$)[+-]?0*\\d*\\.?\\d*$"}],"title":"Amount","examples":[15000]},"interval_months":{"type":"integer","maximum":12.0,"minimum":1.0,"title":"Interval Months","description":"Шоттар арасындағы айлар саны: 1 — ай сайын, 3 — тоқсан сайын, 12 — жыл сайын.","examples":[1]},"description":{"anyOf":[{"type":"string","maxLength":60},{"type":"null"}],"title":"Description"},"external_order_id":{"anyOf":[{"type":"string","maxLength":255},{"type":"null"}],"title":"External Order Id"},"cashier_id":{"anyOf":[{"type":"integer"},{"type":"null"}],"title":"Cashier Id"},"starts_at":{"anyOf":[{"type":"string","format":"date-time"},{"type":"null"}],"title":"Starts At","description":"Берілмесе — бірінші шот бірден шығады."},"ends_at":{"anyOf":[{"type":"string","format":"date-time"},{"type":"null"}],"title":"Ends At"},"max_cycles":{"anyOf":[{"type":"integer","minimum":1.0},{"type":"null"}],"title":"Max Cycles"}},"type":"object","required":["name","phone","amount","interval_months"],"title":"CreateSubscriptionRequest","description":"Қайталанатын шот.\n\n⚠️ Бұл автотөлем емес: Kaspi ақшаны өз бетінше шеше алмайды. Жазылым —\nшоттың автоматты қайта шығуы, ал клиент әр жолы қосымшада растайды."},"CreateWebhookRequest":{"properties":{"url":{"type":"string","maxLength":500,"title":"Url","examples":["https://example.com/qajetpay/webhook"]},"description":{"anyOf":[{"type":"string","maxLength":200},{"type":"null"}],"title":"Description"},"events":{"items":{"type":"string"},"type":"array","title":"Events","description":"Бос тізім — барлық оқиға."}},"type":"object","required":["url"],"title":"CreateWebhookRequest"},"DeliveryOut":{"properties":{"id":{"type":"integer","title":"Id"},"endpoint_id":{"type":"integer","title":"Endpoint Id"},"event":{"type":"string","title":"Event"},"event_id":{"type":"string","title":"Event Id"},"invoice_id":{"anyOf":[{"type":"integer"},{"type":"null"}],"title":"Invoice Id"},"status":{"type":"string","title":"Status"},"attempts":{"type":"integer","title":"Attempts"},"last_status_code":{"anyOf":[{"type":"integer"},{"type":"null"}],"title":"Last Status Code"},"last_error":{"anyOf":[{"type":"string"},{"type":"null"}],"title":"Last Error"},"next_attempt_at":{"anyOf":[{"type":"string","format":"date-time"},{"type":"null"}],"title":"Next Attempt At"},"delivered_at":{"anyOf":[{"type":"string","format":"date-time"},{"type":"null"}],"title":"Delivered At"},"created_at":{"type":"string","format":"date-time","title":"Created At"},"payload":{"anyOf":[{"additionalProperties":true,"type":"object"},{"type":"null"}],"title":"Payload"}},"type":"object","required":["id","endpoint_id","event","event_id","status","attempts","created_at"],"title":"DeliveryOut"},"HTTPValidationError":{"properties":{"detail":{"items":{"$ref":"#/components/schemas/ValidationError"},"type":"array","title":"Detail"}},"type":"object","title":"HTTPValidationError"},"InvoiceOut":{"properties":{"id":{"type":"integer","title":"Id"},"kind":{"type":"string","title":"Kind"},"status":{"type":"string","title":"Status"},"amount":{"type":"string","pattern":"^(?!^[-+.]*$)[+-]?0*\\d*\\.?\\d*$","title":"Amount"},"description":{"anyOf":[{"type":"string"},{"type":"null"}],"title":"Description"},"internal_comment":{"anyOf":[{"type":"string"},{"type":"null"}],"title":"Internal Comment"},"external_order_id":{"anyOf":[{"type":"string"},{"type":"null"}],"title":"External Order Id"},"phone":{"anyOf":[{"type":"string"},{"type":"null"}],"title":"Phone"},"client_name":{"anyOf":[{"type":"string"},{"type":"null"}],"title":"Client Name"},"kaspi_operation_id":{"anyOf":[{"type":"string"},{"type":"null"}],"title":"Kaspi Operation Id"},"kaspi_status":{"anyOf":[{"type":"string"},{"type":"null"}],"title":"Kaspi Status"},"receipt_url":{"anyOf":[{"type":"string"},{"type":"null"}],"title":"Receipt Url"},"qr_token":{"anyOf":[{"type":"string"},{"type":"null"}],"title":"Qr Token"},"payment_url":{"anyOf":[{"type":"string"},{"type":"null"}],"title":"Payment Url"},"qr_image_url":{"anyOf":[{"type":"string"},{"type":"null"}],"title":"Qr Image Url"},"qr_expires_at":{"anyOf":[{"type":"string","format":"date-time"},{"type":"null"}],"title":"Qr Expires At"},"total_refunded":{"type":"string","pattern":"^(?!^[-+.]*$)[+-]?0*\\d*\\.?\\d*$","title":"Total Refunded"},"is_fully_refunded":{"type":"boolean","title":"Is Fully Refunded"},"available_for_refund":{"type":"string","pattern":"^(?!^[-+.]*$)[+-]?0*\\d*\\.?\\d*$","title":"Available For Refund"},"error_code":{"anyOf":[{"type":"string"},{"type":"null"}],"title":"Error Code"},"error_message":{"anyOf":[{"type":"string"},{"type":"null"}],"title":"Error Message"},"is_sandbox":{"type":"boolean","title":"Is Sandbox"},"created_at":{"type":"string","format":"date-time","title":"Created At"},"expires_at":{"anyOf":[{"type":"string","format":"date-time"},{"type":"null"}],"title":"Expires At"},"paid_at":{"anyOf":[{"type":"string","format":"date-time"},{"type":"null"}],"title":"Paid At"},"cancelled_at":{"anyOf":[{"type":"string","format":"date-time"},{"type":"null"}],"title":"Cancelled At"},"expired_at":{"anyOf":[{"type":"string","format":"date-time"},{"type":"null"}],"title":"Expired At"}},"type":"object","required":["id","kind","status","amount","total_refunded","is_fully_refunded","available_for_refund","is_sandbox","created_at"],"title":"InvoiceOut"},"InvoiceStats":{"properties":{"total":{"type":"integer","title":"Total"},"paid":{"type":"integer","title":"Paid"},"pending":{"type":"integer","title":"Pending"},"failed":{"type":"integer","title":"Failed"},"total_amount":{"type":"string","pattern":"^(?!^[-+.]*$)[+-]?0*\\d*\\.?\\d*$","title":"Total Amount"},"paid_amount":{"type":"string","pattern":"^(?!^[-+.]*$)[+-]?0*\\d*\\.?\\d*$","title":"Paid Amount"},"refunded_amount":{"type":"string","pattern":"^(?!^[-+.]*$)[+-]?0*\\d*\\.?\\d*$","title":"Refunded Amount"}},"type":"object","required":["total","paid","pending","failed","total_amount","paid_amount","refunded_amount"],"title":"InvoiceStats"},"PageMeta":{"properties":{"page":{"type":"integer","title":"Page"},"per_page":{"type":"integer","title":"Per Page"},"total":{"type":"integer","title":"Total"},"total_pages":{"type":"integer","title":"Total Pages"}},"type":"object","required":["page","per_page","total","total_pages"],"title":"PageMeta"},"Page_DeliveryOut_":{"properties":{"data":{"items":{"$ref":"#/components/schemas/DeliveryOut"},"type":"array","title":"Data"},"meta":{"$ref":"#/components/schemas/PageMeta"}},"type":"object","required":["data","meta"],"title":"Page[DeliveryOut]"},"Page_InvoiceOut_":{"properties":{"data":{"items":{"$ref":"#/components/schemas/InvoiceOut"},"type":"array","title":"Data"},"meta":{"$ref":"#/components/schemas/PageMeta"}},"type":"object","required":["data","meta"],"title":"Page[InvoiceOut]"},"Page_RefundOut_":{"properties":{"data":{"items":{"$ref":"#/components/schemas/RefundOut"},"type":"array","title":"Data"},"meta":{"$ref":"#/components/schemas/PageMeta"}},"type":"object","required":["data","meta"],"title":"Page[RefundOut]"},"Page_StaticQrOut_":{"properties":{"data":{"items":{"$ref":"#/components/schemas/StaticQrOut"},"type":"array","title":"Data"},"meta":{"$ref":"#/components/schemas/PageMeta"}},"type":"object","required":["data","meta"],"title":"Page[StaticQrOut]"},"Page_SubscriptionOut_":{"properties":{"data":{"items":{"$ref":"#/components/schemas/SubscriptionOut"},"type":"array","title":"Data"},"meta":{"$ref":"#/components/schemas/PageMeta"}},"type":"object","required":["data","meta"],"title":"Page[SubscriptionOut]"},"RefundOut":{"properties":{"id":{"type":"integer","title":"Id"},"invoice_id":{"type":"integer","title":"Invoice Id"},"amount":{"type":"string","pattern":"^(?!^[-+.]*$)[+-]?0*\\d*\\.?\\d*$","title":"Amount"},"status":{"type":"string","title":"Status"},"reason":{"anyOf":[{"type":"string"},{"type":"null"}],"title":"Reason"},"kaspi_refund_id":{"anyOf":[{"type":"string"},{"type":"null"}],"title":"Kaspi Refund Id"},"error_code":{"anyOf":[{"type":"string"},{"type":"null"}],"title":"Error Code"},"error_message":{"anyOf":[{"type":"string"},{"type":"null"}],"title":"Error Message"},"created_at":{"type":"string","format":"date-time","title":"Created At"},"completed_at":{"anyOf":[{"type":"string","format":"date-time"},{"type":"null"}],"title":"Completed At"}},"type":"object","required":["id","invoice_id","amount","status","created_at"],"title":"RefundOut"},"SendPhoneRequest":{"properties":{"phone":{"type":"string","maxLength":20,"minLength":10,"title":"Phone","examples":["+7 747 411 50 49"]}},"type":"object","required":["phone"],"title":"SendPhoneRequest","description":"Нөмір кез келген пішінде: `8747…`, `+7747…`, `7747…`.\n\nСервер оны `7XXXXXXXXXX` түріне келтіреді, сондықтан бір нөмірді екі\nтүрлі жазғаныңыз үшін екі кассир пайда болмайды."},"StaticQrOut":{"properties":{"id":{"type":"integer","title":"Id"},"token":{"type":"string","title":"Token"},"payment_url":{"type":"string","title":"Payment Url"},"qr_image_url":{"type":"string","title":"Qr Image Url"},"amount":{"anyOf":[{"type":"string","pattern":"^(?!^[-+.]*$)[+-]?0*\\d*\\.?\\d*$"},{"type":"null"}],"title":"Amount"},"description":{"anyOf":[{"type":"string"},{"type":"null"}],"title":"Description"},"internal_comment":{"anyOf":[{"type":"string"},{"type":"null"}],"title":"Internal Comment"},"external_order_id":{"anyOf":[{"type":"string"},{"type":"null"}],"title":"External Order Id"},"single_use":{"type":"boolean","title":"Single Use"},"status":{"type":"string","title":"Status"},"scan_count":{"type":"integer","title":"Scan Count"},"created_at":{"type":"string","format":"date-time","title":"Created At"},"expires_at":{"anyOf":[{"type":"string","format":"date-time"},{"type":"null"}],"title":"Expires At"},"last_scanned_at":{"anyOf":[{"type":"string","format":"date-time"},{"type":"null"}],"title":"Last Scanned At"},"paid_invoice_id":{"anyOf":[{"type":"integer"},{"type":"null"}],"title":"Paid Invoice Id"}},"type":"object","required":["id","token","payment_url","qr_image_url","single_use","status","scan_count","created_at"],"title":"StaticQrOut"},"StatusResponse":{"properties":{"status":{"type":"string","title":"Status","default":"ok"},"version":{"type":"string","title":"Version"},"driver":{"type":"string","title":"Driver"},"time":{"type":"string","title":"Time"}},"type":"object","required":["version","driver","time"],"title":"StatusResponse"},"SubscriptionOut":{"properties":{"id":{"type":"integer","title":"Id"},"name":{"type":"string","title":"Name"},"phone":{"type":"string","title":"Phone"},"amount":{"type":"string","pattern":"^(?!^[-+.]*$)[+-]?0*\\d*\\.?\\d*$","title":"Amount"},"interval_months":{"type":"integer","title":"Interval Months"},"interval_label":{"type":"string","title":"Interval Label"},"status":{"type":"string","title":"Status"},"description":{"anyOf":[{"type":"string"},{"type":"null"}],"title":"Description"},"external_order_id":{"anyOf":[{"type":"string"},{"type":"null"}],"title":"External Order Id"},"next_invoice_at":{"type":"string","format":"date-time","title":"Next Invoice At"},"last_invoice_at":{"anyOf":[{"type":"string","format":"date-time"},{"type":"null"}],"title":"Last Invoice At"},"starts_at":{"anyOf":[{"type":"string","format":"date-time"},{"type":"null"}],"title":"Starts At"},"ends_at":{"anyOf":[{"type":"string","format":"date-time"},{"type":"null"}],"title":"Ends At"},"max_cycles":{"anyOf":[{"type":"integer"},{"type":"null"}],"title":"Max Cycles"},"cycles_done":{"type":"integer","title":"Cycles Done"},"invoices_paid":{"type":"integer","title":"Invoices Paid"},"last_error":{"anyOf":[{"type":"string"},{"type":"null"}],"title":"Last Error"},"consecutive_failures":{"type":"integer","title":"Consecutive Failures"},"created_at":{"type":"string","format":"date-time","title":"Created At"}},"type":"object","required":["id","name","phone","amount","interval_months","interval_label","status","next_invoice_at","cycles_done","invoices_paid","consecutive_failures","created_at"],"title":"SubscriptionOut"},"UpdateInvoiceRequest":{"properties":{"internal_comment":{"anyOf":[{"type":"string","maxLength":255},{"type":"null"}],"title":"Internal Comment"}},"type":"object","title":"UpdateInvoiceRequest"},"UpdateSubscriptionRequest":{"properties":{"name":{"anyOf":[{"type":"string","maxLength":200,"minLength":2},{"type":"null"}],"title":"Name"},"amount":{"anyOf":[{"type":"number","maximum":99999999.0,"exclusiveMinimum":0.0},{"type":"string","pattern":"^(?!^[-+.]*$)[+-]?0*\\d*\\.?\\d*$"},{"type":"null"}],"title":"Amount"},"description":{"anyOf":[{"type":"string","maxLength":60},{"type":"null"}],"title":"Description"},"external_order_id":{"anyOf":[{"type":"string","maxLength":255},{"type":"null"}],"title":"External Order Id"},"ends_at":{"anyOf":[{"type":"string","format":"date-time"},{"type":"null"}],"title":"Ends At"},"max_cycles":{"anyOf":[{"type":"integer","minimum":1.0},{"type":"null"}],"title":"Max Cycles"}},"type":"object","title":"UpdateSubscriptionRequest","description":"Тек берілген өрістер өзгереді."},"ValidationError":{"properties":{"loc":{"items":{"anyOf":[{"type":"string"},{"type":"integer"}]},"type":"array","title":"Location"},"msg":{"type":"string","title":"Message"},"type":{"type":"string","title":"Error Type"},"input":{"title":"Input"},"ctx":{"type":"object","title":"Context"}},"type":"object","required":["loc","msg","type"],"title":"ValidationError"},"VerifyOtpRequest":{"properties":{"otp":{"type":"string","maxLength":6,"minLength":4,"pattern":"^\\d{4,6}$","title":"Otp"}},"type":"object","required":["otp"],"title":"VerifyOtpRequest"},"WebhookOut":{"properties":{"id":{"type":"integer","title":"Id"},"url":{"type":"string","title":"Url"},"description":{"anyOf":[{"type":"string"},{"type":"null"}],"title":"Description"},"events":{"items":{"type":"string"},"type":"array","title":"Events"},"is_active":{"type":"boolean","title":"Is Active"},"secret":{"anyOf":[{"type":"string"},{"type":"null"}],"title":"Secret","description":"Тек жасалған сәтте қайтарылады"},"last_success_at":{"anyOf":[{"type":"string","format":"date-time"},{"type":"null"}],"title":"Last Success At"},"last_failure_at":{"anyOf":[{"type":"string","format":"date-time"},{"type":"null"}],"title":"Last Failure At"},"consecutive_failures":{"type":"integer","title":"Consecutive Failures"},"created_at":{"type":"string","format":"date-time","title":"Created At"}},"type":"object","required":["id","url","events","is_active","consecutive_failures","created_at"],"title":"WebhookOut"}}}}