> 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/settlement-payout-api.md).

# Settlement Payout API

API for settlement payout

## Get a payout

> Permission annotations:

```json
{"openapi":"3.0.1","info":{"title":"Public API","version":"dev"},"tags":[{"name":"Settlement Payout API","description":"API for settlement payout"}],"servers":[{"url":"https://api.calypso.money","description":"Generated server url"}],"paths":{"/api/v1/settlement/payout":{"post":{"tags":["Settlement Payout API"],"summary":"Get a payout","description":"Permission annotations:","operationId":"getPayout","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/WithAccountContainerByIdStringOrIdempotencyKeyRequestDTO"}}},"required":true},"responses":{"200":{"description":"OK","content":{"*/*":{"schema":{"$ref":"#/components/schemas/PGDealResponseDTO"}}}},"400":{"description":"Bad Request","content":{"*/*":{"schema":{"$ref":"#/components/schemas/PublicGatewayErrorResponse"}}}},"500":{"description":"Internal Server Error","content":{"*/*":{"schema":{"$ref":"#/components/schemas/PublicGatewayErrorResponse"}}}}}}}},"components":{"schemas":{"WithAccountContainerByIdStringOrIdempotencyKeyRequestDTO":{"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/ByIdStringOrIdempotencyKeyRequestDTO"}},"description":"Object with request data"},"ByIdStringOrIdempotencyKeyRequestDTO":{"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"},"PGDealResponseDTO":{"required":["account","amount","createdDate","currency","depositAddress","fee","feeCurrency","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"},"feeCurrency":{"type":"string","description":"Service fee currency for the payout"},"blockchainFee":{"type":"number","description":"Blockchain fee"},"blockchainFeeCurrency":{"type":"string","description":"Blockchain fee currency"},"state":{"type":"string","description":"Represents status of the payout","enum":["CREATION_IN_PROGRESS","PENDING_CONFIRMATION","CONFIRMED","IN_PROGRESS","WAITING_COMPLETION_ERRORS","PARTIAL","COMPLETED","FAILED","CANCELED"]},"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"},"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/PGDealCancellationDTO"},"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"},"PGDealCancellationDTO":{"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 a withdrawal

> Permission annotations:

```json
{"openapi":"3.0.1","info":{"title":"Public API","version":"dev"},"tags":[{"name":"Settlement Payout API","description":"API for settlement payout"}],"servers":[{"url":"https://api.calypso.money","description":"Generated server url"}],"paths":{"/api/v1/settlement/payout/withdrawals":{"post":{"tags":["Settlement Payout API"],"summary":"Get a withdrawal","description":"Permission annotations:","operationId":"getPayoutWithdrawal","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/WithAccountContainerByStringIdRequestDTO"}}},"required":true},"responses":{"200":{"description":"OK","content":{"*/*":{"schema":{"$ref":"#/components/schemas/PGDealWithdrawalResponseDTO"}}}},"400":{"description":"Bad Request","content":{"*/*":{"schema":{"$ref":"#/components/schemas/PublicGatewayErrorResponse"}}}},"500":{"description":"Internal Server Error","content":{"*/*":{"schema":{"$ref":"#/components/schemas/PublicGatewayErrorResponse"}}}}}}}},"components":{"schemas":{"WithAccountContainerByStringIdRequestDTO":{"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/ByStringIdRequestDTO"}},"description":"Object with request data"},"ByStringIdRequestDTO":{"required":["requestId"],"type":"object","properties":{"requestId":{"type":"string","description":"The id of the object"}},"description":"Object with request id parameter"},"PGDealWithdrawalResponseDTO":{"required":["account","amount","createdDate","currency","depositAddress","fee","feeCurrency","id","state","withdrawalErrors"],"type":"object","properties":{"id":{"type":"string","description":"Id of the payout includes this transaction"},"account":{"type":"string","description":"Merchant account ID"},"withdrawalId":{"type":"integer","description":"Transaction id","format":"int64"},"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"},"feeCurrency":{"type":"string","description":"Service fee currency for the withdrawal"},"blockchainFee":{"type":"number","description":"Blockchain fee"},"blockchainFeeCurrency":{"type":"string","description":"Blockchain fee currency"},"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"}}},"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 withdrawals

> Permission annotations:

```json
{"openapi":"3.0.1","info":{"title":"Public API","version":"dev"},"tags":[{"name":"Settlement Payout API","description":"API for settlement payout"}],"servers":[{"url":"https://api.calypso.money","description":"Generated server url"}],"paths":{"/api/v1/settlement/payout/withdrawals/all":{"post":{"tags":["Settlement Payout API"],"summary":"Get withdrawals","description":"Permission annotations:","operationId":"getPayoutWithdrawals","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/WithAccountContainerPGDealWithdrawalsByStateRequestDTO"}}},"required":true},"responses":{"200":{"description":"OK","content":{"*/*":{"schema":{"$ref":"#/components/schemas/PageDTOPGDealWithdrawalResponseDTO"}}}},"400":{"description":"Bad Request","content":{"*/*":{"schema":{"$ref":"#/components/schemas/PublicGatewayErrorResponse"}}}},"500":{"description":"Internal Server Error","content":{"*/*":{"schema":{"$ref":"#/components/schemas/PublicGatewayErrorResponse"}}}}}}}},"components":{"schemas":{"WithAccountContainerPGDealWithdrawalsByStateRequestDTO":{"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/PGDealWithdrawalsByStateRequestDTO"}},"description":"Object with request data"},"PGDealWithdrawalsByStateRequestDTO":{"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"},"PageDTOPGDealWithdrawalResponseDTO":{"required":["page","result","size","total","totalElements"],"type":"object","properties":{"result":{"type":"array","description":"Array of requested objects","items":{"$ref":"#/components/schemas/PGDealWithdrawalResponseDTO"}},"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"},"PGDealWithdrawalResponseDTO":{"required":["account","amount","createdDate","currency","depositAddress","fee","feeCurrency","id","state","withdrawalErrors"],"type":"object","properties":{"id":{"type":"string","description":"Id of the payout includes this transaction"},"account":{"type":"string","description":"Merchant account ID"},"withdrawalId":{"type":"integer","description":"Transaction id","format":"int64"},"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"},"feeCurrency":{"type":"string","description":"Service fee currency for the withdrawal"},"blockchainFee":{"type":"number","description":"Blockchain fee"},"blockchainFeeCurrency":{"type":"string","description":"Blockchain fee currency"},"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"}}},"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 a mass payout

> Permission annotations:

```json
{"openapi":"3.0.1","info":{"title":"Public API","version":"dev"},"tags":[{"name":"Settlement Payout API","description":"API for settlement payout"}],"servers":[{"url":"https://api.calypso.money","description":"Generated server url"}],"paths":{"/api/v1/settlement/payout/mass":{"post":{"tags":["Settlement Payout API"],"summary":"Get a mass payout","description":"Permission annotations:","operationId":"getMassPayout","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/WithAccountContainerByIdStringOrIdempotencyKeyRequestDTO"}}},"required":true},"responses":{"200":{"description":"OK","content":{"*/*":{"schema":{"$ref":"#/components/schemas/PGMassDealResponseDTO"}}}},"400":{"description":"Bad Request","content":{"*/*":{"schema":{"$ref":"#/components/schemas/PublicGatewayErrorResponse"}}}},"500":{"description":"Internal Server Error","content":{"*/*":{"schema":{"$ref":"#/components/schemas/PublicGatewayErrorResponse"}}}}}}}},"components":{"schemas":{"WithAccountContainerByIdStringOrIdempotencyKeyRequestDTO":{"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/ByIdStringOrIdempotencyKeyRequestDTO"}},"description":"Object with request data"},"ByIdStringOrIdempotencyKeyRequestDTO":{"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"},"PGMassDealResponseDTO":{"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","WAITING_COMPLETION_ERRORS","PARTIAL","COMPLETED","FAILED","CANCELED"]},"comment":{"type":"string","description":"Comment for the payout"},"name":{"type":"string","description":"Name of the payout"},"currency":{"type":"string","description":"Payout currency"},"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"},"feeCurrency":{"type":"string","description":"Service fee currency"},"blockchainFee":{"type":"number","description":"Blockchain fee"},"blockchainFeeCurrency":{"type":"string","description":"Blockchain fee currency"},"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"}}}}}}
```

## Create a mass payout

> Permission annotations:

```json
{"openapi":"3.0.1","info":{"title":"Public API","version":"dev"},"tags":[{"name":"Settlement Payout API","description":"API for settlement payout"}],"servers":[{"url":"https://api.calypso.money","description":"Generated server url"}],"paths":{"/api/v1/settlement/payout/mass/create":{"post":{"tags":["Settlement Payout API"],"summary":"Create a mass payout","description":"Permission annotations:","operationId":"createMassPayout","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/WithAccountContainerPGMassDealCreateRequestDTO"}}},"required":true},"responses":{"200":{"description":"OK","content":{"*/*":{"schema":{"$ref":"#/components/schemas/PGMassDealResponseDTO"}}}},"400":{"description":"Bad Request","content":{"*/*":{"schema":{"$ref":"#/components/schemas/PublicGatewayErrorResponse"}}}},"500":{"description":"Internal Server Error","content":{"*/*":{"schema":{"$ref":"#/components/schemas/PublicGatewayErrorResponse"}}}}}}}},"components":{"schemas":{"WithAccountContainerPGMassDealCreateRequestDTO":{"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/PGMassDealCreateRequestDTO"}},"description":"Object with request data"},"PGMassDealCreateRequestDTO":{"required":["currency","idempotencyKey","massAddresses","name","withdrawalAddress"],"type":"object","properties":{"withdrawalAddress":{"type":"string","description":"Адрес кошелька вывода"},"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"},"PGMassDealResponseDTO":{"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","WAITING_COMPLETION_ERRORS","PARTIAL","COMPLETED","FAILED","CANCELED"]},"comment":{"type":"string","description":"Comment for the payout"},"name":{"type":"string","description":"Name of the payout"},"currency":{"type":"string","description":"Payout currency"},"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"},"feeCurrency":{"type":"string","description":"Service fee currency"},"blockchainFee":{"type":"number","description":"Blockchain fee"},"blockchainFeeCurrency":{"type":"string","description":"Blockchain fee currency"},"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":"Settlement Payout API","description":"API for settlement payout"}],"servers":[{"url":"https://api.calypso.money","description":"Generated server url"}],"paths":{"/api/v1/settlement/payout/mass/cancel":{"post":{"tags":["Settlement Payout API"],"summary":"Cancel mass payout","description":"Permission annotations:","operationId":"cancelMassPayout","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/WithAccountContainerPGDealCancelRequestDTO"}}},"required":true},"responses":{"200":{"description":"OK","content":{"*/*":{"schema":{"$ref":"#/components/schemas/PGMassDealResponseDTO"}}}},"400":{"description":"Bad Request","content":{"*/*":{"schema":{"$ref":"#/components/schemas/PublicGatewayErrorResponse"}}}},"500":{"description":"Internal Server Error","content":{"*/*":{"schema":{"$ref":"#/components/schemas/PublicGatewayErrorResponse"}}}}}}}},"components":{"schemas":{"WithAccountContainerPGDealCancelRequestDTO":{"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/PGDealCancelRequestDTO"}},"description":"Object with request data"},"PGDealCancelRequestDTO":{"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"},"PGMassDealResponseDTO":{"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","WAITING_COMPLETION_ERRORS","PARTIAL","COMPLETED","FAILED","CANCELED"]},"comment":{"type":"string","description":"Comment for the payout"},"name":{"type":"string","description":"Name of the payout"},"currency":{"type":"string","description":"Payout currency"},"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"},"feeCurrency":{"type":"string","description":"Service fee currency"},"blockchainFee":{"type":"number","description":"Blockchain fee"},"blockchainFeeCurrency":{"type":"string","description":"Blockchain fee currency"},"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 mass payouts

> Permission annotations:

```json
{"openapi":"3.0.1","info":{"title":"Public API","version":"dev"},"tags":[{"name":"Settlement Payout API","description":"API for settlement payout"}],"servers":[{"url":"https://api.calypso.money","description":"Generated server url"}],"paths":{"/api/v1/settlement/payout/mass/all":{"post":{"tags":["Settlement Payout API"],"summary":"Get mass payouts","description":"Permission annotations:","operationId":"getMassPayouts","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/WithAccountContainerPGDealsByStateRequestDTO"}}},"required":true},"responses":{"200":{"description":"OK","content":{"*/*":{"schema":{"$ref":"#/components/schemas/PageDTOPGMassDealResponseDTO"}}}},"400":{"description":"Bad Request","content":{"*/*":{"schema":{"$ref":"#/components/schemas/PublicGatewayErrorResponse"}}}},"500":{"description":"Internal Server Error","content":{"*/*":{"schema":{"$ref":"#/components/schemas/PublicGatewayErrorResponse"}}}}}}}},"components":{"schemas":{"WithAccountContainerPGDealsByStateRequestDTO":{"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/PGDealsByStateRequestDTO"}},"description":"Object with request data"},"PGDealsByStateRequestDTO":{"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","WAITING_COMPLETION_ERRORS","PARTIAL","COMPLETED","FAILED","CANCELED"]}},"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"},"PageDTOPGMassDealResponseDTO":{"required":["page","result","size","total","totalElements"],"type":"object","properties":{"result":{"type":"array","description":"Array of requested objects","items":{"$ref":"#/components/schemas/PGMassDealResponseDTO"}},"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"},"PGMassDealResponseDTO":{"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","WAITING_COMPLETION_ERRORS","PARTIAL","COMPLETED","FAILED","CANCELED"]},"comment":{"type":"string","description":"Comment for the payout"},"name":{"type":"string","description":"Name of the payout"},"currency":{"type":"string","description":"Payout currency"},"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"},"feeCurrency":{"type":"string","description":"Service fee currency"},"blockchainFee":{"type":"number","description":"Blockchain fee"},"blockchainFeeCurrency":{"type":"string","description":"Blockchain fee currency"},"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"}}}}}}
```

## Create a payout

> Permission annotations:

```json
{"openapi":"3.0.1","info":{"title":"Public API","version":"dev"},"tags":[{"name":"Settlement Payout API","description":"API for settlement payout"}],"servers":[{"url":"https://api.calypso.money","description":"Generated server url"}],"paths":{"/api/v1/settlement/payout/create":{"post":{"tags":["Settlement Payout API"],"summary":"Create a payout","description":"Permission annotations:","operationId":"createPayout","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/WithAccountContainerPGDealCreateRequestDTO"}}},"required":true},"responses":{"200":{"description":"OK","content":{"*/*":{"schema":{"$ref":"#/components/schemas/PGDealResponseDTO"}}}},"400":{"description":"Bad Request","content":{"*/*":{"schema":{"$ref":"#/components/schemas/PublicGatewayErrorResponse"}}}},"500":{"description":"Internal Server Error","content":{"*/*":{"schema":{"$ref":"#/components/schemas/PublicGatewayErrorResponse"}}}}}}}},"components":{"schemas":{"WithAccountContainerPGDealCreateRequestDTO":{"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/PGDealCreateRequestDTO"}},"description":"Object with request data"},"PGDealCreateRequestDTO":{"required":["amount","currency","depositAddress","idempotencyKey","withdrawalAddress"],"type":"object","properties":{"withdrawalAddress":{"type":"string","description":"Sender's crypto-address"},"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"},"PGDealResponseDTO":{"required":["account","amount","createdDate","currency","depositAddress","fee","feeCurrency","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"},"feeCurrency":{"type":"string","description":"Service fee currency for the payout"},"blockchainFee":{"type":"number","description":"Blockchain fee"},"blockchainFeeCurrency":{"type":"string","description":"Blockchain fee currency"},"state":{"type":"string","description":"Represents status of the payout","enum":["CREATION_IN_PROGRESS","PENDING_CONFIRMATION","CONFIRMED","IN_PROGRESS","WAITING_COMPLETION_ERRORS","PARTIAL","COMPLETED","FAILED","CANCELED"]},"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"},"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/PGDealCancellationDTO"},"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"},"PGDealCancellationDTO":{"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 payout

> Permission annotations:

```json
{"openapi":"3.0.1","info":{"title":"Public API","version":"dev"},"tags":[{"name":"Settlement Payout API","description":"API for settlement payout"}],"servers":[{"url":"https://api.calypso.money","description":"Generated server url"}],"paths":{"/api/v1/settlement/payout/cancel":{"post":{"tags":["Settlement Payout API"],"summary":"Cancel payout","description":"Permission annotations:","operationId":"cancelPayout","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/WithAccountContainerPGDealCancelRequestDTO"}}},"required":true},"responses":{"200":{"description":"OK","content":{"*/*":{"schema":{"$ref":"#/components/schemas/PGDealResponseDTO"}}}},"400":{"description":"Bad Request","content":{"*/*":{"schema":{"$ref":"#/components/schemas/PublicGatewayErrorResponse"}}}},"500":{"description":"Internal Server Error","content":{"*/*":{"schema":{"$ref":"#/components/schemas/PublicGatewayErrorResponse"}}}}}}}},"components":{"schemas":{"WithAccountContainerPGDealCancelRequestDTO":{"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/PGDealCancelRequestDTO"}},"description":"Object with request data"},"PGDealCancelRequestDTO":{"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"},"PGDealResponseDTO":{"required":["account","amount","createdDate","currency","depositAddress","fee","feeCurrency","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"},"feeCurrency":{"type":"string","description":"Service fee currency for the payout"},"blockchainFee":{"type":"number","description":"Blockchain fee"},"blockchainFeeCurrency":{"type":"string","description":"Blockchain fee currency"},"state":{"type":"string","description":"Represents status of the payout","enum":["CREATION_IN_PROGRESS","PENDING_CONFIRMATION","CONFIRMED","IN_PROGRESS","WAITING_COMPLETION_ERRORS","PARTIAL","COMPLETED","FAILED","CANCELED"]},"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"},"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/PGDealCancellationDTO"},"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"},"PGDealCancellationDTO":{"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 payouts

> Permission annotations:

```json
{"openapi":"3.0.1","info":{"title":"Public API","version":"dev"},"tags":[{"name":"Settlement Payout API","description":"API for settlement payout"}],"servers":[{"url":"https://api.calypso.money","description":"Generated server url"}],"paths":{"/api/v1/settlement/payout/all":{"post":{"tags":["Settlement Payout API"],"summary":"Get payouts","description":"Permission annotations:","operationId":"getPayouts","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/WithAccountContainerPGDealsByStateRequestDTO"}}},"required":true},"responses":{"200":{"description":"OK","content":{"*/*":{"schema":{"$ref":"#/components/schemas/PageDTOPGDealResponseDTO"}}}},"400":{"description":"Bad Request","content":{"*/*":{"schema":{"$ref":"#/components/schemas/PublicGatewayErrorResponse"}}}},"500":{"description":"Internal Server Error","content":{"*/*":{"schema":{"$ref":"#/components/schemas/PublicGatewayErrorResponse"}}}}}}}},"components":{"schemas":{"WithAccountContainerPGDealsByStateRequestDTO":{"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/PGDealsByStateRequestDTO"}},"description":"Object with request data"},"PGDealsByStateRequestDTO":{"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","WAITING_COMPLETION_ERRORS","PARTIAL","COMPLETED","FAILED","CANCELED"]}},"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"},"PageDTOPGDealResponseDTO":{"required":["page","result","size","total","totalElements"],"type":"object","properties":{"result":{"type":"array","description":"Array of requested objects","items":{"$ref":"#/components/schemas/PGDealResponseDTO"}},"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"},"PGDealResponseDTO":{"required":["account","amount","createdDate","currency","depositAddress","fee","feeCurrency","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"},"feeCurrency":{"type":"string","description":"Service fee currency for the payout"},"blockchainFee":{"type":"number","description":"Blockchain fee"},"blockchainFeeCurrency":{"type":"string","description":"Blockchain fee currency"},"state":{"type":"string","description":"Represents status of the payout","enum":["CREATION_IN_PROGRESS","PENDING_CONFIRMATION","CONFIRMED","IN_PROGRESS","WAITING_COMPLETION_ERRORS","PARTIAL","COMPLETED","FAILED","CANCELED"]},"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"},"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/PGDealCancellationDTO"},"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"},"PGDealCancellationDTO":{"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/settlement-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.
