> For the complete documentation index, see [llms.txt](https://docs.calypso.money/llms.txt). Markdown versions of documentation pages are available by appending `.md` to page URLs; this page is available as [Markdown](https://docs.calypso.money/api-reference/payout-api.md).

# Payout API

API for payouts

## Get specific Payout

> Permission annotations:

```json
{"openapi":"3.0.1","info":{"title":"Public API","version":"dev"},"tags":[{"name":"Payout API","description":"API for payouts"}],"servers":[{"url":"https://api.calypso.money","description":"Generated server url"}],"paths":{"/api/v1/payout":{"post":{"tags":["Payout API"],"summary":"Get specific Payout","description":"Permission annotations:","operationId":"findDeal","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/WithAccountContainerByIdOrIdempotencyKeyRequestDTO"}}},"required":true},"responses":{"200":{"description":"OK","content":{"*/*":{"schema":{"$ref":"#/components/schemas/PublicDealResponseDTO"}}}},"400":{"description":"Bad Request","content":{"*/*":{"schema":{"$ref":"#/components/schemas/PublicGatewayErrorResponse"}}}},"500":{"description":"Internal Server Error","content":{"*/*":{"schema":{"$ref":"#/components/schemas/PublicGatewayErrorResponse"}}}}}}}},"components":{"schemas":{"WithAccountContainerByIdOrIdempotencyKeyRequestDTO":{"required":["account","payload","timestamp"],"type":"object","properties":{"account":{"pattern":"^0x[0-9a-fA-F]{40}$","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/ByIdOrIdempotencyKeyRequestDTO"}},"description":"Object with request data"},"ByIdOrIdempotencyKeyRequestDTO":{"type":"object","properties":{"id":{"type":"string","description":"System id of the object. Either id or idempotencyKey must be specified"},"idempotencyKey":{"type":"string","description":"The unique external id that can be generated by user while creating the object","format":"uuid"}},"description":"Object with request id and idempotencyKey parameters"},"PublicDealResponseDTO":{"required":["account","amount","belongingType","createdDate","currency","depositAddress","fee","feePercentage","id","state"],"type":"object","properties":{"id":{"type":"string","description":"Payout ID"},"account":{"type":"string","description":"Merchant account ID"},"depositAddress":{"type":"string","description":"Crypto address for deposit"},"amount":{"type":"number","description":"Withdrawal amount"},"currency":{"type":"string","description":"This is the currency associated with the amount field"},"fee":{"type":"number","description":"Service fee for the payout"},"feePercentage":{"type":"number","description":"Service fee in percentages"},"state":{"type":"string","description":"Represents status of the payout","enum":["CREATION_IN_PROGRESS","PENDING_CONFIRMATION","CONFIRMED","IN_PROGRESS","COMPLETED","FAILED","CANCELED","PARTIAL"]},"createdDate":{"type":"string","description":"Time of payout creation","format":"date-time"},"transactionHash":{"type":"string","description":"Hash of the transaction in blockchain"},"comment":{"type":"string","description":"Comment for the payout"},"executionDate":{"type":"string","description":"Execution date of payout. Can be used for payouts to date","format":"date-time"},"idempotencyKey":{"type":"string","description":"The external id that can be generated by user while creating the payout in the uuid format","format":"uuid"},"errors":{"$ref":"#/components/schemas/WithdrawalValidationErrorDTO"},"cancellation":{"$ref":"#/components/schemas/DealCancellationDTO"},"belongingType":{"type":"string","description":"Belonging type","enum":["INTERNAL","EXTERNAL"]},"externalId":{"type":"string","description":"External ID"}},"description":"Response with payout data"},"WithdrawalValidationErrorDTO":{"required":["withdrawalErrors"],"type":"object","properties":{"withdrawalErrors":{"type":"array","description":"Payout error list","items":{"$ref":"#/components/schemas/WithdrawalValidationErrorItemDTO"}}},"description":"Payout errors details"},"WithdrawalValidationErrorItemDTO":{"required":["errors","withdrawalId"],"type":"object","properties":{"withdrawalId":{"type":"string","description":"Id of the withdrawal where error occurred"},"errors":{"type":"array","description":"Payout error list for the withdrawal","items":{"$ref":"#/components/schemas/WithdrawalValidationDTO"}}},"description":"Payout error list"},"WithdrawalValidationDTO":{"required":["errorResolved","id","status"],"type":"object","properties":{"id":{"type":"integer","description":"Id of the error","format":"int64"},"status":{"type":"string","description":"Validation status of the withdrawal","enum":["SUCCESS","NOT_ENOUGH_FUNDS","NOT_ENOUGH_FUNDS_FOR_COMMISSION","NOT_ENOUGH_FUNDS_FOR_SERVICE_COMMISSION","EXCEEDING_LIMIT"]},"errorResolved":{"type":"boolean","description":"Represents whether errors were resolved or not"},"errorMessage":{"type":"string","description":"Text of the error message"}},"description":"Payout error list for the withdrawal"},"DealCancellationDTO":{"required":["cancelMessage","canceledByFirstname","canceledByLastname","canceledByUserId"],"type":"object","properties":{"canceledByUserId":{"type":"string","description":"User id who cancelled the payout"},"canceledByFirstname":{"type":"string","description":"First name of the user who cancelled the payout"},"canceledByLastname":{"type":"string","description":"Last name of the user who cancelled the payout"},"cancelMessage":{"type":"string","description":"Reason of payout cancellation"}},"description":"Payout cancellation details"},"PublicGatewayErrorResponse":{"required":["errorCode","message","traceId"],"type":"object","properties":{"traceId":{"type":"string"},"errorCode":{"type":"string"},"message":{"type":"string"}}}}}}
```

## Get specific Transaction from the Payout

> Permission annotations:

```json
{"openapi":"3.0.1","info":{"title":"Public API","version":"dev"},"tags":[{"name":"Payout API","description":"API for payouts"}],"servers":[{"url":"https://api.calypso.money","description":"Generated server url"}],"paths":{"/api/v1/payout/withdrawal":{"post":{"tags":["Payout API"],"summary":"Get specific Transaction from the Payout","description":"Permission annotations:","operationId":"findDealWithdrawal","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/WithAccountContainerByIdRequestDTO"}}},"required":true},"responses":{"200":{"description":"OK","content":{"*/*":{"schema":{"$ref":"#/components/schemas/PublicDealWithdrawalResponseDTO"}}}},"400":{"description":"Bad Request","content":{"*/*":{"schema":{"$ref":"#/components/schemas/PublicGatewayErrorResponse"}}}},"500":{"description":"Internal Server Error","content":{"*/*":{"schema":{"$ref":"#/components/schemas/PublicGatewayErrorResponse"}}}}}}}},"components":{"schemas":{"WithAccountContainerByIdRequestDTO":{"required":["account","payload","timestamp"],"type":"object","properties":{"account":{"pattern":"^0x[0-9a-fA-F]{40}$","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/ByIdRequestDTO"}},"description":"Object with request data"},"ByIdRequestDTO":{"required":["requestId"],"type":"object","properties":{"requestId":{"type":"string","description":"The id of the object"}},"description":"Object with request id parameter"},"PublicDealWithdrawalResponseDTO":{"required":["account","amount","belongingType","createdDate","currency","depositAddress","fee","id","state","withdrawalErrors"],"type":"object","properties":{"id":{"type":"string","description":"Id of the payout includes this transaction"},"account":{"type":"string","description":"Merchant account ID"},"companyName":{"type":"string","description":"Company of the user who created the payout"},"amount":{"type":"number","description":"Withdrawal amount"},"currency":{"type":"string","description":"This is the currency associated with the amount field"},"state":{"type":"string","description":"Represents status of the withdrawal","enum":["DRAFT","IN_PROGRESS","COMPLETED","REPLACED","FAILED","CANCELED"]},"fee":{"type":"number","description":"Service fee for the withdrawal"},"transactionHash":{"type":"string","description":"Transaction hash"},"depositAddress":{"type":"string","description":"Recipient's crypto-address"},"comment":{"type":"string","description":"Comment for the transaction"},"createdDate":{"type":"string","description":"Time of payout creation","format":"date-time"},"withdrawalErrors":{"type":"array","description":"Withdrawal errors details","items":{"$ref":"#/components/schemas/WithdrawalValidationDTO"}},"belongingType":{"type":"string","description":"Belonging type","enum":["INTERNAL","EXTERNAL"]}},"description":"Response with withdrawal data"},"WithdrawalValidationDTO":{"required":["errorResolved","id","status"],"type":"object","properties":{"id":{"type":"integer","description":"Id of the error","format":"int64"},"status":{"type":"string","description":"Validation status of the withdrawal","enum":["SUCCESS","NOT_ENOUGH_FUNDS","NOT_ENOUGH_FUNDS_FOR_COMMISSION","NOT_ENOUGH_FUNDS_FOR_SERVICE_COMMISSION","EXCEEDING_LIMIT"]},"errorResolved":{"type":"boolean","description":"Represents whether errors were resolved or not"},"errorMessage":{"type":"string","description":"Text of the error message"}},"description":"Payout error list for the withdrawal"},"PublicGatewayErrorResponse":{"required":["errorCode","message","traceId"],"type":"object","properties":{"traceId":{"type":"string"},"errorCode":{"type":"string"},"message":{"type":"string"}}}}}}
```

## Get specific Transactions from the Payout

> Permission annotations:

```json
{"openapi":"3.0.1","info":{"title":"Public API","version":"dev"},"tags":[{"name":"Payout API","description":"API for payouts"}],"servers":[{"url":"https://api.calypso.money","description":"Generated server url"}],"paths":{"/api/v1/payout/withdrawal/all":{"post":{"tags":["Payout API"],"summary":"Get specific Transactions from the Payout","description":"Permission annotations:","operationId":"findDealWithdrawals","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/WithAccountContainerPublicDealWithdrawalsByStateRequestDTO"}}},"required":true},"responses":{"200":{"description":"OK","content":{"*/*":{"schema":{"$ref":"#/components/schemas/PageDTOPublicDealWithdrawalResponseDTO"}}}},"400":{"description":"Bad Request","content":{"*/*":{"schema":{"$ref":"#/components/schemas/PublicGatewayErrorResponse"}}}},"500":{"description":"Internal Server Error","content":{"*/*":{"schema":{"$ref":"#/components/schemas/PublicGatewayErrorResponse"}}}}}}}},"components":{"schemas":{"WithAccountContainerPublicDealWithdrawalsByStateRequestDTO":{"required":["account","payload","timestamp"],"type":"object","properties":{"account":{"pattern":"^0x[0-9a-fA-F]{40}$","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/PublicDealWithdrawalsByStateRequestDTO"}},"description":"Object with request data"},"PublicDealWithdrawalsByStateRequestDTO":{"required":["pageNumber","pageSize","stateNames"],"type":"object","properties":{"stateNames":{"type":"array","description":"Statuses of the payout withdrawals to return","items":{"type":"string","description":"Statuses of the payout withdrawals to return","enum":["DRAFT","IN_PROGRESS","COMPLETED","REPLACED","FAILED","CANCELED"]}},"pageNumber":{"type":"integer","description":"Numeric value indicating the page number","format":"int32","default":1},"pageSize":{"type":"integer","description":"Numeric value indicating the page size","format":"int32","default":10},"dealId":{"type":"string","description":"Payout ID for which you need to get withdrawals"},"idempotencyKey":{"type":"string","description":"The external id in the uuid format that can be generated by user while creating the payout","format":"uuid"}},"description":"Request data for getting payout withdrawals by state"},"PageDTOPublicDealWithdrawalResponseDTO":{"required":["page","result","size","total","totalElements"],"type":"object","properties":{"result":{"type":"array","description":"Array of requested objects","items":{"$ref":"#/components/schemas/PublicDealWithdrawalResponseDTO"}},"page":{"type":"integer","description":"Numeric value indicating the page number","format":"int32"},"size":{"type":"integer","description":"Numeric value indicating the page size","format":"int32"},"total":{"type":"integer","description":"Total number of pages matching the query","format":"int32"},"totalElements":{"type":"integer","description":"Total number of objects matching the query","format":"int64"}},"description":"Object with page details"},"PublicDealWithdrawalResponseDTO":{"required":["account","amount","belongingType","createdDate","currency","depositAddress","fee","id","state","withdrawalErrors"],"type":"object","properties":{"id":{"type":"string","description":"Id of the payout includes this transaction"},"account":{"type":"string","description":"Merchant account ID"},"companyName":{"type":"string","description":"Company of the user who created the payout"},"amount":{"type":"number","description":"Withdrawal amount"},"currency":{"type":"string","description":"This is the currency associated with the amount field"},"state":{"type":"string","description":"Represents status of the withdrawal","enum":["DRAFT","IN_PROGRESS","COMPLETED","REPLACED","FAILED","CANCELED"]},"fee":{"type":"number","description":"Service fee for the withdrawal"},"transactionHash":{"type":"string","description":"Transaction hash"},"depositAddress":{"type":"string","description":"Recipient's crypto-address"},"comment":{"type":"string","description":"Comment for the transaction"},"createdDate":{"type":"string","description":"Time of payout creation","format":"date-time"},"withdrawalErrors":{"type":"array","description":"Withdrawal errors details","items":{"$ref":"#/components/schemas/WithdrawalValidationDTO"}},"belongingType":{"type":"string","description":"Belonging type","enum":["INTERNAL","EXTERNAL"]}},"description":"Response with withdrawal data"},"WithdrawalValidationDTO":{"required":["errorResolved","id","status"],"type":"object","properties":{"id":{"type":"integer","description":"Id of the error","format":"int64"},"status":{"type":"string","description":"Validation status of the withdrawal","enum":["SUCCESS","NOT_ENOUGH_FUNDS","NOT_ENOUGH_FUNDS_FOR_COMMISSION","NOT_ENOUGH_FUNDS_FOR_SERVICE_COMMISSION","EXCEEDING_LIMIT"]},"errorResolved":{"type":"boolean","description":"Represents whether errors were resolved or not"},"errorMessage":{"type":"string","description":"Text of the error message"}},"description":"Payout error list for the withdrawal"},"PublicGatewayErrorResponse":{"required":["errorCode","message","traceId"],"type":"object","properties":{"traceId":{"type":"string"},"errorCode":{"type":"string"},"message":{"type":"string"}}}}}}
```

## Get specific Mass Payout

> Permission annotations:

```json
{"openapi":"3.0.1","info":{"title":"Public API","version":"dev"},"tags":[{"name":"Payout API","description":"API for payouts"}],"servers":[{"url":"https://api.calypso.money","description":"Generated server url"}],"paths":{"/api/v1/payout/mass":{"post":{"tags":["Payout API"],"summary":"Get specific Mass Payout","description":"Permission annotations:","operationId":"findMassDeal","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/WithAccountContainerByIdOrIdempotencyKeyRequestDTO"}}},"required":true},"responses":{"200":{"description":"OK","content":{"*/*":{"schema":{"$ref":"#/components/schemas/PublicMassDealResponseDTO"}}}},"400":{"description":"Bad Request","content":{"*/*":{"schema":{"$ref":"#/components/schemas/PublicGatewayErrorResponse"}}}},"500":{"description":"Internal Server Error","content":{"*/*":{"schema":{"$ref":"#/components/schemas/PublicGatewayErrorResponse"}}}}}}}},"components":{"schemas":{"WithAccountContainerByIdOrIdempotencyKeyRequestDTO":{"required":["account","payload","timestamp"],"type":"object","properties":{"account":{"pattern":"^0x[0-9a-fA-F]{40}$","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/ByIdOrIdempotencyKeyRequestDTO"}},"description":"Object with request data"},"ByIdOrIdempotencyKeyRequestDTO":{"type":"object","properties":{"id":{"type":"string","description":"System id of the object. Either id or idempotencyKey must be specified"},"idempotencyKey":{"type":"string","description":"The unique external id that can be generated by user while creating the object","format":"uuid"}},"description":"Object with request id and idempotencyKey parameters"},"PublicMassDealResponseDTO":{"required":["account","comment","companyId","id","idempotencyKey","state"],"type":"object","properties":{"id":{"type":"string","description":"Payout ID"},"idempotencyKey":{"type":"string","description":"The external ID in the UUID format that can be generated by user while creating the payout","format":"uuid"},"companyId":{"type":"string","description":"ID of the company created mass payout","format":"uuid"},"account":{"type":"string","description":"Merchant account ID"},"state":{"type":"string","description":"Represents status of the payout","enum":["CREATION_IN_PROGRESS","PENDING_CONFIRMATION","CONFIRMED","IN_PROGRESS","COMPLETED","FAILED","CANCELED","PARTIAL"]},"comment":{"type":"string","description":"Comment for the payout"},"name":{"type":"string","description":"Name of the payout"},"currency":{"type":"string","description":"This is the currency associated with the amount field"},"totalWithdrawalAmount":{"type":"number","description":"Total amount of all transactions in a mass payout"},"totalFee":{"type":"number","description":"Total service fee for the mass payout"},"totalFeePercentage":{"type":"number","description":"Total service fee for the mass payout in percentages"},"executionDate":{"type":"string","description":"Execution date of payout. Time when payout will be executed","format":"date-time"},"errors":{"$ref":"#/components/schemas/WithdrawalValidationErrorDTO"},"externalId":{"type":"string","description":"External ID"}},"description":"Response with mass payout data"},"WithdrawalValidationErrorDTO":{"required":["withdrawalErrors"],"type":"object","properties":{"withdrawalErrors":{"type":"array","description":"Payout error list","items":{"$ref":"#/components/schemas/WithdrawalValidationErrorItemDTO"}}},"description":"Payout errors details"},"WithdrawalValidationErrorItemDTO":{"required":["errors","withdrawalId"],"type":"object","properties":{"withdrawalId":{"type":"string","description":"Id of the withdrawal where error occurred"},"errors":{"type":"array","description":"Payout error list for the withdrawal","items":{"$ref":"#/components/schemas/WithdrawalValidationDTO"}}},"description":"Payout error list"},"WithdrawalValidationDTO":{"required":["errorResolved","id","status"],"type":"object","properties":{"id":{"type":"integer","description":"Id of the error","format":"int64"},"status":{"type":"string","description":"Validation status of the withdrawal","enum":["SUCCESS","NOT_ENOUGH_FUNDS","NOT_ENOUGH_FUNDS_FOR_COMMISSION","NOT_ENOUGH_FUNDS_FOR_SERVICE_COMMISSION","EXCEEDING_LIMIT"]},"errorResolved":{"type":"boolean","description":"Represents whether errors were resolved or not"},"errorMessage":{"type":"string","description":"Text of the error message"}},"description":"Payout error list for the withdrawal"},"PublicGatewayErrorResponse":{"required":["errorCode","message","traceId"],"type":"object","properties":{"traceId":{"type":"string"},"errorCode":{"type":"string"},"message":{"type":"string"}}}}}}
```

## New Mass Payout

> Permission annotations:

```json
{"openapi":"3.0.1","info":{"title":"Public API","version":"dev"},"tags":[{"name":"Payout API","description":"API for payouts"}],"servers":[{"url":"https://api.calypso.money","description":"Generated server url"}],"paths":{"/api/v1/payout/mass/create":{"post":{"tags":["Payout API"],"summary":"New Mass Payout","description":"Permission annotations:","operationId":"createMassDeal","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/WithAccountContainerMassDealCreateRequestDTO"}}},"required":true},"responses":{"200":{"description":"OK","content":{"*/*":{"schema":{"$ref":"#/components/schemas/PublicMassDealResponseDTO"}}}},"400":{"description":"Bad Request","content":{"*/*":{"schema":{"$ref":"#/components/schemas/PublicGatewayErrorResponse"}}}},"500":{"description":"Internal Server Error","content":{"*/*":{"schema":{"$ref":"#/components/schemas/PublicGatewayErrorResponse"}}}}}}}},"components":{"schemas":{"WithAccountContainerMassDealCreateRequestDTO":{"required":["account","payload","timestamp"],"type":"object","properties":{"account":{"pattern":"^0x[0-9a-fA-F]{40}$","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/MassDealCreateRequestDTO"}},"description":"Object with request data"},"MassDealCreateRequestDTO":{"required":["currency","massAddresses","name"],"type":"object","properties":{"currency":{"type":"string","description":"This is the currency associated with the amount field"},"name":{"maxLength":100,"minLength":0,"type":"string","description":"Mass payout name"},"comment":{"maxLength":1000,"minLength":0,"type":"string","description":"Comment for the mass payout"},"massAddresses":{"type":"array","description":"Object contains transaction details for each address","items":{"$ref":"#/components/schemas/MassPayoutAddressDTO"}},"executionDate":{"type":"string","description":"Execution date of payout. Can be used for payouts to date","format":"date-time"},"idempotencyKey":{"type":"string","description":"The external id in the uuid format that can be generated by user while creating the payout","format":"uuid"},"externalId":{"maxLength":255,"minLength":0,"type":"string","description":"The external id that can be generated by user for particular transaction while creating the payout"}},"description":"Request with mass payout creation data"},"MassPayoutAddressDTO":{"required":["amount","depositAddress"],"type":"object","properties":{"depositAddress":{"type":"string","description":"Recipient's crypto-address"},"amount":{"type":"number","description":"Transaction amount"},"comment":{"maxLength":140,"minLength":0,"type":"string","description":"Comment for the withdrawal transaction"}},"description":"Object contains transaction details for each address"},"PublicMassDealResponseDTO":{"required":["account","comment","companyId","id","idempotencyKey","state"],"type":"object","properties":{"id":{"type":"string","description":"Payout ID"},"idempotencyKey":{"type":"string","description":"The external ID in the UUID format that can be generated by user while creating the payout","format":"uuid"},"companyId":{"type":"string","description":"ID of the company created mass payout","format":"uuid"},"account":{"type":"string","description":"Merchant account ID"},"state":{"type":"string","description":"Represents status of the payout","enum":["CREATION_IN_PROGRESS","PENDING_CONFIRMATION","CONFIRMED","IN_PROGRESS","COMPLETED","FAILED","CANCELED","PARTIAL"]},"comment":{"type":"string","description":"Comment for the payout"},"name":{"type":"string","description":"Name of the payout"},"currency":{"type":"string","description":"This is the currency associated with the amount field"},"totalWithdrawalAmount":{"type":"number","description":"Total amount of all transactions in a mass payout"},"totalFee":{"type":"number","description":"Total service fee for the mass payout"},"totalFeePercentage":{"type":"number","description":"Total service fee for the mass payout in percentages"},"executionDate":{"type":"string","description":"Execution date of payout. Time when payout will be executed","format":"date-time"},"errors":{"$ref":"#/components/schemas/WithdrawalValidationErrorDTO"},"externalId":{"type":"string","description":"External ID"}},"description":"Response with mass payout data"},"WithdrawalValidationErrorDTO":{"required":["withdrawalErrors"],"type":"object","properties":{"withdrawalErrors":{"type":"array","description":"Payout error list","items":{"$ref":"#/components/schemas/WithdrawalValidationErrorItemDTO"}}},"description":"Payout errors details"},"WithdrawalValidationErrorItemDTO":{"required":["errors","withdrawalId"],"type":"object","properties":{"withdrawalId":{"type":"string","description":"Id of the withdrawal where error occurred"},"errors":{"type":"array","description":"Payout error list for the withdrawal","items":{"$ref":"#/components/schemas/WithdrawalValidationDTO"}}},"description":"Payout error list"},"WithdrawalValidationDTO":{"required":["errorResolved","id","status"],"type":"object","properties":{"id":{"type":"integer","description":"Id of the error","format":"int64"},"status":{"type":"string","description":"Validation status of the withdrawal","enum":["SUCCESS","NOT_ENOUGH_FUNDS","NOT_ENOUGH_FUNDS_FOR_COMMISSION","NOT_ENOUGH_FUNDS_FOR_SERVICE_COMMISSION","EXCEEDING_LIMIT"]},"errorResolved":{"type":"boolean","description":"Represents whether errors were resolved or not"},"errorMessage":{"type":"string","description":"Text of the error message"}},"description":"Payout error list for the withdrawal"},"PublicGatewayErrorResponse":{"required":["errorCode","message","traceId"],"type":"object","properties":{"traceId":{"type":"string"},"errorCode":{"type":"string"},"message":{"type":"string"}}}}}}
```

## Cancel Mass Payout

> Permission annotations:

```json
{"openapi":"3.0.1","info":{"title":"Public API","version":"dev"},"tags":[{"name":"Payout API","description":"API for payouts"}],"servers":[{"url":"https://api.calypso.money","description":"Generated server url"}],"paths":{"/api/v1/payout/mass/cancel":{"post":{"tags":["Payout API"],"summary":"Cancel Mass Payout","description":"Permission annotations:","operationId":"cancelMassDeal","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/WithAccountContainerPublicCancelDealRequestDTO"}}},"required":true},"responses":{"200":{"description":"OK","content":{"*/*":{"schema":{"$ref":"#/components/schemas/PublicMassDealResponseDTO"}}}},"400":{"description":"Bad Request","content":{"*/*":{"schema":{"$ref":"#/components/schemas/PublicGatewayErrorResponse"}}}},"500":{"description":"Internal Server Error","content":{"*/*":{"schema":{"$ref":"#/components/schemas/PublicGatewayErrorResponse"}}}}}}}},"components":{"schemas":{"WithAccountContainerPublicCancelDealRequestDTO":{"required":["account","payload","timestamp"],"type":"object","properties":{"account":{"pattern":"^0x[0-9a-fA-F]{40}$","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/PublicCancelDealRequestDTO"}},"description":"Object with request data"},"PublicCancelDealRequestDTO":{"required":["message"],"type":"object","properties":{"dealId":{"type":"string","description":"Id of the payout you want to cancel"},"idempotencyKey":{"type":"string","description":"The external id in the uuid format that can be generated by user while creating the payout","format":"uuid"},"message":{"type":"string","description":"Text with the cancellation reason"}},"description":"Request with payout cancellation data"},"PublicMassDealResponseDTO":{"required":["account","comment","companyId","id","idempotencyKey","state"],"type":"object","properties":{"id":{"type":"string","description":"Payout ID"},"idempotencyKey":{"type":"string","description":"The external ID in the UUID format that can be generated by user while creating the payout","format":"uuid"},"companyId":{"type":"string","description":"ID of the company created mass payout","format":"uuid"},"account":{"type":"string","description":"Merchant account ID"},"state":{"type":"string","description":"Represents status of the payout","enum":["CREATION_IN_PROGRESS","PENDING_CONFIRMATION","CONFIRMED","IN_PROGRESS","COMPLETED","FAILED","CANCELED","PARTIAL"]},"comment":{"type":"string","description":"Comment for the payout"},"name":{"type":"string","description":"Name of the payout"},"currency":{"type":"string","description":"This is the currency associated with the amount field"},"totalWithdrawalAmount":{"type":"number","description":"Total amount of all transactions in a mass payout"},"totalFee":{"type":"number","description":"Total service fee for the mass payout"},"totalFeePercentage":{"type":"number","description":"Total service fee for the mass payout in percentages"},"executionDate":{"type":"string","description":"Execution date of payout. Time when payout will be executed","format":"date-time"},"errors":{"$ref":"#/components/schemas/WithdrawalValidationErrorDTO"},"externalId":{"type":"string","description":"External ID"}},"description":"Response with mass payout data"},"WithdrawalValidationErrorDTO":{"required":["withdrawalErrors"],"type":"object","properties":{"withdrawalErrors":{"type":"array","description":"Payout error list","items":{"$ref":"#/components/schemas/WithdrawalValidationErrorItemDTO"}}},"description":"Payout errors details"},"WithdrawalValidationErrorItemDTO":{"required":["errors","withdrawalId"],"type":"object","properties":{"withdrawalId":{"type":"string","description":"Id of the withdrawal where error occurred"},"errors":{"type":"array","description":"Payout error list for the withdrawal","items":{"$ref":"#/components/schemas/WithdrawalValidationDTO"}}},"description":"Payout error list"},"WithdrawalValidationDTO":{"required":["errorResolved","id","status"],"type":"object","properties":{"id":{"type":"integer","description":"Id of the error","format":"int64"},"status":{"type":"string","description":"Validation status of the withdrawal","enum":["SUCCESS","NOT_ENOUGH_FUNDS","NOT_ENOUGH_FUNDS_FOR_COMMISSION","NOT_ENOUGH_FUNDS_FOR_SERVICE_COMMISSION","EXCEEDING_LIMIT"]},"errorResolved":{"type":"boolean","description":"Represents whether errors were resolved or not"},"errorMessage":{"type":"string","description":"Text of the error message"}},"description":"Payout error list for the withdrawal"},"PublicGatewayErrorResponse":{"required":["errorCode","message","traceId"],"type":"object","properties":{"traceId":{"type":"string"},"errorCode":{"type":"string"},"message":{"type":"string"}}}}}}
```

## Get all Mass Payouts

> Permission annotations:

```json
{"openapi":"3.0.1","info":{"title":"Public API","version":"dev"},"tags":[{"name":"Payout API","description":"API for payouts"}],"servers":[{"url":"https://api.calypso.money","description":"Generated server url"}],"paths":{"/api/v1/payout/mass/all":{"post":{"tags":["Payout API"],"summary":"Get all Mass Payouts","description":"Permission annotations:","operationId":"findMassDeals","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/WithAccountContainerDealsByStateRequestDTO"}}},"required":true},"responses":{"200":{"description":"OK","content":{"*/*":{"schema":{"$ref":"#/components/schemas/PageDTOPublicMassDealResponseDTO"}}}},"400":{"description":"Bad Request","content":{"*/*":{"schema":{"$ref":"#/components/schemas/PublicGatewayErrorResponse"}}}},"500":{"description":"Internal Server Error","content":{"*/*":{"schema":{"$ref":"#/components/schemas/PublicGatewayErrorResponse"}}}}}}}},"components":{"schemas":{"WithAccountContainerDealsByStateRequestDTO":{"required":["account","payload","timestamp"],"type":"object","properties":{"account":{"pattern":"^0x[0-9a-fA-F]{40}$","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/DealsByStateRequestDTO"}},"description":"Object with request data"},"DealsByStateRequestDTO":{"required":["pageNumber","size","stateNames"],"type":"object","properties":{"stateNames":{"type":"array","description":"Statuses of the payouts to return","items":{"type":"string","description":"Statuses of the payouts to return","enum":["CREATION_IN_PROGRESS","PENDING_CONFIRMATION","CONFIRMED","IN_PROGRESS","COMPLETED","FAILED","CANCELED","PARTIAL"]}},"isExecutionDateInFuture":{"type":"boolean","description":"If true, includes all payouts where execution date in future. if false, includes all payouts where execution date in past. if null includes all payouts"},"pageNumber":{"type":"integer","description":"Numeric value indicating the page number","format":"int32","default":1},"size":{"type":"integer","description":"Numeric value indicating the page size","format":"int32","default":10}},"description":"Request data for getting payouts by state"},"PageDTOPublicMassDealResponseDTO":{"required":["page","result","size","total","totalElements"],"type":"object","properties":{"result":{"type":"array","description":"Array of requested objects","items":{"$ref":"#/components/schemas/PublicMassDealResponseDTO"}},"page":{"type":"integer","description":"Numeric value indicating the page number","format":"int32"},"size":{"type":"integer","description":"Numeric value indicating the page size","format":"int32"},"total":{"type":"integer","description":"Total number of pages matching the query","format":"int32"},"totalElements":{"type":"integer","description":"Total number of objects matching the query","format":"int64"}},"description":"Object with page details"},"PublicMassDealResponseDTO":{"required":["account","comment","companyId","id","idempotencyKey","state"],"type":"object","properties":{"id":{"type":"string","description":"Payout ID"},"idempotencyKey":{"type":"string","description":"The external ID in the UUID format that can be generated by user while creating the payout","format":"uuid"},"companyId":{"type":"string","description":"ID of the company created mass payout","format":"uuid"},"account":{"type":"string","description":"Merchant account ID"},"state":{"type":"string","description":"Represents status of the payout","enum":["CREATION_IN_PROGRESS","PENDING_CONFIRMATION","CONFIRMED","IN_PROGRESS","COMPLETED","FAILED","CANCELED","PARTIAL"]},"comment":{"type":"string","description":"Comment for the payout"},"name":{"type":"string","description":"Name of the payout"},"currency":{"type":"string","description":"This is the currency associated with the amount field"},"totalWithdrawalAmount":{"type":"number","description":"Total amount of all transactions in a mass payout"},"totalFee":{"type":"number","description":"Total service fee for the mass payout"},"totalFeePercentage":{"type":"number","description":"Total service fee for the mass payout in percentages"},"executionDate":{"type":"string","description":"Execution date of payout. Time when payout will be executed","format":"date-time"},"errors":{"$ref":"#/components/schemas/WithdrawalValidationErrorDTO"},"externalId":{"type":"string","description":"External ID"}},"description":"Response with mass payout data"},"WithdrawalValidationErrorDTO":{"required":["withdrawalErrors"],"type":"object","properties":{"withdrawalErrors":{"type":"array","description":"Payout error list","items":{"$ref":"#/components/schemas/WithdrawalValidationErrorItemDTO"}}},"description":"Payout errors details"},"WithdrawalValidationErrorItemDTO":{"required":["errors","withdrawalId"],"type":"object","properties":{"withdrawalId":{"type":"string","description":"Id of the withdrawal where error occurred"},"errors":{"type":"array","description":"Payout error list for the withdrawal","items":{"$ref":"#/components/schemas/WithdrawalValidationDTO"}}},"description":"Payout error list"},"WithdrawalValidationDTO":{"required":["errorResolved","id","status"],"type":"object","properties":{"id":{"type":"integer","description":"Id of the error","format":"int64"},"status":{"type":"string","description":"Validation status of the withdrawal","enum":["SUCCESS","NOT_ENOUGH_FUNDS","NOT_ENOUGH_FUNDS_FOR_COMMISSION","NOT_ENOUGH_FUNDS_FOR_SERVICE_COMMISSION","EXCEEDING_LIMIT"]},"errorResolved":{"type":"boolean","description":"Represents whether errors were resolved or not"},"errorMessage":{"type":"string","description":"Text of the error message"}},"description":"Payout error list for the withdrawal"},"PublicGatewayErrorResponse":{"required":["errorCode","message","traceId"],"type":"object","properties":{"traceId":{"type":"string"},"errorCode":{"type":"string"},"message":{"type":"string"}}}}}}
```

## New Payout

> Permission annotations:

```json
{"openapi":"3.0.1","info":{"title":"Public API","version":"dev"},"tags":[{"name":"Payout API","description":"API for payouts"}],"servers":[{"url":"https://api.calypso.money","description":"Generated server url"}],"paths":{"/api/v1/payout/create":{"post":{"tags":["Payout API"],"summary":"New Payout","description":"Permission annotations:","operationId":"createDeal","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/WithAccountContainerPublicDealCreateRequestDTO"}}},"required":true},"responses":{"200":{"description":"OK","content":{"*/*":{"schema":{"$ref":"#/components/schemas/PublicDealResponseDTO"}}}},"400":{"description":"Bad Request","content":{"*/*":{"schema":{"$ref":"#/components/schemas/PublicGatewayErrorResponse"}}}},"500":{"description":"Internal Server Error","content":{"*/*":{"schema":{"$ref":"#/components/schemas/PublicGatewayErrorResponse"}}}}}}}},"components":{"schemas":{"WithAccountContainerPublicDealCreateRequestDTO":{"required":["account","payload","timestamp"],"type":"object","properties":{"account":{"pattern":"^0x[0-9a-fA-F]{40}$","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/PublicDealCreateRequestDTO"}},"description":"Object with request data"},"PublicDealCreateRequestDTO":{"required":["amount","currency","depositAddress"],"type":"object","properties":{"depositAddress":{"type":"string","description":"Recipient's crypto-address"},"amount":{"type":"number","description":"Withdrawal amount"},"currency":{"type":"string","description":"This is the currency associated with the amount field"},"comment":{"maxLength":1000,"minLength":0,"type":"string","description":"Comment for the payout"},"executionDate":{"type":"string","description":"Execution date of payout. Can be used for payouts to date","format":"date-time"},"idempotencyKey":{"type":"string","description":"The external id in the uuid format that can be generated by user while creating the payout","format":"uuid"},"externalId":{"maxLength":255,"minLength":0,"type":"string","description":"The external id that can be generated by user for particular transaction while creating the payout"}},"description":"Request for payout creation"},"PublicDealResponseDTO":{"required":["account","amount","belongingType","createdDate","currency","depositAddress","fee","feePercentage","id","state"],"type":"object","properties":{"id":{"type":"string","description":"Payout ID"},"account":{"type":"string","description":"Merchant account ID"},"depositAddress":{"type":"string","description":"Crypto address for deposit"},"amount":{"type":"number","description":"Withdrawal amount"},"currency":{"type":"string","description":"This is the currency associated with the amount field"},"fee":{"type":"number","description":"Service fee for the payout"},"feePercentage":{"type":"number","description":"Service fee in percentages"},"state":{"type":"string","description":"Represents status of the payout","enum":["CREATION_IN_PROGRESS","PENDING_CONFIRMATION","CONFIRMED","IN_PROGRESS","COMPLETED","FAILED","CANCELED","PARTIAL"]},"createdDate":{"type":"string","description":"Time of payout creation","format":"date-time"},"transactionHash":{"type":"string","description":"Hash of the transaction in blockchain"},"comment":{"type":"string","description":"Comment for the payout"},"executionDate":{"type":"string","description":"Execution date of payout. Can be used for payouts to date","format":"date-time"},"idempotencyKey":{"type":"string","description":"The external id that can be generated by user while creating the payout in the uuid format","format":"uuid"},"errors":{"$ref":"#/components/schemas/WithdrawalValidationErrorDTO"},"cancellation":{"$ref":"#/components/schemas/DealCancellationDTO"},"belongingType":{"type":"string","description":"Belonging type","enum":["INTERNAL","EXTERNAL"]},"externalId":{"type":"string","description":"External ID"}},"description":"Response with payout data"},"WithdrawalValidationErrorDTO":{"required":["withdrawalErrors"],"type":"object","properties":{"withdrawalErrors":{"type":"array","description":"Payout error list","items":{"$ref":"#/components/schemas/WithdrawalValidationErrorItemDTO"}}},"description":"Payout errors details"},"WithdrawalValidationErrorItemDTO":{"required":["errors","withdrawalId"],"type":"object","properties":{"withdrawalId":{"type":"string","description":"Id of the withdrawal where error occurred"},"errors":{"type":"array","description":"Payout error list for the withdrawal","items":{"$ref":"#/components/schemas/WithdrawalValidationDTO"}}},"description":"Payout error list"},"WithdrawalValidationDTO":{"required":["errorResolved","id","status"],"type":"object","properties":{"id":{"type":"integer","description":"Id of the error","format":"int64"},"status":{"type":"string","description":"Validation status of the withdrawal","enum":["SUCCESS","NOT_ENOUGH_FUNDS","NOT_ENOUGH_FUNDS_FOR_COMMISSION","NOT_ENOUGH_FUNDS_FOR_SERVICE_COMMISSION","EXCEEDING_LIMIT"]},"errorResolved":{"type":"boolean","description":"Represents whether errors were resolved or not"},"errorMessage":{"type":"string","description":"Text of the error message"}},"description":"Payout error list for the withdrawal"},"DealCancellationDTO":{"required":["cancelMessage","canceledByFirstname","canceledByLastname","canceledByUserId"],"type":"object","properties":{"canceledByUserId":{"type":"string","description":"User id who cancelled the payout"},"canceledByFirstname":{"type":"string","description":"First name of the user who cancelled the payout"},"canceledByLastname":{"type":"string","description":"Last name of the user who cancelled the payout"},"cancelMessage":{"type":"string","description":"Reason of payout cancellation"}},"description":"Payout cancellation details"},"PublicGatewayErrorResponse":{"required":["errorCode","message","traceId"],"type":"object","properties":{"traceId":{"type":"string"},"errorCode":{"type":"string"},"message":{"type":"string"}}}}}}
```

## Cancel Single Payout

> Permission annotations:

```json
{"openapi":"3.0.1","info":{"title":"Public API","version":"dev"},"tags":[{"name":"Payout API","description":"API for payouts"}],"servers":[{"url":"https://api.calypso.money","description":"Generated server url"}],"paths":{"/api/v1/payout/cancel":{"post":{"tags":["Payout API"],"summary":"Cancel Single Payout","description":"Permission annotations:","operationId":"cancelDeal","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/WithAccountContainerPublicCancelDealRequestDTO"}}},"required":true},"responses":{"200":{"description":"OK","content":{"*/*":{"schema":{"$ref":"#/components/schemas/PublicDealResponseDTO"}}}},"400":{"description":"Bad Request","content":{"*/*":{"schema":{"$ref":"#/components/schemas/PublicGatewayErrorResponse"}}}},"500":{"description":"Internal Server Error","content":{"*/*":{"schema":{"$ref":"#/components/schemas/PublicGatewayErrorResponse"}}}}}}}},"components":{"schemas":{"WithAccountContainerPublicCancelDealRequestDTO":{"required":["account","payload","timestamp"],"type":"object","properties":{"account":{"pattern":"^0x[0-9a-fA-F]{40}$","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/PublicCancelDealRequestDTO"}},"description":"Object with request data"},"PublicCancelDealRequestDTO":{"required":["message"],"type":"object","properties":{"dealId":{"type":"string","description":"Id of the payout you want to cancel"},"idempotencyKey":{"type":"string","description":"The external id in the uuid format that can be generated by user while creating the payout","format":"uuid"},"message":{"type":"string","description":"Text with the cancellation reason"}},"description":"Request with payout cancellation data"},"PublicDealResponseDTO":{"required":["account","amount","belongingType","createdDate","currency","depositAddress","fee","feePercentage","id","state"],"type":"object","properties":{"id":{"type":"string","description":"Payout ID"},"account":{"type":"string","description":"Merchant account ID"},"depositAddress":{"type":"string","description":"Crypto address for deposit"},"amount":{"type":"number","description":"Withdrawal amount"},"currency":{"type":"string","description":"This is the currency associated with the amount field"},"fee":{"type":"number","description":"Service fee for the payout"},"feePercentage":{"type":"number","description":"Service fee in percentages"},"state":{"type":"string","description":"Represents status of the payout","enum":["CREATION_IN_PROGRESS","PENDING_CONFIRMATION","CONFIRMED","IN_PROGRESS","COMPLETED","FAILED","CANCELED","PARTIAL"]},"createdDate":{"type":"string","description":"Time of payout creation","format":"date-time"},"transactionHash":{"type":"string","description":"Hash of the transaction in blockchain"},"comment":{"type":"string","description":"Comment for the payout"},"executionDate":{"type":"string","description":"Execution date of payout. Can be used for payouts to date","format":"date-time"},"idempotencyKey":{"type":"string","description":"The external id that can be generated by user while creating the payout in the uuid format","format":"uuid"},"errors":{"$ref":"#/components/schemas/WithdrawalValidationErrorDTO"},"cancellation":{"$ref":"#/components/schemas/DealCancellationDTO"},"belongingType":{"type":"string","description":"Belonging type","enum":["INTERNAL","EXTERNAL"]},"externalId":{"type":"string","description":"External ID"}},"description":"Response with payout data"},"WithdrawalValidationErrorDTO":{"required":["withdrawalErrors"],"type":"object","properties":{"withdrawalErrors":{"type":"array","description":"Payout error list","items":{"$ref":"#/components/schemas/WithdrawalValidationErrorItemDTO"}}},"description":"Payout errors details"},"WithdrawalValidationErrorItemDTO":{"required":["errors","withdrawalId"],"type":"object","properties":{"withdrawalId":{"type":"string","description":"Id of the withdrawal where error occurred"},"errors":{"type":"array","description":"Payout error list for the withdrawal","items":{"$ref":"#/components/schemas/WithdrawalValidationDTO"}}},"description":"Payout error list"},"WithdrawalValidationDTO":{"required":["errorResolved","id","status"],"type":"object","properties":{"id":{"type":"integer","description":"Id of the error","format":"int64"},"status":{"type":"string","description":"Validation status of the withdrawal","enum":["SUCCESS","NOT_ENOUGH_FUNDS","NOT_ENOUGH_FUNDS_FOR_COMMISSION","NOT_ENOUGH_FUNDS_FOR_SERVICE_COMMISSION","EXCEEDING_LIMIT"]},"errorResolved":{"type":"boolean","description":"Represents whether errors were resolved or not"},"errorMessage":{"type":"string","description":"Text of the error message"}},"description":"Payout error list for the withdrawal"},"DealCancellationDTO":{"required":["cancelMessage","canceledByFirstname","canceledByLastname","canceledByUserId"],"type":"object","properties":{"canceledByUserId":{"type":"string","description":"User id who cancelled the payout"},"canceledByFirstname":{"type":"string","description":"First name of the user who cancelled the payout"},"canceledByLastname":{"type":"string","description":"Last name of the user who cancelled the payout"},"cancelMessage":{"type":"string","description":"Reason of payout cancellation"}},"description":"Payout cancellation details"},"PublicGatewayErrorResponse":{"required":["errorCode","message","traceId"],"type":"object","properties":{"traceId":{"type":"string"},"errorCode":{"type":"string"},"message":{"type":"string"}}}}}}
```

## Get all Payouts

> Permission annotations:

```json
{"openapi":"3.0.1","info":{"title":"Public API","version":"dev"},"tags":[{"name":"Payout API","description":"API for payouts"}],"servers":[{"url":"https://api.calypso.money","description":"Generated server url"}],"paths":{"/api/v1/payout/all":{"post":{"tags":["Payout API"],"summary":"Get all Payouts","description":"Permission annotations:","operationId":"findDeals","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/WithAccountContainerDealsByStateRequestDTO"}}},"required":true},"responses":{"200":{"description":"OK","content":{"*/*":{"schema":{"$ref":"#/components/schemas/PageDTOPublicDealResponseDTO"}}}},"400":{"description":"Bad Request","content":{"*/*":{"schema":{"$ref":"#/components/schemas/PublicGatewayErrorResponse"}}}},"500":{"description":"Internal Server Error","content":{"*/*":{"schema":{"$ref":"#/components/schemas/PublicGatewayErrorResponse"}}}}}}}},"components":{"schemas":{"WithAccountContainerDealsByStateRequestDTO":{"required":["account","payload","timestamp"],"type":"object","properties":{"account":{"pattern":"^0x[0-9a-fA-F]{40}$","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/DealsByStateRequestDTO"}},"description":"Object with request data"},"DealsByStateRequestDTO":{"required":["pageNumber","size","stateNames"],"type":"object","properties":{"stateNames":{"type":"array","description":"Statuses of the payouts to return","items":{"type":"string","description":"Statuses of the payouts to return","enum":["CREATION_IN_PROGRESS","PENDING_CONFIRMATION","CONFIRMED","IN_PROGRESS","COMPLETED","FAILED","CANCELED","PARTIAL"]}},"isExecutionDateInFuture":{"type":"boolean","description":"If true, includes all payouts where execution date in future. if false, includes all payouts where execution date in past. if null includes all payouts"},"pageNumber":{"type":"integer","description":"Numeric value indicating the page number","format":"int32","default":1},"size":{"type":"integer","description":"Numeric value indicating the page size","format":"int32","default":10}},"description":"Request data for getting payouts by state"},"PageDTOPublicDealResponseDTO":{"required":["page","result","size","total","totalElements"],"type":"object","properties":{"result":{"type":"array","description":"Array of requested objects","items":{"$ref":"#/components/schemas/PublicDealResponseDTO"}},"page":{"type":"integer","description":"Numeric value indicating the page number","format":"int32"},"size":{"type":"integer","description":"Numeric value indicating the page size","format":"int32"},"total":{"type":"integer","description":"Total number of pages matching the query","format":"int32"},"totalElements":{"type":"integer","description":"Total number of objects matching the query","format":"int64"}},"description":"Object with page details"},"PublicDealResponseDTO":{"required":["account","amount","belongingType","createdDate","currency","depositAddress","fee","feePercentage","id","state"],"type":"object","properties":{"id":{"type":"string","description":"Payout ID"},"account":{"type":"string","description":"Merchant account ID"},"depositAddress":{"type":"string","description":"Crypto address for deposit"},"amount":{"type":"number","description":"Withdrawal amount"},"currency":{"type":"string","description":"This is the currency associated with the amount field"},"fee":{"type":"number","description":"Service fee for the payout"},"feePercentage":{"type":"number","description":"Service fee in percentages"},"state":{"type":"string","description":"Represents status of the payout","enum":["CREATION_IN_PROGRESS","PENDING_CONFIRMATION","CONFIRMED","IN_PROGRESS","COMPLETED","FAILED","CANCELED","PARTIAL"]},"createdDate":{"type":"string","description":"Time of payout creation","format":"date-time"},"transactionHash":{"type":"string","description":"Hash of the transaction in blockchain"},"comment":{"type":"string","description":"Comment for the payout"},"executionDate":{"type":"string","description":"Execution date of payout. Can be used for payouts to date","format":"date-time"},"idempotencyKey":{"type":"string","description":"The external id that can be generated by user while creating the payout in the uuid format","format":"uuid"},"errors":{"$ref":"#/components/schemas/WithdrawalValidationErrorDTO"},"cancellation":{"$ref":"#/components/schemas/DealCancellationDTO"},"belongingType":{"type":"string","description":"Belonging type","enum":["INTERNAL","EXTERNAL"]},"externalId":{"type":"string","description":"External ID"}},"description":"Response with payout data"},"WithdrawalValidationErrorDTO":{"required":["withdrawalErrors"],"type":"object","properties":{"withdrawalErrors":{"type":"array","description":"Payout error list","items":{"$ref":"#/components/schemas/WithdrawalValidationErrorItemDTO"}}},"description":"Payout errors details"},"WithdrawalValidationErrorItemDTO":{"required":["errors","withdrawalId"],"type":"object","properties":{"withdrawalId":{"type":"string","description":"Id of the withdrawal where error occurred"},"errors":{"type":"array","description":"Payout error list for the withdrawal","items":{"$ref":"#/components/schemas/WithdrawalValidationDTO"}}},"description":"Payout error list"},"WithdrawalValidationDTO":{"required":["errorResolved","id","status"],"type":"object","properties":{"id":{"type":"integer","description":"Id of the error","format":"int64"},"status":{"type":"string","description":"Validation status of the withdrawal","enum":["SUCCESS","NOT_ENOUGH_FUNDS","NOT_ENOUGH_FUNDS_FOR_COMMISSION","NOT_ENOUGH_FUNDS_FOR_SERVICE_COMMISSION","EXCEEDING_LIMIT"]},"errorResolved":{"type":"boolean","description":"Represents whether errors were resolved or not"},"errorMessage":{"type":"string","description":"Text of the error message"}},"description":"Payout error list for the withdrawal"},"DealCancellationDTO":{"required":["cancelMessage","canceledByFirstname","canceledByLastname","canceledByUserId"],"type":"object","properties":{"canceledByUserId":{"type":"string","description":"User id who cancelled the payout"},"canceledByFirstname":{"type":"string","description":"First name of the user who cancelled the payout"},"canceledByLastname":{"type":"string","description":"Last name of the user who cancelled the payout"},"cancelMessage":{"type":"string","description":"Reason of payout cancellation"}},"description":"Payout cancellation details"},"PublicGatewayErrorResponse":{"required":["errorCode","message","traceId"],"type":"object","properties":{"traceId":{"type":"string"},"errorCode":{"type":"string"},"message":{"type":"string"}}}}}}
```


---

# Agent Instructions
This documentation is published with GitBook. GitBook is the documentation platform designed so that both humans and AI agents can read, navigate, and reason over technical content effectively. Learn more at gitbook.com.

## Querying This Documentation
If you need additional information that is not directly available in this page, you can query the documentation dynamically by asking a question.

Perform an HTTP GET request on the current page URL with the `ask` query parameter:

```
GET https://docs.calypso.money/api-reference/payout-api.md?ask=<question>
```

The question should be specific, self-contained, and written in natural language.
The response will contain a direct answer to the question and relevant excerpts and sources from the documentation.

Use this mechanism when the answer is not explicitly present in the current page, you need clarification or additional context, or you want to retrieve related documentation sections.
