{"openapi":"3.1.0","info":{"title":"OpenAPI definition","version":"v0"},"servers":[{"url":"https://api.bitclear.li","description":"Generated server url"}],"paths":{"/v3/conversions/{conversionId}/retry-trade":{"put":{"tags":["Conversions"],"operationId":"retry","parameters":[{"name":"conversionId","in":"path","required":true,"schema":{"type":"string","format":"uuid"}}],"responses":{"200":{"description":"OK"}}}},"/v3/conversions/{conversionId}/declare-result":{"put":{"tags":["Conversions"],"operationId":"declare","parameters":[{"name":"conversionId","in":"path","required":true,"schema":{"type":"string","format":"uuid"}}],"requestBody":{"content":{"application/json":{"schema":{"$ref":"#/components/schemas/ConversionDeclarationRequest"}}},"required":true},"responses":{"200":{"description":"OK"}}}},"/v3/conversions/{conversionId}/cancel":{"put":{"tags":["Conversions"],"operationId":"cancel","parameters":[{"name":"conversionId","in":"path","required":true,"schema":{"type":"string","format":"uuid"}}],"responses":{"200":{"description":"OK"}}}},"/v3/payouts":{"get":{"tags":["Payouts"],"summary":"Retrieves a list of payouts based on search criteria.","operationId":"listPayouts","parameters":[{"name":"limit","in":"query","description":"Page size","required":false,"schema":{"type":"integer","format":"int32","default":20,"description":"Page size","maximum":100,"minimum":0}},{"name":"offset","in":"query","description":"Offset of the page","required":false,"schema":{"type":"integer","format":"int32","default":0,"description":"Offset of the page","minimum":0}},{"name":"timeTo","in":"query","description":"ISO format, yyyy-MM-ddTHH:mm:ss.SSSXXX","required":false,"schema":{"type":"string","description":"ISO format, yyyy-MM-ddTHH:mm:ss.SSSXXX","example":"2000-10-31T01:30:00.000-05:00"},"example":"2000-10-31T01:30:00.000-05:00"},{"name":"timeFrom","in":"query","description":"ISO format, yyyy-MM-ddTHH:mm:ss.SSSXXX","required":false,"schema":{"type":"string","description":"ISO format, yyyy-MM-ddTHH:mm:ss.SSSXXX","example":"2000-10-31T01:30:00.000-05:00"},"example":"2000-10-31T01:30:00.000-05:00"},{"name":"merchantId","in":"query","required":false,"schema":{"type":"string"}},{"name":"address","in":"query","required":false,"schema":{"type":"string"}},{"name":"transferAmount","in":"query","required":false,"schema":{"type":"string"}},{"name":"priceAmount","in":"query","required":false,"schema":{"type":"string"}},{"name":"transferCurrency","in":"query","required":false,"schema":{"type":"string"}},{"name":"priceCurrency","in":"query","required":false,"schema":{"type":"string"}}],"responses":{"200":{"description":"OK","content":{"*/*":{"schema":{"$ref":"#/components/schemas/PaginationInfoResponsePayoutResponseV3"}}}}}},"post":{"tags":["Payouts"],"summary":"Creates new payout. Amount can be specified either in transaction currency(think \"Send X BTC\") or in charge currency(think \"Send $1000 worth of BTC\")","operationId":"createPayout","requestBody":{"content":{"application/json":{"schema":{"$ref":"#/components/schemas/NewPayoutRequestV3"}}},"required":true},"responses":{"200":{"description":"OK","content":{"*/*":{"schema":{"$ref":"#/components/schemas/PayoutResponseV3"}}}}}}},"/v3/payouts/{id}/resend-notification":{"post":{"tags":["Payouts"],"summary":"Request to send a notification about the current state of the given payout if payout notificationUrl was defined","operationId":"resendNotification","parameters":[{"name":"id","in":"path","required":true,"schema":{"type":"string"}}],"responses":{"200":{"description":"OK"}}}},"/v3/payouts/{id}/approve":{"post":{"tags":["Payouts"],"summary":"Approves a payout. After the payout is approved it will be queued for sending. If payout is approved after expiration time, an error will be returned","operationId":"approvePayout","parameters":[{"name":"id","in":"path","required":true,"schema":{"type":"string"}}],"responses":{"200":{"description":"OK","content":{"*/*":{"schema":{"$ref":"#/components/schemas/PayoutResponseV3"}}}}}}},"/v3/payments":{"post":{"tags":["Payments"],"summary":"Creates new payment.","operationId":"createPayment","requestBody":{"content":{"application/json":{"schema":{"$ref":"#/components/schemas/NewPaymentRequestV3"}}},"required":true},"responses":{"200":{"description":"OK","content":{"*/*":{"schema":{"$ref":"#/components/schemas/PaymentResponseV3"}}}}}}},"/v3/conversions/v3/conversions":{"post":{"tags":["Conversions"],"summary":"Creates a new conversion.","operationId":"createConversion","requestBody":{"content":{"application/json":{"schema":{"$ref":"#/components/schemas/NewConversionRequestV3"}}},"required":true},"responses":{"200":{"description":"OK","content":{"*/*":{"schema":{"$ref":"#/components/schemas/ConversionResponseV3"}}}}}}},"/v3/payouts/{id}":{"get":{"tags":["Payouts"],"summary":"Retrieves a payout by ID","operationId":"getPayout","parameters":[{"name":"id","in":"path","required":true,"schema":{"type":"string"}}],"responses":{"200":{"description":"OK","content":{"*/*":{"schema":{"$ref":"#/components/schemas/PayoutResponseV3"}}}}}}},"/v3/payouts/payout-limits":{"get":{"tags":["Payouts"],"summary":"Information about current balance and payout limits.","operationId":"getPayoutLimits","parameters":[{"name":"transferCurrency","in":"query","required":true,"schema":{"type":"string"}},{"name":"priceCurrency","in":"query","required":true,"schema":{"type":"string"}}],"responses":{"200":{"description":"OK","content":{"*/*":{"schema":{"$ref":"#/components/schemas/PayoutLimitResponse"}}}}}}},"/v3/payments/{id}":{"get":{"tags":["Payments"],"summary":"Retrieves a payment by ID","operationId":"getPayout_1","parameters":[{"name":"id","in":"path","required":true,"schema":{"type":"string"}}],"responses":{"200":{"description":"OK","content":{"*/*":{"schema":{"$ref":"#/components/schemas/PaymentResponseV3"}}}}}}},"/v3/currencies":{"get":{"tags":["Currencies"],"summary":"Get the list of supported currencies","operationId":"listCurrencies","responses":{"200":{"description":"OK","content":{"*/*":{"schema":{"type":"array","items":{"$ref":"#/components/schemas/CurrencyResponseV3"}}}}}},"deprecated":true}},"/v3/conversions/v3/estimate-conversion":{"get":{"tags":["Conversions"],"summary":"Estimates result of the conversion","operationId":"estimateConversion","requestBody":{"content":{"application/json":{"schema":{"$ref":"#/components/schemas/NewConversionRequestV3"}}},"required":true},"responses":{"200":{"description":"OK","content":{"*/*":{"schema":{"$ref":"#/components/schemas/ConversionEstimationV3"}}}}}}}},"components":{"schemas":{"ConversionDeclarationRequest":{"type":"object","properties":{"boughtAmount":{"type":"string","format":"decimal"}}},"NewPayoutRequestV3":{"type":"object","properties":{"transferAmount":{"type":"string","format":"decimal","description":"Amount of `transferCurrency` which will be send. Either `priceAmount` or `transferAmount` must be specified."},"priceAmount":{"type":"string","format":"decimal","description":"Amount of `priceCurrency`. If `priceAmount` is used, `transferAmount` will be estimated based on it and the current exchange rate. Either `priceAmount` or `transferAmount` must be specified."},"transferCurrency":{"type":"string","description":"The currency which will be used to send the payout transaction."},"priceCurrency":{"type":"string","description":"The currency in which the client will be charged in."},"address":{"type":"string","description":"Address where the funds should be sent."},"comment":{"type":"string","description":"Comment about the payout (optional)."},"notificationUrl":{"type":"string","description":"URL for callback notifications about the payout's state changes (optional)"},"autoApprove":{"type":"boolean","default":"false","description":"If set to true, the payout will be automatically approved."},"externalPayoutId":{"type":"string","description":"Client-provided ID allowing to match payouts between systems (optional)."}},"required":["priceCurrency","transferCurrency"]},"PayoutResponseV3":{"type":"object","properties":{"payoutId":{"type":"string"},"address":{"type":"string","description":"Blockchain address to which this payout will be sent."},"transferAmount":{"type":"string","description":"Amount of transfer currency that will be sent","example":13.0456},"priceAmount":{"type":"string"},"priceCurrency":{"type":"string"},"transferCurrency":{"type":"string"},"transactionId":{"type":"string"},"comment":{"type":"string"},"expirationTime":{"type":"string"},"createdTime":{"type":"string"},"notificationUrl":{"type":"string"},"sentTime":{"type":"string"},"externalPayoutId":{"type":"string"},"status":{"type":"string"}},"required":["payoutId"]},"NewPaymentRequestV3":{"type":"object","properties":{"priceAmount":{"type":"string","format":"decimal","description":"Amount of `priceCurrency`. If `priceAmount` is used, `transferAmount` will be estimated based on it and the current exchange rate. Either `priceAmount` or `transferAmount` must be specified."},"transferCurrency":{"type":"string","description":"The currency which will be used to send the payout transaction."},"priceCurrency":{"type":"string","description":"The currency in which the client will be charged in."},"walletLabel":{"type":"string","description":"Label to be displayed inside customer wallet (depends on wallet support)."},"walletMessage":{"type":"string","description":"Additional message to be displayed inside customer wallet (depends on wallet support)"},"notificationUrl":{"type":"string","description":"URL for callback notifications about the payment's state changes."},"externalPaymentId":{"type":"string","description":"Client-defined payment ID."},"redirectUrls":{"$ref":"#/components/schemas/PaymentRedirectUrls"}},"required":["priceAmount","priceCurrency","transferCurrency"]},"PaymentRedirectUrls":{"type":"object","properties":{"expired":{"type":"string"},"confirmed":{"type":"string"},"invalid":{"type":"string"},"unconfirmed":{"type":"string"}}},"PaymentResponseV3":{"type":"object","properties":{"paymentId":{"type":"string"},"priceAmount":{"type":"string","format":"decimal"},"priceCurrency":{"type":"string"},"transferAmount":{"type":"string","format":"decimal"},"transferCurrency":{"type":"string"},"address":{"type":"string"},"walletLabel":{"type":"string","description":"Label to be displayed inside customer wallet (depends on wallet support)."},"walletMessage":{"type":"string","description":"Additional message to be displayed inside customer wallet (depends on wallet support)"},"paymentUri":{"type":"string","description":"URI for software wallets. This URI can be made into a QR code and displayed to be scanned by wallet software."},"expirationTime":{"type":"string","format":"date-time","description":"After this time the payment will expire and customer will not be able to pay successfully."},"paymentPageUrl":{"type":"string","description":"Payment Page URL for this payment. This page allows customers to easily pay for the given payment."},"notificationUrl":{"type":"string","description":"URL for callback notifications about the payment's state changes."},"paidPriceAmount":{"type":"string","format":"decimal","description":"Paid amount calculated in `priceCurrency`. This is a sum of `pendingPaidPriceAmount` and `acceptedPaidPriceAmount`"},"pendingPaidPriceAmount":{"type":"string","format":"decimal","description":"Pending amount in `priceCurrency`. Pending means that we're awaiting confirmation from the blockchain. If pending transaction turns out to be fraudulent, these funds may disappear."},"acceptedPaidPriceAmount":{"type":"string","format":"decimal","description":"Accepted amount in `priceCurrency`. Accepted means that funds have been credited to merchant's account."},"paidTransferAmount":{"type":"string","format":"decimal","description":"Total amount of `transferCurrency` paid. This is a sum of `pendingPaidTransferAmount` and `acceptedPaidTransferAmount`"},"pendingPaidTransferAmount":{"type":"string","format":"decimal","description":"Pending amount in `transferCurrency`. Pending means that we're awaiting confirmation from the blockchain. If pending transaction turns out to be fraudulent, these funds may disappear."},"acceptedPaidTransferAmount":{"type":"string","format":"decimal","description":"Accepted amount in `transferCurrency`. Accepted means that funds have been credited to merchant's account."},"status":{"type":"string"},"exchangeRate":{"type":"string","format":"decimal","description":"Exchange rate offered for this payment. Please note this exchange rate is valid only with payment expiration time. After the payment expires we use current exchange rate."},"externalPaymentId":{"type":"string","description":"Client-defined payment ID."},"transactions":{"type":"array","description":"List of transactions which pays to this payment's address.","items":{"$ref":"#/components/schemas/V3PaymentTransaction"}},"redirectUrls":{"type":"string"}},"required":["address","paymentId","priceAmount","priceCurrency","status","transferAmount","transferCurrency"]},"V3PaymentTransaction":{"type":"object","properties":{"transactionId":{"type":"string","description":"Identifier which can be used to find transaction on the blockchain."},"paidTransferAmount":{"type":"string","format":"decimal","description":"Amount sent in this transaction."},"priceAmount":{"type":"string","format":"decimal","description":"`paidTransferAmount` estimated in associated payment's `priceCurrency`."},"exchangeRate":{"type":"string","format":"decimal","description":"Exchange rate used to calculate `priceAmount`."},"observedTime":{"type":"string","format":"date-time","description":"Time the transaction has been received."},"acceptedTime":{"type":"string","format":"date-time","description":"Time the transaction has been accepted. For risky transaction we may wait for the blockchain confirmations, otherwise it will be the same as `observedTime`."},"rejectedTime":{"type":"string","format":"date-time","description":"Time the transaction was rejected by the blockchain. This will only be defined for rejected transactions."},"state":{"type":"string","description":"State of the transaction.\n\n`PENDING`: that transaction is still awaiting confirmation and it will become either `ACCEPTED` or `REJECTED` eventually.\n\n`ACCEPTED`: funds have been secured and they will be credited to merchants.\n\n`REJECTED` transaction turned out to be fraudulent."}}},"NewConversionRequestV3":{"type":"object","properties":{"sellAmount":{"type":"string","format":"decimal"},"sellCurrency":{"type":"string"},"buyCurrency":{"type":"string"}},"required":["buyCurrency","sellAmount","sellCurrency"]},"ConversionResponseV3":{"type":"object","properties":{"id":{"type":"string"}},"required":["id"]},"PaginationInfoResponsePayoutResponseV3":{"type":"object","properties":{"limit":{"type":"integer","format":"int32"},"offset":{"type":"integer","format":"int32"},"itemCount":{"type":"integer","format":"int32"},"items":{"type":"array","items":{"$ref":"#/components/schemas/PayoutResponseV3"}}}},"PayoutLimitResponse":{"type":"object","properties":{"available":{"type":"number","format":"double"},"minPayoutAmount":{"type":"number","format":"double"},"currency":{"type":"string"}}},"CurrencyResponseV3":{"type":"object","properties":{"code":{"type":"string"},"name":{"type":"string"},"paymentPriceEnabled":{"type":"boolean"},"paymentTransferEnabled":{"type":"boolean"},"payoutTransferEnabled":{"type":"boolean"},"payoutPriceEnabled":{"type":"boolean"}},"required":["code","name","paymentPriceEnabled","paymentTransferEnabled","payoutPriceEnabled","payoutTransferEnabled"]},"ConversionEstimationV3":{"type":"object","properties":{"currency":{"type":"string"},"amount":{"type":"string","format":"decimal"}},"required":["amount","currency"]}}}}