{"openapi":"3.1.0","info":{"title":"Atlas Payments API","version":"1.0.0"},"paths":{"/v1/payments":{"post":{"tags":["payments"],"summary":"Post Payment","operationId":"post_payment_v1_payments_post","parameters":[{"name":"idempotency-key","in":"header","required":false,"schema":{"anyOf":[{"type":"string","maxLength":128},{"type":"null"}],"title":"Idempotency-Key"}},{"name":"authorization","in":"header","required":false,"schema":{"anyOf":[{"type":"string"},{"type":"null"}],"title":"Authorization"}}],"requestBody":{"required":true,"content":{"application/json":{"schema":{"$ref":"#/components/schemas/PaymentCreate"}}}},"responses":{"200":{"description":"Successful Response","content":{"application/json":{"schema":{"$ref":"#/components/schemas/PaymentOut"}}}},"422":{"description":"Validation Error","content":{"application/json":{"schema":{"$ref":"#/components/schemas/HTTPValidationError"}}}}}},"get":{"tags":["payments"],"summary":"List Payments","operationId":"list_payments_v1_payments_get","parameters":[{"name":"orderId","in":"query","required":false,"schema":{"anyOf":[{"type":"string"},{"type":"null"}],"title":"Orderid"}},{"name":"status","in":"query","required":false,"schema":{"anyOf":[{"type":"string"},{"type":"null"}],"title":"Status"}},{"name":"limit","in":"query","required":false,"schema":{"type":"integer","maximum":100,"minimum":1,"default":50,"title":"Limit"}},{"name":"offset","in":"query","required":false,"schema":{"type":"integer","minimum":0,"default":0,"title":"Offset"}},{"name":"authorization","in":"header","required":false,"schema":{"anyOf":[{"type":"string"},{"type":"null"}],"title":"Authorization"}}],"responses":{"200":{"description":"Successful Response","content":{"application/json":{"schema":{"type":"array","items":{"$ref":"#/components/schemas/PaymentOut"},"title":"Response List Payments V1 Payments Get"}}}},"422":{"description":"Validation Error","content":{"application/json":{"schema":{"$ref":"#/components/schemas/HTTPValidationError"}}}}}}},"/v1/payments/{payment_id}":{"get":{"tags":["payments"],"summary":"Get Payment","operationId":"get_payment_v1_payments__payment_id__get","parameters":[{"name":"payment_id","in":"path","required":true,"schema":{"type":"string","title":"Payment Id"}},{"name":"authorization","in":"header","required":false,"schema":{"anyOf":[{"type":"string"},{"type":"null"}],"title":"Authorization"}}],"responses":{"200":{"description":"Successful Response","content":{"application/json":{"schema":{"$ref":"#/components/schemas/PaymentOut"}}}},"422":{"description":"Validation Error","content":{"application/json":{"schema":{"$ref":"#/components/schemas/HTTPValidationError"}}}}}}},"/v1/balance":{"get":{"tags":["balance"],"summary":"Balance","operationId":"balance_v1_balance_get","parameters":[{"name":"authorization","in":"header","required":false,"schema":{"anyOf":[{"type":"string"},{"type":"null"}],"title":"Authorization"}}],"responses":{"200":{"description":"Successful Response","content":{"application/json":{"schema":{"$ref":"#/components/schemas/BalanceOut"}}}},"422":{"description":"Validation Error","content":{"application/json":{"schema":{"$ref":"#/components/schemas/HTTPValidationError"}}}}}}},"/v1/withdrawals":{"post":{"tags":["withdrawals"],"summary":"Post Withdrawal","operationId":"post_withdrawal_v1_withdrawals_post","parameters":[{"name":"authorization","in":"header","required":false,"schema":{"anyOf":[{"type":"string"},{"type":"null"}],"title":"Authorization"}}],"requestBody":{"required":true,"content":{"application/json":{"schema":{"$ref":"#/components/schemas/WithdrawalCreate"}}}},"responses":{"200":{"description":"Successful Response","content":{"application/json":{"schema":{"$ref":"#/components/schemas/WithdrawalOut"}}}},"422":{"description":"Validation Error","content":{"application/json":{"schema":{"$ref":"#/components/schemas/HTTPValidationError"}}}}}},"get":{"tags":["withdrawals"],"summary":"List Withdrawals","operationId":"list_withdrawals_v1_withdrawals_get","parameters":[{"name":"limit","in":"query","required":false,"schema":{"type":"integer","maximum":100,"minimum":1,"default":50,"title":"Limit"}},{"name":"offset","in":"query","required":false,"schema":{"type":"integer","minimum":0,"default":0,"title":"Offset"}},{"name":"authorization","in":"header","required":false,"schema":{"anyOf":[{"type":"string"},{"type":"null"}],"title":"Authorization"}}],"responses":{"200":{"description":"Successful Response","content":{"application/json":{"schema":{"type":"array","items":{"$ref":"#/components/schemas/WithdrawalOut"},"title":"Response List Withdrawals V1 Withdrawals Get"}}}},"422":{"description":"Validation Error","content":{"application/json":{"schema":{"$ref":"#/components/schemas/HTTPValidationError"}}}}}}},"/v1/withdrawals/{withdrawal_id}/cancel":{"post":{"tags":["withdrawals"],"summary":"Post Cancel Withdrawal","operationId":"post_cancel_withdrawal_v1_withdrawals__withdrawal_id__cancel_post","parameters":[{"name":"withdrawal_id","in":"path","required":true,"schema":{"type":"integer","title":"Withdrawal Id"}},{"name":"authorization","in":"header","required":false,"schema":{"anyOf":[{"type":"string"},{"type":"null"}],"title":"Authorization"}}],"responses":{"200":{"description":"Successful Response","content":{"application/json":{"schema":{"$ref":"#/components/schemas/WithdrawalOut"}}}},"422":{"description":"Validation Error","content":{"application/json":{"schema":{"$ref":"#/components/schemas/HTTPValidationError"}}}}}}}},"components":{"schemas":{"BalanceOut":{"properties":{"currency":{"type":"string","title":"Currency","default":"RUB"},"available":{"type":"integer","title":"Available","description":"Доступно к выводу, коп."},"hold":{"type":"integer","title":"Hold","description":"Оплачено, ещё в холде, коп."},"frozen":{"type":"integer","title":"Frozen","description":"В заявках на вывод, коп."},"paidOut":{"type":"integer","title":"Paidout","description":"Выплачено всего, коп."},"availableUsdt":{"anyOf":[{"type":"integer"},{"type":"null"}],"title":"Availableusdt","description":"Доступно в центах USDT по курсу выплат, если он задан"},"rates":{"$ref":"#/components/schemas/RatesOut"}},"type":"object","required":["available","hold","frozen","paidOut","availableUsdt","rates"],"title":"BalanceOut"},"HTTPValidationError":{"properties":{"detail":{"items":{"$ref":"#/components/schemas/ValidationError"},"type":"array","title":"Detail"}},"type":"object","title":"HTTPValidationError"},"PaymentCreate":{"properties":{"amount":{"type":"integer","exclusiveMinimum":0.0,"title":"Amount","description":"Сумма в копейках, кратная 100: 50000 = 500 ₽"},"description":{"type":"string","maxLength":140,"minLength":1,"title":"Description","description":"Назначение платежа"},"orderId":{"anyOf":[{"type":"string","maxLength":128},{"type":"null"}],"title":"Orderid","description":"Ваш ID заказа"},"redirectUrl":{"anyOf":[{"type":"string","minLength":1,"format":"uri"},{"type":"null"}],"title":"Redirecturl","description":"Куда вернуть покупателя после оплаты"},"webhookUrl":{"anyOf":[{"type":"string","minLength":1,"format":"uri"},{"type":"null"}],"title":"Webhookurl","description":"HTTPS URL уведомлений для этого платежа"}},"type":"object","required":["amount","description"],"title":"PaymentCreate"},"PaymentOut":{"properties":{"id":{"type":"string","title":"Id"},"orderId":{"anyOf":[{"type":"string"},{"type":"null"}],"title":"Orderid"},"description":{"type":"string","title":"Description"},"status":{"type":"string","title":"Status"},"amount":{"type":"integer","title":"Amount"},"commission":{"type":"integer","title":"Commission"},"netAmount":{"type":"integer","title":"Netamount"},"paymentUrl":{"anyOf":[{"type":"string"},{"type":"null"}],"title":"Paymenturl"},"expiresAt":{"anyOf":[{"type":"string","format":"date-time"},{"type":"null"}],"title":"Expiresat"},"paidAt":{"anyOf":[{"type":"string","format":"date-time"},{"type":"null"}],"title":"Paidat"},"availableAt":{"anyOf":[{"type":"string","format":"date-time"},{"type":"null"}],"title":"Availableat"},"createdAt":{"type":"string","format":"date-time","title":"Createdat"}},"type":"object","required":["id","orderId","description","status","amount","commission","netAmount","paymentUrl","expiresAt","paidAt","availableAt","createdAt"],"title":"PaymentOut"},"RatesOut":{"properties":{"date":{"type":"string","title":"Date"},"payout":{"anyOf":[{"type":"string"},{"type":"null"}],"title":"Payout","description":"Фикс-курс выплат на сегодня, ₽ за 1 USDT"},"market":{"anyOf":[{"type":"string"},{"type":"null"}],"title":"Market","description":"Последний курс Rapira USDT/RUB"}},"type":"object","required":["date","payout","market"],"title":"RatesOut"},"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"},"WithdrawalCreate":{"properties":{"currency":{"type":"string","enum":["RUB","USDT"],"title":"Currency"},"amount":{"anyOf":[{"type":"integer","exclusiveMinimum":0.0},{"type":"null"}],"title":"Amount","description":"Копейки или центы USDT; без поля — весь доступный баланс"},"address":{"type":"string","maxLength":200,"minLength":1,"title":"Address","description":"Кошелёк USDT или реквизиты для ₽"}},"type":"object","required":["currency","address"],"title":"WithdrawalCreate"},"WithdrawalOut":{"properties":{"id":{"type":"integer","title":"Id"},"currency":{"type":"string","title":"Currency"},"amount":{"type":"integer","title":"Amount"},"rubAmount":{"type":"integer","title":"Rubamount"},"rate":{"anyOf":[{"type":"string"},{"type":"null"}],"title":"Rate"},"address":{"type":"string","title":"Address"},"status":{"type":"string","title":"Status"},"txRef":{"anyOf":[{"type":"string"},{"type":"null"}],"title":"Txref"},"comment":{"anyOf":[{"type":"string"},{"type":"null"}],"title":"Comment"},"createdAt":{"type":"string","format":"date-time","title":"Createdat"},"processedAt":{"anyOf":[{"type":"string","format":"date-time"},{"type":"null"}],"title":"Processedat"}},"type":"object","required":["id","currency","amount","rubAmount","rate","address","status","txRef","comment","createdAt","processedAt"],"title":"WithdrawalOut"}}}}