# Fiat withdrawal API

API for fiat withdrawal

## Get fiat info

> Permission annotations:

```json
{"openapi":"3.0.1","info":{"title":"Public API","version":"dev"},"tags":[{"name":"Fiat withdrawal API","description":"API for fiat withdrawal"}],"servers":[{"url":"https://api.calypso.finance","description":"Generated server url"}],"paths":{"/api/v1/fiat/withdrawal/order":{"post":{"tags":["Fiat withdrawal API"],"summary":"Get fiat info","description":"Permission annotations:","operationId":"getFiatOrder","parameters":[{"name":"Key","in":"header","required":true,"schema":{"type":"string"}},{"name":"Sign","in":"header","required":true,"schema":{"type":"string"}}],"requestBody":{"content":{"application/json":{"schema":{"$ref":"#/components/schemas/WithAccountContainerUUIDKeyRequestDTO"}}},"required":true},"responses":{"200":{"description":"OK","content":{"*/*":{"schema":{"$ref":"#/components/schemas/OrderResponsePGDTO"}}}},"400":{"description":"Bad Request","content":{"*/*":{"schema":{"$ref":"#/components/schemas/PublicGatewayErrorResponse"}}}},"500":{"description":"Internal Server Error","content":{"*/*":{"schema":{"$ref":"#/components/schemas/PublicGatewayErrorResponse"}}}}}}}},"components":{"schemas":{"WithAccountContainerUUIDKeyRequestDTO":{"required":["account","payload","timestamp"],"type":"object","properties":{"account":{"type":"string","description":"Merchant account ID. Request will be sent for this account"},"timestamp":{"type":"integer","description":"Current unix UTC timestamp in milliseconds. Must not be less than 3 minutes in the past and not greater than 3 minutes in the future","format":"int64"},"payload":{"$ref":"#/components/schemas/UUIDKeyRequestDTO"}},"description":"Object with request data"},"UUIDKeyRequestDTO":{"required":["id"],"type":"object","properties":{"id":{"type":"string","description":"id","format":"uuid"}},"description":"Object with request id and idempotencyKey parameters"},"OrderResponsePGDTO":{"required":["currency","fiatCurrency","id","state"],"type":"object","properties":{"id":{"type":"string","format":"uuid"},"cryptoAmount":{"type":"number"},"fiatAmount":{"type":"number"},"fiatCurrency":{"type":"string","description":"Fiat Currency"},"currency":{"type":"string","description":"Crypto Currency"},"state":{"type":"string","enum":["CREATED","IN_PROGRESS","WITHDRAWAL_COMPLETED","COMPLETED","FAILED","EXPIRED"]}}},"PublicGatewayErrorResponse":{"required":["errorCode","message","traceId"],"type":"object","properties":{"traceId":{"type":"string"},"errorCode":{"type":"string"},"message":{"type":"string"}}}}}}
```

## Get method

> Permission annotations:

```json
{"openapi":"3.0.1","info":{"title":"Public API","version":"dev"},"tags":[{"name":"Fiat withdrawal API","description":"API for fiat withdrawal"}],"servers":[{"url":"https://api.calypso.finance","description":"Generated server url"}],"paths":{"/api/v1/fiat/withdrawal/method":{"post":{"tags":["Fiat withdrawal API"],"summary":"Get method","description":"Permission annotations:","operationId":"getMethod","parameters":[{"name":"Key","in":"header","required":true,"schema":{"type":"string"}},{"name":"Sign","in":"header","required":true,"schema":{"type":"string"}}],"requestBody":{"content":{"application/json":{"schema":{"$ref":"#/components/schemas/WithAccountContainerPaymentMethodsRequestPGDTO"}}},"required":true},"responses":{"200":{"description":"OK","content":{"*/*":{"schema":{"$ref":"#/components/schemas/PaymentMethodsResponsePGDTO"}}}},"400":{"description":"Bad Request","content":{"*/*":{"schema":{"$ref":"#/components/schemas/PublicGatewayErrorResponse"}}}},"500":{"description":"Internal Server Error","content":{"*/*":{"schema":{"$ref":"#/components/schemas/PublicGatewayErrorResponse"}}}}}}}},"components":{"schemas":{"WithAccountContainerPaymentMethodsRequestPGDTO":{"required":["account","payload","timestamp"],"type":"object","properties":{"account":{"type":"string","description":"Merchant account ID. Request will be sent for this account"},"timestamp":{"type":"integer","description":"Current unix UTC timestamp in milliseconds. Must not be less than 3 minutes in the past and not greater than 3 minutes in the future","format":"int64"},"payload":{"$ref":"#/components/schemas/PaymentMethodsRequestPGDTO"}},"description":"Object with request data"},"PaymentMethodsRequestPGDTO":{"required":["currency","geoId"],"type":"object","properties":{"itemId":{"type":"string","format":"uuid"},"geoId":{"type":"string","format":"uuid"},"cryptoAmount":{"type":"number"},"fiatAmount":{"type":"number"},"currency":{"type":"string","description":"Crypto Currency"}},"description":"Object with request parameters"},"PaymentMethodsResponsePGDTO":{"required":["fixedRateId","methods","rateExpiredDate"],"type":"object","properties":{"fixedRateId":{"type":"string","format":"uuid"},"rateExpiredDate":{"type":"string","format":"date-time"},"methods":{"type":"array","items":{"$ref":"#/components/schemas/PaymentMethodResponseDTO"}}}},"PaymentMethodResponseDTO":{"required":["cryptoAmount","currency","fiatAmount","fiatCurrency","itemId","maxLimit","minLimit","withdrawalSettingsType"],"type":"object","properties":{"itemId":{"type":"string","format":"uuid"},"fiatAmount":{"type":"number"},"cryptoAmount":{"type":"number"},"withdrawalSettingsType":{"type":"string","enum":["CARD","SEPA","SWIFT"]},"currency":{"type":"string","description":"Crypto Currency"},"fiatCurrency":{"type":"string","description":"Fiat Currency"},"minLimit":{"type":"number"},"maxLimit":{"type":"number"}}},"PublicGatewayErrorResponse":{"required":["errorCode","message","traceId"],"type":"object","properties":{"traceId":{"type":"string"},"errorCode":{"type":"string"},"message":{"type":"string"}}}}}}
```

## Get geo

> Permission annotations:

```json
{"openapi":"3.0.1","info":{"title":"Public API","version":"dev"},"tags":[{"name":"Fiat withdrawal API","description":"API for fiat withdrawal"}],"servers":[{"url":"https://api.calypso.finance","description":"Generated server url"}],"paths":{"/api/v1/fiat/withdrawal/geo":{"post":{"tags":["Fiat withdrawal API"],"summary":"Get geo","description":"Permission annotations:","operationId":"getGeo","parameters":[{"name":"Key","in":"header","required":true,"schema":{"type":"string"}},{"name":"Sign","in":"header","required":true,"schema":{"type":"string"}}],"requestBody":{"content":{"application/json":{"schema":{"$ref":"#/components/schemas/EmptyWithAccountContainer"}}},"required":true},"responses":{"200":{"description":"OK","content":{"*/*":{"schema":{"$ref":"#/components/schemas/GeoListPGDTO"}}}},"400":{"description":"Bad Request","content":{"*/*":{"schema":{"$ref":"#/components/schemas/PublicGatewayErrorResponse"}}}},"500":{"description":"Internal Server Error","content":{"*/*":{"schema":{"$ref":"#/components/schemas/PublicGatewayErrorResponse"}}}}}}}},"components":{"schemas":{"EmptyWithAccountContainer":{"required":["account","timestamp"],"type":"object","properties":{"account":{"type":"string","description":"Merchant account ID. Request will be sent for this account"},"timestamp":{"type":"integer","description":"Current unix UTC timestamp in milliseconds. Must not be less than 3 minutes in the past and not greater than 3 minutes in the future","format":"int64"}},"description":"Object with request data"},"GeoListPGDTO":{"required":["geo"],"type":"object","properties":{"geo":{"type":"array","items":{"$ref":"#/components/schemas/GeoResponseDTO"}}}},"GeoResponseDTO":{"required":["fiatCurrency","geoCode","geoId","geoName"],"type":"object","properties":{"geoId":{"type":"string","format":"uuid"},"geoName":{"type":"string"},"geoCode":{"type":"string"},"fiatCurrency":{"type":"string","description":"Fiat Currency"}}},"PublicGatewayErrorResponse":{"required":["errorCode","message","traceId"],"type":"object","properties":{"traceId":{"type":"string"},"errorCode":{"type":"string"},"message":{"type":"string"}}}}}}
```

## Create order

> Permission annotations:

```json
{"openapi":"3.0.1","info":{"title":"Public API","version":"dev"},"tags":[{"name":"Fiat withdrawal API","description":"API for fiat withdrawal"}],"servers":[{"url":"https://api.calypso.finance","description":"Generated server url"}],"paths":{"/api/v1/fiat/withdrawal/create/order":{"post":{"tags":["Fiat withdrawal API"],"summary":"Create order","description":"Permission annotations:","operationId":"createOrder","parameters":[{"name":"Key","in":"header","required":true,"schema":{"type":"string"}},{"name":"Sign","in":"header","required":true,"schema":{"type":"string"}}],"requestBody":{"content":{"application/json":{"schema":{"$ref":"#/components/schemas/WithAccountContainerCreateOrderRequestPGDTO"}}},"required":true},"responses":{"200":{"description":"OK","content":{"*/*":{"schema":{"$ref":"#/components/schemas/OrderResponsePGDTO"}}}},"400":{"description":"Bad Request","content":{"*/*":{"schema":{"$ref":"#/components/schemas/PublicGatewayErrorResponse"}}}},"500":{"description":"Internal Server Error","content":{"*/*":{"schema":{"$ref":"#/components/schemas/PublicGatewayErrorResponse"}}}}}}}},"components":{"schemas":{"WithAccountContainerCreateOrderRequestPGDTO":{"required":["account","payload","timestamp"],"type":"object","properties":{"account":{"type":"string","description":"Merchant account ID. Request will be sent for this account"},"timestamp":{"type":"integer","description":"Current unix UTC timestamp in milliseconds. Must not be less than 3 minutes in the past and not greater than 3 minutes in the future","format":"int64"},"payload":{"$ref":"#/components/schemas/CreateOrderRequestPGDTO"}},"description":"Object with request data"},"CreateOrderRequestPGDTO":{"required":["idempotencyKey","itemId","rateId"],"type":"object","properties":{"rateId":{"type":"string","format":"uuid"},"itemId":{"type":"string","format":"uuid"},"cryptoAmount":{"type":"number"},"fiatAmount":{"type":"number"},"idempotencyKey":{"type":"string","format":"uuid"},"merchantExternalId":{"type":"string"}},"description":"Object with request parameters"},"OrderResponsePGDTO":{"required":["currency","fiatCurrency","id","state"],"type":"object","properties":{"id":{"type":"string","format":"uuid"},"cryptoAmount":{"type":"number"},"fiatAmount":{"type":"number"},"fiatCurrency":{"type":"string","description":"Fiat Currency"},"currency":{"type":"string","description":"Crypto Currency"},"state":{"type":"string","enum":["CREATED","IN_PROGRESS","WITHDRAWAL_COMPLETED","COMPLETED","FAILED","EXPIRED"]}}},"PublicGatewayErrorResponse":{"required":["errorCode","message","traceId"],"type":"object","properties":{"traceId":{"type":"string"},"errorCode":{"type":"string"},"message":{"type":"string"}}}}}}
```

## Confirm order by swift

> Permission annotations:

```json
{"openapi":"3.0.1","info":{"title":"Public API","version":"dev"},"tags":[{"name":"Fiat withdrawal API","description":"API for fiat withdrawal"}],"servers":[{"url":"https://api.calypso.finance","description":"Generated server url"}],"paths":{"/api/v1/fiat/withdrawal/confirm/order/swift":{"post":{"tags":["Fiat withdrawal API"],"summary":"Confirm order by swift","description":"Permission annotations:","operationId":"confirmOrderBySwift","parameters":[{"name":"Key","in":"header","required":true,"schema":{"type":"string"}},{"name":"Sign","in":"header","required":true,"schema":{"type":"string"}}],"requestBody":{"content":{"application/json":{"schema":{"$ref":"#/components/schemas/WithAccountContainerConfirmSwiftOrderRequestPGDTO"}}},"required":true},"responses":{"200":{"description":"OK","content":{"*/*":{"schema":{"$ref":"#/components/schemas/OrderResponsePGDTO"}}}},"400":{"description":"Bad Request","content":{"*/*":{"schema":{"$ref":"#/components/schemas/PublicGatewayErrorResponse"}}}},"500":{"description":"Internal Server Error","content":{"*/*":{"schema":{"$ref":"#/components/schemas/PublicGatewayErrorResponse"}}}}}}}},"components":{"schemas":{"WithAccountContainerConfirmSwiftOrderRequestPGDTO":{"required":["account","payload","timestamp"],"type":"object","properties":{"account":{"type":"string","description":"Merchant account ID. Request will be sent for this account"},"timestamp":{"type":"integer","description":"Current unix UTC timestamp in milliseconds. Must not be less than 3 minutes in the past and not greater than 3 minutes in the future","format":"int64"},"payload":{"$ref":"#/components/schemas/ConfirmSwiftOrderRequestPGDTO"}},"description":"Object with request data"},"ConfirmSwiftOrderRequestPGDTO":{"required":["accountNumber","bankSwift","card","orderId","requestParams"],"type":"object","properties":{"orderId":{"type":"string","format":"uuid"},"requestParams":{"type":"object","additionalProperties":{"type":"object"}},"card":{"type":"string"},"accountNumber":{"type":"string"},"bankSwift":{"type":"string"}},"description":"Object with request parameters"},"OrderResponsePGDTO":{"required":["currency","fiatCurrency","id","state"],"type":"object","properties":{"id":{"type":"string","format":"uuid"},"cryptoAmount":{"type":"number"},"fiatAmount":{"type":"number"},"fiatCurrency":{"type":"string","description":"Fiat Currency"},"currency":{"type":"string","description":"Crypto Currency"},"state":{"type":"string","enum":["CREATED","IN_PROGRESS","WITHDRAWAL_COMPLETED","COMPLETED","FAILED","EXPIRED"]}}},"PublicGatewayErrorResponse":{"required":["errorCode","message","traceId"],"type":"object","properties":{"traceId":{"type":"string"},"errorCode":{"type":"string"},"message":{"type":"string"}}}}}}
```

## Confirm order by sepa

> Permission annotations:

```json
{"openapi":"3.0.1","info":{"title":"Public API","version":"dev"},"tags":[{"name":"Fiat withdrawal API","description":"API for fiat withdrawal"}],"servers":[{"url":"https://api.calypso.finance","description":"Generated server url"}],"paths":{"/api/v1/fiat/withdrawal/confirm/order/sepa":{"post":{"tags":["Fiat withdrawal API"],"summary":"Confirm order by sepa","description":"Permission annotations:","operationId":"confirmOrderBySepa","parameters":[{"name":"Key","in":"header","required":true,"schema":{"type":"string"}},{"name":"Sign","in":"header","required":true,"schema":{"type":"string"}}],"requestBody":{"content":{"application/json":{"schema":{"$ref":"#/components/schemas/WithAccountContainerConfirmSepaOrderRequestPGDTO"}}},"required":true},"responses":{"200":{"description":"OK","content":{"*/*":{"schema":{"$ref":"#/components/schemas/OrderResponsePGDTO"}}}},"400":{"description":"Bad Request","content":{"*/*":{"schema":{"$ref":"#/components/schemas/PublicGatewayErrorResponse"}}}},"500":{"description":"Internal Server Error","content":{"*/*":{"schema":{"$ref":"#/components/schemas/PublicGatewayErrorResponse"}}}}}}}},"components":{"schemas":{"WithAccountContainerConfirmSepaOrderRequestPGDTO":{"required":["account","payload","timestamp"],"type":"object","properties":{"account":{"type":"string","description":"Merchant account ID. Request will be sent for this account"},"timestamp":{"type":"integer","description":"Current unix UTC timestamp in milliseconds. Must not be less than 3 minutes in the past and not greater than 3 minutes in the future","format":"int64"},"payload":{"$ref":"#/components/schemas/ConfirmSepaOrderRequestPGDTO"}},"description":"Object with request data"},"ConfirmSepaOrderRequestPGDTO":{"required":["accountEmail","accountName","accountNumber","orderId","requestParams"],"type":"object","properties":{"orderId":{"type":"string","format":"uuid"},"requestParams":{"type":"object","additionalProperties":{"type":"object"}},"accountNumber":{"type":"string"},"accountName":{"type":"string"},"accountEmail":{"type":"string"}},"description":"Object with request parameters"},"OrderResponsePGDTO":{"required":["currency","fiatCurrency","id","state"],"type":"object","properties":{"id":{"type":"string","format":"uuid"},"cryptoAmount":{"type":"number"},"fiatAmount":{"type":"number"},"fiatCurrency":{"type":"string","description":"Fiat Currency"},"currency":{"type":"string","description":"Crypto Currency"},"state":{"type":"string","enum":["CREATED","IN_PROGRESS","WITHDRAWAL_COMPLETED","COMPLETED","FAILED","EXPIRED"]}}},"PublicGatewayErrorResponse":{"required":["errorCode","message","traceId"],"type":"object","properties":{"traceId":{"type":"string"},"errorCode":{"type":"string"},"message":{"type":"string"}}}}}}
```

## Confirm order by card

> Permission annotations:

```json
{"openapi":"3.0.1","info":{"title":"Public API","version":"dev"},"tags":[{"name":"Fiat withdrawal API","description":"API for fiat withdrawal"}],"servers":[{"url":"https://api.calypso.finance","description":"Generated server url"}],"paths":{"/api/v1/fiat/withdrawal/confirm/order/card":{"post":{"tags":["Fiat withdrawal API"],"summary":"Confirm order by card","description":"Permission annotations:","operationId":"confirmOrderByCard","parameters":[{"name":"Key","in":"header","required":true,"schema":{"type":"string"}},{"name":"Sign","in":"header","required":true,"schema":{"type":"string"}}],"requestBody":{"content":{"application/json":{"schema":{"$ref":"#/components/schemas/WithAccountContainerConfirmCardOrderRequestPGDTO"}}},"required":true},"responses":{"200":{"description":"OK","content":{"*/*":{"schema":{"$ref":"#/components/schemas/OrderResponsePGDTO"}}}},"400":{"description":"Bad Request","content":{"*/*":{"schema":{"$ref":"#/components/schemas/PublicGatewayErrorResponse"}}}},"500":{"description":"Internal Server Error","content":{"*/*":{"schema":{"$ref":"#/components/schemas/PublicGatewayErrorResponse"}}}}}}}},"components":{"schemas":{"WithAccountContainerConfirmCardOrderRequestPGDTO":{"required":["account","payload","timestamp"],"type":"object","properties":{"account":{"type":"string","description":"Merchant account ID. Request will be sent for this account"},"timestamp":{"type":"integer","description":"Current unix UTC timestamp in milliseconds. Must not be less than 3 minutes in the past and not greater than 3 minutes in the future","format":"int64"},"payload":{"$ref":"#/components/schemas/ConfirmCardOrderRequestPGDTO"}},"description":"Object with request data"},"ConfirmCardOrderRequestPGDTO":{"required":["card","orderId","requestParams"],"type":"object","properties":{"orderId":{"type":"string","format":"uuid"},"requestParams":{"type":"object","additionalProperties":{"type":"object"}},"card":{"type":"string"}},"description":"Object with request parameters"},"OrderResponsePGDTO":{"required":["currency","fiatCurrency","id","state"],"type":"object","properties":{"id":{"type":"string","format":"uuid"},"cryptoAmount":{"type":"number"},"fiatAmount":{"type":"number"},"fiatCurrency":{"type":"string","description":"Fiat Currency"},"currency":{"type":"string","description":"Crypto Currency"},"state":{"type":"string","enum":["CREATED","IN_PROGRESS","WITHDRAWAL_COMPLETED","COMPLETED","FAILED","EXPIRED"]}}},"PublicGatewayErrorResponse":{"required":["errorCode","message","traceId"],"type":"object","properties":{"traceId":{"type":"string"},"errorCode":{"type":"string"},"message":{"type":"string"}}}}}}
```
