# Invoice API

API for invoices

## Get a specific Invoice

> Permission annotations:

```json
{"openapi":"3.0.1","info":{"title":"Public API","version":"dev"},"tags":[{"name":"Invoice API","description":"API for invoices"}],"servers":[{"url":"https://api.calypso.finance","description":"Generated server url"}],"paths":{"/api/v1/invoice":{"post":{"tags":["Invoice API"],"summary":"Get a specific Invoice","description":"Permission annotations:","operationId":"getInvoice","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/InvoiceDTO"}}}},"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":{"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"},"InvoiceDTO":{"required":["createdDate","currency","description","fiatAvailable","id","idempotencyKey","invoiceAddress","isInterventionResolved","state","subscriptionEnabled","totalDebitAmount","type"],"type":"object","properties":{"id":{"type":"string","description":"Invoice id"},"invoiceAddress":{"type":"string","description":"Crypto address for deposit"},"type":{"type":"string","description":"The type of the invoice. SINGLE - allows to receive one payment in crypto-currency. SINGLE_FIAT - allows to receive one payment in crypto-currency but amount to pay is set in fiat currency. UNLIMITED - allows to receive unlimited amount of payments in crypto-currency. BOUND - allows to receive one payment with any money amount upper than settled in parameters","enum":["SINGLE","SINGLE_FIAT","UNLIMITED","UNLIMITED_LINKED","BOUND"]},"amount":{"type":"number","description":"Amount of the invoice"},"fee":{"type":"number","description":"Service fee for invoice. This amount will be deducted from invoice amount"},"totalDebitAmount":{"type":"number","description":"The total amount of money received on the invoice wallet"},"currency":{"type":"string","description":"Currency of the invoice"},"state":{"type":"string","description":"Status of the invoice","enum":["MEM_POOL_FOUND","PENDING_PAYMENT","PAID","COMPLETED","PENDING_INTERVENTION","CANCEL","ARCHIVED","DECLINED","PENDING_COMPLIANCE_CHECK","REVERSED"]},"lastDepositHash":{"type":"string","description":"Hash of the last deposit transaction to the invoice"},"description":{"type":"string","description":"Short invoice description"},"createdDate":{"type":"string","description":"Time of invoice creation","format":"date-time"},"idempotencyKey":{"type":"string","description":"The external id in the uuid format that can be generated by user while creating the invoice","format":"uuid"},"expiration":{"type":"string","description":"Server timestamp of invoice expiration moment","format":"date-time"},"fiatAmount":{"type":"number","description":"Amount of fiat money set for SINGLE_FIAT_INVOICE"},"fiatCurrency":{"type":"string","description":"Currency of featAmount"},"lastFiatUpdated":{"type":"string","description":"Time when the exchange rate was updated last time in SINGLE_FIAT invoices","format":"date-time"},"interventionType":{"type":"string","description":"Represents the case of intervention: UNDERPAY - client paid less money than payAmount, OVERPAY - client paid more money than payAmount","enum":["OVERPAY","UNDERPAY"]},"isInterventionResolved":{"type":"boolean","description":"Represents whether the intervention was resolved or not (set by user)"},"subscriptionEnabled":{"type":"boolean","description":"Represents whether client subscribed on email notifications or not"},"returnUrl":{"type":"string","description":"Link to the web page where client can come back to from payment link (page with invoice data for payment)"},"logoUrl":{"type":"string","description":"Link to the logo of merchant which will be shown in the payment link (page with invoice data for payment). The logo must be in PNG format. Recommended size 100*24 px"},"supportUrl":{"type":"string","description":"Link to the merchant support page where client can go to from payment link (page with invoice data for payment)"},"externalId":{"type":"string","description":"Merchant ID that can be assigned to invoice or several invoices in string format"},"lowerBound":{"type":"number","description":"Minimal amount for invoice deposit in BOUND invoices. Deposits with lower amount will be ignored"},"autoconversion":{"$ref":"#/components/schemas/AutoconversionDTO"},"fiatAvailable":{"type":"boolean","description":"Fiat available"}},"description":"Response with invoice data"},"AutoconversionDTO":{"required":["targetCurrency"],"type":"object","properties":{"targetCurrency":{"type":"string","description":"Target currency"},"amount":{"type":"number","description":"The pre-calculated amount or the actual amount after the conversion is completed"}},"description":"Response data of the Invoice Autoconversion configuration"},"PublicGatewayErrorResponse":{"required":["errorCode","message","traceId"],"type":"object","properties":{"traceId":{"type":"string"},"errorCode":{"type":"string"},"message":{"type":"string"}}}}}}
```

## New Unlimited Invoice

> Permission annotations:

```json
{"openapi":"3.0.1","info":{"title":"Public API","version":"dev"},"tags":[{"name":"Invoice API","description":"API for invoices"}],"servers":[{"url":"https://api.calypso.finance","description":"Generated server url"}],"paths":{"/api/v1/invoice/unlimited/create":{"post":{"tags":["Invoice API"],"summary":"New Unlimited Invoice","description":"Permission annotations:","operationId":"createUnlimitedInvoice","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/WithAccountContainerPGInvoiceUnlimitedCreateRequestDTO"}}},"required":true},"responses":{"200":{"description":"OK","content":{"*/*":{"schema":{"$ref":"#/components/schemas/InvoiceDTO"}}}},"400":{"description":"Bad Request","content":{"*/*":{"schema":{"$ref":"#/components/schemas/PublicGatewayErrorResponse"}}}},"500":{"description":"Internal Server Error","content":{"*/*":{"schema":{"$ref":"#/components/schemas/PublicGatewayErrorResponse"}}}}}}}},"components":{"schemas":{"WithAccountContainerPGInvoiceUnlimitedCreateRequestDTO":{"required":["account","payload","timestamp"],"type":"object","properties":{"account":{"type":"string","description":"Merchant account ID. Request will be sent for this account"},"timestamp":{"type":"integer","description":"Current unix UTC timestamp in milliseconds. Must not be less than 3 minutes in the past and not greater than 3 minutes in the future","format":"int64"},"payload":{"$ref":"#/components/schemas/PGInvoiceUnlimitedCreateRequestDTO"}},"description":"Object with request data"},"PGInvoiceUnlimitedCreateRequestDTO":{"required":["currency","description","fiatAvailable"],"type":"object","properties":{"currency":{"type":"string","description":"Crypto currency of the invoice"},"description":{"type":"string","description":"Short invoice description"},"idempotencyKey":{"type":"string","description":"The external id in the uuid format that can be generated by user while creating the invoice","format":"uuid"},"returnUrl":{"type":"string","description":"Link to the web page where client can come back to from payment link (page with invoice data for payment)"},"logoUrl":{"type":"string","description":"Link to the logo of merchant which will be shown in the payment link (page with invoice data for payment). The logo must be in PNG format. Recommended size 100*24 px"},"supportUrl":{"type":"string","description":"Link to the merchant support page where client can go to from payment link (page with invoice data for payment)"},"externalId":{"type":"string","description":"Merchant ID that can be assigned to invoice or several invoices in string format"},"fiatAvailable":{"type":"boolean","description":"Attribute indicates the merchant's ability to process payments in fiat currency."}},"description":"Object with request parameters"},"InvoiceDTO":{"required":["createdDate","currency","description","fiatAvailable","id","idempotencyKey","invoiceAddress","isInterventionResolved","state","subscriptionEnabled","totalDebitAmount","type"],"type":"object","properties":{"id":{"type":"string","description":"Invoice id"},"invoiceAddress":{"type":"string","description":"Crypto address for deposit"},"type":{"type":"string","description":"The type of the invoice. SINGLE - allows to receive one payment in crypto-currency. SINGLE_FIAT - allows to receive one payment in crypto-currency but amount to pay is set in fiat currency. UNLIMITED - allows to receive unlimited amount of payments in crypto-currency. BOUND - allows to receive one payment with any money amount upper than settled in parameters","enum":["SINGLE","SINGLE_FIAT","UNLIMITED","UNLIMITED_LINKED","BOUND"]},"amount":{"type":"number","description":"Amount of the invoice"},"fee":{"type":"number","description":"Service fee for invoice. This amount will be deducted from invoice amount"},"totalDebitAmount":{"type":"number","description":"The total amount of money received on the invoice wallet"},"currency":{"type":"string","description":"Currency of the invoice"},"state":{"type":"string","description":"Status of the invoice","enum":["MEM_POOL_FOUND","PENDING_PAYMENT","PAID","COMPLETED","PENDING_INTERVENTION","CANCEL","ARCHIVED","DECLINED","PENDING_COMPLIANCE_CHECK","REVERSED"]},"lastDepositHash":{"type":"string","description":"Hash of the last deposit transaction to the invoice"},"description":{"type":"string","description":"Short invoice description"},"createdDate":{"type":"string","description":"Time of invoice creation","format":"date-time"},"idempotencyKey":{"type":"string","description":"The external id in the uuid format that can be generated by user while creating the invoice","format":"uuid"},"expiration":{"type":"string","description":"Server timestamp of invoice expiration moment","format":"date-time"},"fiatAmount":{"type":"number","description":"Amount of fiat money set for SINGLE_FIAT_INVOICE"},"fiatCurrency":{"type":"string","description":"Currency of featAmount"},"lastFiatUpdated":{"type":"string","description":"Time when the exchange rate was updated last time in SINGLE_FIAT invoices","format":"date-time"},"interventionType":{"type":"string","description":"Represents the case of intervention: UNDERPAY - client paid less money than payAmount, OVERPAY - client paid more money than payAmount","enum":["OVERPAY","UNDERPAY"]},"isInterventionResolved":{"type":"boolean","description":"Represents whether the intervention was resolved or not (set by user)"},"subscriptionEnabled":{"type":"boolean","description":"Represents whether client subscribed on email notifications or not"},"returnUrl":{"type":"string","description":"Link to the web page where client can come back to from payment link (page with invoice data for payment)"},"logoUrl":{"type":"string","description":"Link to the logo of merchant which will be shown in the payment link (page with invoice data for payment). The logo must be in PNG format. Recommended size 100*24 px"},"supportUrl":{"type":"string","description":"Link to the merchant support page where client can go to from payment link (page with invoice data for payment)"},"externalId":{"type":"string","description":"Merchant ID that can be assigned to invoice or several invoices in string format"},"lowerBound":{"type":"number","description":"Minimal amount for invoice deposit in BOUND invoices. Deposits with lower amount will be ignored"},"autoconversion":{"$ref":"#/components/schemas/AutoconversionDTO"},"fiatAvailable":{"type":"boolean","description":"Fiat available"}},"description":"Response with invoice data"},"AutoconversionDTO":{"required":["targetCurrency"],"type":"object","properties":{"targetCurrency":{"type":"string","description":"Target currency"},"amount":{"type":"number","description":"The pre-calculated amount or the actual amount after the conversion is completed"}},"description":"Response data of the Invoice Autoconversion configuration"},"PublicGatewayErrorResponse":{"required":["errorCode","message","traceId"],"type":"object","properties":{"traceId":{"type":"string"},"errorCode":{"type":"string"},"message":{"type":"string"}}}}}}
```

## New Unlimited Linked Invoice

> Permission annotations:

```json
{"openapi":"3.0.1","info":{"title":"Public API","version":"dev"},"tags":[{"name":"Invoice API","description":"API for invoices"}],"servers":[{"url":"https://api.calypso.finance","description":"Generated server url"}],"paths":{"/api/v1/invoice/unlimited-linked/create":{"post":{"tags":["Invoice API"],"summary":"New Unlimited Linked Invoice","description":"Permission annotations:","operationId":"createUnlimitedLinkedInvoice","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/WithAccountContainerPGInvoiceUnlimitedLinkedCreateRequestDTO"}}},"required":true},"responses":{"200":{"description":"OK","content":{"*/*":{"schema":{"$ref":"#/components/schemas/InvoiceDTO"}}}},"400":{"description":"Bad Request","content":{"*/*":{"schema":{"$ref":"#/components/schemas/PublicGatewayErrorResponse"}}}},"500":{"description":"Internal Server Error","content":{"*/*":{"schema":{"$ref":"#/components/schemas/PublicGatewayErrorResponse"}}}}}}}},"components":{"schemas":{"WithAccountContainerPGInvoiceUnlimitedLinkedCreateRequestDTO":{"required":["account","payload","timestamp"],"type":"object","properties":{"account":{"type":"string","description":"Merchant account ID. Request will be sent for this account"},"timestamp":{"type":"integer","description":"Current unix UTC timestamp in milliseconds. Must not be less than 3 minutes in the past and not greater than 3 minutes in the future","format":"int64"},"payload":{"$ref":"#/components/schemas/PGInvoiceUnlimitedLinkedCreateRequestDTO"}},"description":"Object with request data"},"PGInvoiceUnlimitedLinkedCreateRequestDTO":{"required":["currency","description","fiatAvailable"],"type":"object","properties":{"currency":{"type":"string","description":"Crypto currency of the invoice"},"description":{"type":"string","description":"Short invoice description"},"idempotencyKey":{"type":"string","description":"The external id in the uuid format that can be generated by user while creating the invoice","format":"uuid"},"returnUrl":{"type":"string","description":"Link to the web page where client can come back to from payment link (page with invoice data for payment)"},"logoUrl":{"type":"string","description":"Link to the logo of merchant which will be shown in the payment link (page with invoice data for payment). The logo must be in PNG format. Recommended size 100*24 px"},"supportUrl":{"type":"string","description":"Link to the merchant support page where client can go to from payment link (page with invoice data for payment)"},"externalId":{"type":"string","description":"Merchant ID that can be assigned to invoice or several invoices in string format"},"fiatAvailable":{"type":"boolean","description":"Attribute indicates the merchant's ability to process payments in fiat currency."}},"description":"Object with request parameters"},"InvoiceDTO":{"required":["createdDate","currency","description","fiatAvailable","id","idempotencyKey","invoiceAddress","isInterventionResolved","state","subscriptionEnabled","totalDebitAmount","type"],"type":"object","properties":{"id":{"type":"string","description":"Invoice id"},"invoiceAddress":{"type":"string","description":"Crypto address for deposit"},"type":{"type":"string","description":"The type of the invoice. SINGLE - allows to receive one payment in crypto-currency. SINGLE_FIAT - allows to receive one payment in crypto-currency but amount to pay is set in fiat currency. UNLIMITED - allows to receive unlimited amount of payments in crypto-currency. BOUND - allows to receive one payment with any money amount upper than settled in parameters","enum":["SINGLE","SINGLE_FIAT","UNLIMITED","UNLIMITED_LINKED","BOUND"]},"amount":{"type":"number","description":"Amount of the invoice"},"fee":{"type":"number","description":"Service fee for invoice. This amount will be deducted from invoice amount"},"totalDebitAmount":{"type":"number","description":"The total amount of money received on the invoice wallet"},"currency":{"type":"string","description":"Currency of the invoice"},"state":{"type":"string","description":"Status of the invoice","enum":["MEM_POOL_FOUND","PENDING_PAYMENT","PAID","COMPLETED","PENDING_INTERVENTION","CANCEL","ARCHIVED","DECLINED","PENDING_COMPLIANCE_CHECK","REVERSED"]},"lastDepositHash":{"type":"string","description":"Hash of the last deposit transaction to the invoice"},"description":{"type":"string","description":"Short invoice description"},"createdDate":{"type":"string","description":"Time of invoice creation","format":"date-time"},"idempotencyKey":{"type":"string","description":"The external id in the uuid format that can be generated by user while creating the invoice","format":"uuid"},"expiration":{"type":"string","description":"Server timestamp of invoice expiration moment","format":"date-time"},"fiatAmount":{"type":"number","description":"Amount of fiat money set for SINGLE_FIAT_INVOICE"},"fiatCurrency":{"type":"string","description":"Currency of featAmount"},"lastFiatUpdated":{"type":"string","description":"Time when the exchange rate was updated last time in SINGLE_FIAT invoices","format":"date-time"},"interventionType":{"type":"string","description":"Represents the case of intervention: UNDERPAY - client paid less money than payAmount, OVERPAY - client paid more money than payAmount","enum":["OVERPAY","UNDERPAY"]},"isInterventionResolved":{"type":"boolean","description":"Represents whether the intervention was resolved or not (set by user)"},"subscriptionEnabled":{"type":"boolean","description":"Represents whether client subscribed on email notifications or not"},"returnUrl":{"type":"string","description":"Link to the web page where client can come back to from payment link (page with invoice data for payment)"},"logoUrl":{"type":"string","description":"Link to the logo of merchant which will be shown in the payment link (page with invoice data for payment). The logo must be in PNG format. Recommended size 100*24 px"},"supportUrl":{"type":"string","description":"Link to the merchant support page where client can go to from payment link (page with invoice data for payment)"},"externalId":{"type":"string","description":"Merchant ID that can be assigned to invoice or several invoices in string format"},"lowerBound":{"type":"number","description":"Minimal amount for invoice deposit in BOUND invoices. Deposits with lower amount will be ignored"},"autoconversion":{"$ref":"#/components/schemas/AutoconversionDTO"},"fiatAvailable":{"type":"boolean","description":"Fiat available"}},"description":"Response with invoice data"},"AutoconversionDTO":{"required":["targetCurrency"],"type":"object","properties":{"targetCurrency":{"type":"string","description":"Target currency"},"amount":{"type":"number","description":"The pre-calculated amount or the actual amount after the conversion is completed"}},"description":"Response data of the Invoice Autoconversion configuration"},"PublicGatewayErrorResponse":{"required":["errorCode","message","traceId"],"type":"object","properties":{"traceId":{"type":"string"},"errorCode":{"type":"string"},"message":{"type":"string"}}}}}}
```

## New Single Invoice

> Permission annotations:

```json
{"openapi":"3.0.1","info":{"title":"Public API","version":"dev"},"tags":[{"name":"Invoice API","description":"API for invoices"}],"servers":[{"url":"https://api.calypso.finance","description":"Generated server url"}],"paths":{"/api/v1/invoice/single/create":{"post":{"tags":["Invoice API"],"summary":"New Single Invoice","description":"Permission annotations:","operationId":"createSingleInvoice","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/WithAccountContainerPGInvoiceSingleCreateRequestDTO"}}},"required":true},"responses":{"200":{"description":"OK","content":{"*/*":{"schema":{"$ref":"#/components/schemas/InvoiceDTO"}}}},"400":{"description":"Bad Request","content":{"*/*":{"schema":{"$ref":"#/components/schemas/PublicGatewayErrorResponse"}}}},"500":{"description":"Internal Server Error","content":{"*/*":{"schema":{"$ref":"#/components/schemas/PublicGatewayErrorResponse"}}}}}}}},"components":{"schemas":{"WithAccountContainerPGInvoiceSingleCreateRequestDTO":{"required":["account","payload","timestamp"],"type":"object","properties":{"account":{"type":"string","description":"Merchant account ID. Request will be sent for this account"},"timestamp":{"type":"integer","description":"Current unix UTC timestamp in milliseconds. Must not be less than 3 minutes in the past and not greater than 3 minutes in the future","format":"int64"},"payload":{"$ref":"#/components/schemas/PGInvoiceSingleCreateRequestDTO"}},"description":"Object with request data"},"PGInvoiceSingleCreateRequestDTO":{"required":["amount","currency","description","fiatAvailable"],"type":"object","properties":{"expiration":{"type":"string","description":"Server timestamp of invoice expiration moment. 1 days is default value","format":"date-time"},"amount":{"type":"number","description":"Invoice amount. Required for SINGLE invoices"},"currency":{"type":"string","description":"Crypto currency of the invoice"},"description":{"type":"string","description":"Short invoice description"},"idempotencyKey":{"type":"string","description":"The external id in the uuid format that can be generated by user while creating the invoice","format":"uuid"},"returnUrl":{"type":"string","description":"Link to the web page where client can come back to from payment link (page with invoice data for payment)"},"logoUrl":{"type":"string","description":"Link to the logo of merchant which will be shown in the payment link (page with invoice data for payment). The logo must be in PNG format. Recommended size 100*24 px"},"supportUrl":{"type":"string","description":"Link to the merchant support page where client can go to from payment link (page with invoice data for payment)"},"externalId":{"type":"string","description":"Merchant ID that can be assigned to invoice or several invoices in string format"},"fiatAvailable":{"type":"boolean","description":"Attribute indicates the merchant's ability to process payments in fiat currency."}},"description":"Object with request parameters"},"InvoiceDTO":{"required":["createdDate","currency","description","fiatAvailable","id","idempotencyKey","invoiceAddress","isInterventionResolved","state","subscriptionEnabled","totalDebitAmount","type"],"type":"object","properties":{"id":{"type":"string","description":"Invoice id"},"invoiceAddress":{"type":"string","description":"Crypto address for deposit"},"type":{"type":"string","description":"The type of the invoice. SINGLE - allows to receive one payment in crypto-currency. SINGLE_FIAT - allows to receive one payment in crypto-currency but amount to pay is set in fiat currency. UNLIMITED - allows to receive unlimited amount of payments in crypto-currency. BOUND - allows to receive one payment with any money amount upper than settled in parameters","enum":["SINGLE","SINGLE_FIAT","UNLIMITED","UNLIMITED_LINKED","BOUND"]},"amount":{"type":"number","description":"Amount of the invoice"},"fee":{"type":"number","description":"Service fee for invoice. This amount will be deducted from invoice amount"},"totalDebitAmount":{"type":"number","description":"The total amount of money received on the invoice wallet"},"currency":{"type":"string","description":"Currency of the invoice"},"state":{"type":"string","description":"Status of the invoice","enum":["MEM_POOL_FOUND","PENDING_PAYMENT","PAID","COMPLETED","PENDING_INTERVENTION","CANCEL","ARCHIVED","DECLINED","PENDING_COMPLIANCE_CHECK","REVERSED"]},"lastDepositHash":{"type":"string","description":"Hash of the last deposit transaction to the invoice"},"description":{"type":"string","description":"Short invoice description"},"createdDate":{"type":"string","description":"Time of invoice creation","format":"date-time"},"idempotencyKey":{"type":"string","description":"The external id in the uuid format that can be generated by user while creating the invoice","format":"uuid"},"expiration":{"type":"string","description":"Server timestamp of invoice expiration moment","format":"date-time"},"fiatAmount":{"type":"number","description":"Amount of fiat money set for SINGLE_FIAT_INVOICE"},"fiatCurrency":{"type":"string","description":"Currency of featAmount"},"lastFiatUpdated":{"type":"string","description":"Time when the exchange rate was updated last time in SINGLE_FIAT invoices","format":"date-time"},"interventionType":{"type":"string","description":"Represents the case of intervention: UNDERPAY - client paid less money than payAmount, OVERPAY - client paid more money than payAmount","enum":["OVERPAY","UNDERPAY"]},"isInterventionResolved":{"type":"boolean","description":"Represents whether the intervention was resolved or not (set by user)"},"subscriptionEnabled":{"type":"boolean","description":"Represents whether client subscribed on email notifications or not"},"returnUrl":{"type":"string","description":"Link to the web page where client can come back to from payment link (page with invoice data for payment)"},"logoUrl":{"type":"string","description":"Link to the logo of merchant which will be shown in the payment link (page with invoice data for payment). The logo must be in PNG format. Recommended size 100*24 px"},"supportUrl":{"type":"string","description":"Link to the merchant support page where client can go to from payment link (page with invoice data for payment)"},"externalId":{"type":"string","description":"Merchant ID that can be assigned to invoice or several invoices in string format"},"lowerBound":{"type":"number","description":"Minimal amount for invoice deposit in BOUND invoices. Deposits with lower amount will be ignored"},"autoconversion":{"$ref":"#/components/schemas/AutoconversionDTO"},"fiatAvailable":{"type":"boolean","description":"Fiat available"}},"description":"Response with invoice data"},"AutoconversionDTO":{"required":["targetCurrency"],"type":"object","properties":{"targetCurrency":{"type":"string","description":"Target currency"},"amount":{"type":"number","description":"The pre-calculated amount or the actual amount after the conversion is completed"}},"description":"Response data of the Invoice Autoconversion configuration"},"PublicGatewayErrorResponse":{"required":["errorCode","message","traceId"],"type":"object","properties":{"traceId":{"type":"string"},"errorCode":{"type":"string"},"message":{"type":"string"}}}}}}
```

## New Single Fiat Invoice

> Permission annotations:

```json
{"openapi":"3.0.1","info":{"title":"Public API","version":"dev"},"tags":[{"name":"Invoice API","description":"API for invoices"}],"servers":[{"url":"https://api.calypso.finance","description":"Generated server url"}],"paths":{"/api/v1/invoice/single-fiat/create":{"post":{"tags":["Invoice API"],"summary":"New Single Fiat Invoice","description":"Permission annotations:","operationId":"createSingleFiatInvoice","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/WithAccountContainerPGInvoiceSingleFiatCreateRequestDTO"}}},"required":true},"responses":{"200":{"description":"OK","content":{"*/*":{"schema":{"$ref":"#/components/schemas/InvoiceDTO"}}}},"400":{"description":"Bad Request","content":{"*/*":{"schema":{"$ref":"#/components/schemas/PublicGatewayErrorResponse"}}}},"500":{"description":"Internal Server Error","content":{"*/*":{"schema":{"$ref":"#/components/schemas/PublicGatewayErrorResponse"}}}}}}}},"components":{"schemas":{"WithAccountContainerPGInvoiceSingleFiatCreateRequestDTO":{"required":["account","payload","timestamp"],"type":"object","properties":{"account":{"type":"string","description":"Merchant account ID. Request will be sent for this account"},"timestamp":{"type":"integer","description":"Current unix UTC timestamp in milliseconds. Must not be less than 3 minutes in the past and not greater than 3 minutes in the future","format":"int64"},"payload":{"$ref":"#/components/schemas/PGInvoiceSingleFiatCreateRequestDTO"}},"description":"Object with request data"},"PGInvoiceSingleFiatCreateRequestDTO":{"required":["currency","description","fiatAmount","fiatAvailable","fiatCurrency"],"type":"object","properties":{"fiatAmount":{"type":"number","description":"Invoice amount in fiat currency. Required for SINGLE_FIAT invoices"},"fiatCurrency":{"type":"string","description":"Fiat currency. Required for SINGLE_FIAT invoices"},"expiration":{"type":"string","description":"Server timestamp of invoice expiration moment. 1 days is default value","format":"date-time"},"currency":{"type":"string","description":"Crypto currency of the invoice"},"description":{"type":"string","description":"Short invoice description"},"idempotencyKey":{"type":"string","description":"The external id in the uuid format that can be generated by user while creating the invoice","format":"uuid"},"returnUrl":{"type":"string","description":"Link to the web page where client can come back to from payment link (page with invoice data for payment)"},"logoUrl":{"type":"string","description":"Link to the logo of merchant which will be shown in the payment link (page with invoice data for payment). The logo must be in PNG format. Recommended size 100*24 px"},"supportUrl":{"type":"string","description":"Link to the merchant support page where client can go to from payment link (page with invoice data for payment)"},"externalId":{"type":"string","description":"Merchant ID that can be assigned to invoice or several invoices in string format"},"fiatAvailable":{"type":"boolean","description":"Attribute indicates the merchant's ability to process payments in fiat currency."}},"description":"Object with request parameters"},"InvoiceDTO":{"required":["createdDate","currency","description","fiatAvailable","id","idempotencyKey","invoiceAddress","isInterventionResolved","state","subscriptionEnabled","totalDebitAmount","type"],"type":"object","properties":{"id":{"type":"string","description":"Invoice id"},"invoiceAddress":{"type":"string","description":"Crypto address for deposit"},"type":{"type":"string","description":"The type of the invoice. SINGLE - allows to receive one payment in crypto-currency. SINGLE_FIAT - allows to receive one payment in crypto-currency but amount to pay is set in fiat currency. UNLIMITED - allows to receive unlimited amount of payments in crypto-currency. BOUND - allows to receive one payment with any money amount upper than settled in parameters","enum":["SINGLE","SINGLE_FIAT","UNLIMITED","UNLIMITED_LINKED","BOUND"]},"amount":{"type":"number","description":"Amount of the invoice"},"fee":{"type":"number","description":"Service fee for invoice. This amount will be deducted from invoice amount"},"totalDebitAmount":{"type":"number","description":"The total amount of money received on the invoice wallet"},"currency":{"type":"string","description":"Currency of the invoice"},"state":{"type":"string","description":"Status of the invoice","enum":["MEM_POOL_FOUND","PENDING_PAYMENT","PAID","COMPLETED","PENDING_INTERVENTION","CANCEL","ARCHIVED","DECLINED","PENDING_COMPLIANCE_CHECK","REVERSED"]},"lastDepositHash":{"type":"string","description":"Hash of the last deposit transaction to the invoice"},"description":{"type":"string","description":"Short invoice description"},"createdDate":{"type":"string","description":"Time of invoice creation","format":"date-time"},"idempotencyKey":{"type":"string","description":"The external id in the uuid format that can be generated by user while creating the invoice","format":"uuid"},"expiration":{"type":"string","description":"Server timestamp of invoice expiration moment","format":"date-time"},"fiatAmount":{"type":"number","description":"Amount of fiat money set for SINGLE_FIAT_INVOICE"},"fiatCurrency":{"type":"string","description":"Currency of featAmount"},"lastFiatUpdated":{"type":"string","description":"Time when the exchange rate was updated last time in SINGLE_FIAT invoices","format":"date-time"},"interventionType":{"type":"string","description":"Represents the case of intervention: UNDERPAY - client paid less money than payAmount, OVERPAY - client paid more money than payAmount","enum":["OVERPAY","UNDERPAY"]},"isInterventionResolved":{"type":"boolean","description":"Represents whether the intervention was resolved or not (set by user)"},"subscriptionEnabled":{"type":"boolean","description":"Represents whether client subscribed on email notifications or not"},"returnUrl":{"type":"string","description":"Link to the web page where client can come back to from payment link (page with invoice data for payment)"},"logoUrl":{"type":"string","description":"Link to the logo of merchant which will be shown in the payment link (page with invoice data for payment). The logo must be in PNG format. Recommended size 100*24 px"},"supportUrl":{"type":"string","description":"Link to the merchant support page where client can go to from payment link (page with invoice data for payment)"},"externalId":{"type":"string","description":"Merchant ID that can be assigned to invoice or several invoices in string format"},"lowerBound":{"type":"number","description":"Minimal amount for invoice deposit in BOUND invoices. Deposits with lower amount will be ignored"},"autoconversion":{"$ref":"#/components/schemas/AutoconversionDTO"},"fiatAvailable":{"type":"boolean","description":"Fiat available"}},"description":"Response with invoice data"},"AutoconversionDTO":{"required":["targetCurrency"],"type":"object","properties":{"targetCurrency":{"type":"string","description":"Target currency"},"amount":{"type":"number","description":"The pre-calculated amount or the actual amount after the conversion is completed"}},"description":"Response data of the Invoice Autoconversion configuration"},"PublicGatewayErrorResponse":{"required":["errorCode","message","traceId"],"type":"object","properties":{"traceId":{"type":"string"},"errorCode":{"type":"string"},"message":{"type":"string"}}}}}}
```

## Resolve intervention and receive money to the wallet

> Permission annotations:

```json
{"openapi":"3.0.1","info":{"title":"Public API","version":"dev"},"tags":[{"name":"Invoice API","description":"API for invoices"}],"servers":[{"url":"https://api.calypso.finance","description":"Generated server url"}],"paths":{"/api/v1/invoice/return-to-paid":{"post":{"tags":["Invoice API"],"summary":"Resolve intervention and receive money to the wallet","description":"Permission annotations:","operationId":"returnToPaid","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/InvoiceDTO"}}}},"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":{"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"},"InvoiceDTO":{"required":["createdDate","currency","description","fiatAvailable","id","idempotencyKey","invoiceAddress","isInterventionResolved","state","subscriptionEnabled","totalDebitAmount","type"],"type":"object","properties":{"id":{"type":"string","description":"Invoice id"},"invoiceAddress":{"type":"string","description":"Crypto address for deposit"},"type":{"type":"string","description":"The type of the invoice. SINGLE - allows to receive one payment in crypto-currency. SINGLE_FIAT - allows to receive one payment in crypto-currency but amount to pay is set in fiat currency. UNLIMITED - allows to receive unlimited amount of payments in crypto-currency. BOUND - allows to receive one payment with any money amount upper than settled in parameters","enum":["SINGLE","SINGLE_FIAT","UNLIMITED","UNLIMITED_LINKED","BOUND"]},"amount":{"type":"number","description":"Amount of the invoice"},"fee":{"type":"number","description":"Service fee for invoice. This amount will be deducted from invoice amount"},"totalDebitAmount":{"type":"number","description":"The total amount of money received on the invoice wallet"},"currency":{"type":"string","description":"Currency of the invoice"},"state":{"type":"string","description":"Status of the invoice","enum":["MEM_POOL_FOUND","PENDING_PAYMENT","PAID","COMPLETED","PENDING_INTERVENTION","CANCEL","ARCHIVED","DECLINED","PENDING_COMPLIANCE_CHECK","REVERSED"]},"lastDepositHash":{"type":"string","description":"Hash of the last deposit transaction to the invoice"},"description":{"type":"string","description":"Short invoice description"},"createdDate":{"type":"string","description":"Time of invoice creation","format":"date-time"},"idempotencyKey":{"type":"string","description":"The external id in the uuid format that can be generated by user while creating the invoice","format":"uuid"},"expiration":{"type":"string","description":"Server timestamp of invoice expiration moment","format":"date-time"},"fiatAmount":{"type":"number","description":"Amount of fiat money set for SINGLE_FIAT_INVOICE"},"fiatCurrency":{"type":"string","description":"Currency of featAmount"},"lastFiatUpdated":{"type":"string","description":"Time when the exchange rate was updated last time in SINGLE_FIAT invoices","format":"date-time"},"interventionType":{"type":"string","description":"Represents the case of intervention: UNDERPAY - client paid less money than payAmount, OVERPAY - client paid more money than payAmount","enum":["OVERPAY","UNDERPAY"]},"isInterventionResolved":{"type":"boolean","description":"Represents whether the intervention was resolved or not (set by user)"},"subscriptionEnabled":{"type":"boolean","description":"Represents whether client subscribed on email notifications or not"},"returnUrl":{"type":"string","description":"Link to the web page where client can come back to from payment link (page with invoice data for payment)"},"logoUrl":{"type":"string","description":"Link to the logo of merchant which will be shown in the payment link (page with invoice data for payment). The logo must be in PNG format. Recommended size 100*24 px"},"supportUrl":{"type":"string","description":"Link to the merchant support page where client can go to from payment link (page with invoice data for payment)"},"externalId":{"type":"string","description":"Merchant ID that can be assigned to invoice or several invoices in string format"},"lowerBound":{"type":"number","description":"Minimal amount for invoice deposit in BOUND invoices. Deposits with lower amount will be ignored"},"autoconversion":{"$ref":"#/components/schemas/AutoconversionDTO"},"fiatAvailable":{"type":"boolean","description":"Fiat available"}},"description":"Response with invoice data"},"AutoconversionDTO":{"required":["targetCurrency"],"type":"object","properties":{"targetCurrency":{"type":"string","description":"Target currency"},"amount":{"type":"number","description":"The pre-calculated amount or the actual amount after the conversion is completed"}},"description":"Response data of the Invoice Autoconversion configuration"},"PublicGatewayErrorResponse":{"required":["errorCode","message","traceId"],"type":"object","properties":{"traceId":{"type":"string"},"errorCode":{"type":"string"},"message":{"type":"string"}}}}}}
```

## Get Payment for the Invoice

> Permission annotations:

```json
{"openapi":"3.0.1","info":{"title":"Public API","version":"dev"},"tags":[{"name":"Invoice API","description":"API for invoices"}],"servers":[{"url":"https://api.calypso.finance","description":"Generated server url"}],"paths":{"/api/v1/invoice/payment":{"post":{"tags":["Invoice API"],"summary":"Get Payment for the Invoice","description":"Permission annotations:","operationId":"getInvoicePayment","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/WithAccountContainerPGInvoicePaymentRequestDTO"}}},"required":true},"responses":{"200":{"description":"OK","content":{"*/*":{"schema":{"$ref":"#/components/schemas/PgInvoicePaymentResponseDTO"}}}},"400":{"description":"Bad Request","content":{"*/*":{"schema":{"$ref":"#/components/schemas/PublicGatewayErrorResponse"}}}},"500":{"description":"Internal Server Error","content":{"*/*":{"schema":{"$ref":"#/components/schemas/PublicGatewayErrorResponse"}}}}}}}},"components":{"schemas":{"WithAccountContainerPGInvoicePaymentRequestDTO":{"required":["account","payload","timestamp"],"type":"object","properties":{"account":{"type":"string","description":"Merchant account ID. Request will be sent for this account"},"timestamp":{"type":"integer","description":"Current unix UTC timestamp in milliseconds. Must not be less than 3 minutes in the past and not greater than 3 minutes in the future","format":"int64"},"payload":{"$ref":"#/components/schemas/PGInvoicePaymentRequestDTO"}},"description":"Object with request data"},"PGInvoicePaymentRequestDTO":{"required":["paymentId"],"type":"object","properties":{"paymentId":{"type":"string","description":"Invoice payment ID"},"id":{"type":"string","description":"System ID of the invoice. Either ID or idempotencyKey must be specified"},"idempotencyKey":{"type":"string","description":"The external ID that can be generated by user while creating the invoice","format":"uuid"}},"description":"Request for getting invoice payment"},"PgInvoicePaymentResponseDTO":{"required":["id","state"],"type":"object","properties":{"id":{"type":"string","description":"ID of the payment"},"state":{"type":"string","description":"State of the payment","enum":["IN_PROGRESS","AUTOCONVERSION","COMPLETED","FAILED"]}},"description":"Response with invoice payment data"},"PublicGatewayErrorResponse":{"required":["errorCode","message","traceId"],"type":"object","properties":{"traceId":{"type":"string"},"errorCode":{"type":"string"},"message":{"type":"string"}}}}}}
```

## Get all Payments for the Invoice

> Permission annotations:

```json
{"openapi":"3.0.1","info":{"title":"Public API","version":"dev"},"tags":[{"name":"Invoice API","description":"API for invoices"}],"servers":[{"url":"https://api.calypso.finance","description":"Generated server url"}],"paths":{"/api/v1/invoice/payment-history":{"post":{"tags":["Invoice API"],"summary":"Get all Payments for the Invoice","description":"Permission annotations:","operationId":"getInvoicePaymentHistory","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/WithAccountContainerPGInvoicePaymentHistoryRequestDTO"}}},"required":true},"responses":{"200":{"description":"OK","content":{"*/*":{"schema":{"$ref":"#/components/schemas/PageDTOPgInvoicePaymentResponseDTO"}}}},"400":{"description":"Bad Request","content":{"*/*":{"schema":{"$ref":"#/components/schemas/PublicGatewayErrorResponse"}}}},"500":{"description":"Internal Server Error","content":{"*/*":{"schema":{"$ref":"#/components/schemas/PublicGatewayErrorResponse"}}}}}}}},"components":{"schemas":{"WithAccountContainerPGInvoicePaymentHistoryRequestDTO":{"required":["account","payload","timestamp"],"type":"object","properties":{"account":{"type":"string","description":"Merchant account ID. Request will be sent for this account"},"timestamp":{"type":"integer","description":"Current unix UTC timestamp in milliseconds. Must not be less than 3 minutes in the past and not greater than 3 minutes in the future","format":"int64"},"payload":{"$ref":"#/components/schemas/PGInvoicePaymentHistoryRequestDTO"}},"description":"Object with request data"},"PGInvoicePaymentHistoryRequestDTO":{"required":["pageNumber","pageSize","properties","sort"],"type":"object","properties":{"id":{"type":"string","description":"System id of the invoice. Either id or idempotencyKey must be specified"},"idempotencyKey":{"type":"string","description":"The external id that can be generated by user while creating the invoice","format":"uuid"},"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},"sort":{"type":"string","description":"Direction of result values which can be asc or desc","default":"ASC","enum":["ASC","DESC"]},"properties":{"type":"string","description":"Attribute by which sorting is performed. Accept the parameter name by which sorting is needed"}},"description":"Request for getting invoice payments"},"PageDTOPgInvoicePaymentResponseDTO":{"required":["page","result","size","total","totalElements"],"type":"object","properties":{"result":{"type":"array","description":"Array of requested objects","items":{"$ref":"#/components/schemas/PgInvoicePaymentResponseDTO"}},"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"},"PgInvoicePaymentResponseDTO":{"required":["id","state"],"type":"object","properties":{"id":{"type":"string","description":"ID of the payment"},"state":{"type":"string","description":"State of the payment","enum":["IN_PROGRESS","AUTOCONVERSION","COMPLETED","FAILED"]}},"description":"Response with invoice payment data"},"PublicGatewayErrorResponse":{"required":["errorCode","message","traceId"],"type":"object","properties":{"traceId":{"type":"string"},"errorCode":{"type":"string"},"message":{"type":"string"}}}}}}
```

## Get Invoices by External ID

> Permission annotations:

```json
{"openapi":"3.0.1","info":{"title":"Public API","version":"dev"},"tags":[{"name":"Invoice API","description":"API for invoices"}],"servers":[{"url":"https://api.calypso.finance","description":"Generated server url"}],"paths":{"/api/v1/invoice/external":{"post":{"tags":["Invoice API"],"summary":"Get Invoices by External ID","description":"Permission annotations:","operationId":"getInvoicesByExternalId","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/WithAccountContainerInvoicesByExternalIdRequestDTO"}}},"required":true},"responses":{"200":{"description":"OK","content":{"*/*":{"schema":{"$ref":"#/components/schemas/PageDTOInvoiceDTO"}}}},"400":{"description":"Bad Request","content":{"*/*":{"schema":{"$ref":"#/components/schemas/PublicGatewayErrorResponse"}}}},"500":{"description":"Internal Server Error","content":{"*/*":{"schema":{"$ref":"#/components/schemas/PublicGatewayErrorResponse"}}}}}}}},"components":{"schemas":{"WithAccountContainerInvoicesByExternalIdRequestDTO":{"required":["account","payload","timestamp"],"type":"object","properties":{"account":{"type":"string","description":"Merchant account ID. Request will be sent for this account"},"timestamp":{"type":"integer","description":"Current unix UTC timestamp in milliseconds. Must not be less than 3 minutes in the past and not greater than 3 minutes in the future","format":"int64"},"payload":{"$ref":"#/components/schemas/InvoicesByExternalIdRequestDTO"}},"description":"Object with request data"},"InvoicesByExternalIdRequestDTO":{"required":["externalId","pageNumber","pageSize","properties","sort"],"type":"object","properties":{"externalId":{"type":"string","description":"Merchant ID that can be assigned to invoice or several invoices in string format"},"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},"sort":{"type":"string","description":"Direction of result values which can be asc or desc","default":"ASC","enum":["ASC","DESC"]},"properties":{"type":"string","description":"Attribute by which sorting is performed. Accept the parameter name by which sorting is needed"}},"description":"Request data for getting invoices by external ID"},"PageDTOInvoiceDTO":{"required":["page","result","size","total","totalElements"],"type":"object","properties":{"result":{"type":"array","description":"Array of requested objects","items":{"$ref":"#/components/schemas/InvoiceDTO"}},"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"},"InvoiceDTO":{"required":["createdDate","currency","description","fiatAvailable","id","idempotencyKey","invoiceAddress","isInterventionResolved","state","subscriptionEnabled","totalDebitAmount","type"],"type":"object","properties":{"id":{"type":"string","description":"Invoice id"},"invoiceAddress":{"type":"string","description":"Crypto address for deposit"},"type":{"type":"string","description":"The type of the invoice. SINGLE - allows to receive one payment in crypto-currency. SINGLE_FIAT - allows to receive one payment in crypto-currency but amount to pay is set in fiat currency. UNLIMITED - allows to receive unlimited amount of payments in crypto-currency. BOUND - allows to receive one payment with any money amount upper than settled in parameters","enum":["SINGLE","SINGLE_FIAT","UNLIMITED","UNLIMITED_LINKED","BOUND"]},"amount":{"type":"number","description":"Amount of the invoice"},"fee":{"type":"number","description":"Service fee for invoice. This amount will be deducted from invoice amount"},"totalDebitAmount":{"type":"number","description":"The total amount of money received on the invoice wallet"},"currency":{"type":"string","description":"Currency of the invoice"},"state":{"type":"string","description":"Status of the invoice","enum":["MEM_POOL_FOUND","PENDING_PAYMENT","PAID","COMPLETED","PENDING_INTERVENTION","CANCEL","ARCHIVED","DECLINED","PENDING_COMPLIANCE_CHECK","REVERSED"]},"lastDepositHash":{"type":"string","description":"Hash of the last deposit transaction to the invoice"},"description":{"type":"string","description":"Short invoice description"},"createdDate":{"type":"string","description":"Time of invoice creation","format":"date-time"},"idempotencyKey":{"type":"string","description":"The external id in the uuid format that can be generated by user while creating the invoice","format":"uuid"},"expiration":{"type":"string","description":"Server timestamp of invoice expiration moment","format":"date-time"},"fiatAmount":{"type":"number","description":"Amount of fiat money set for SINGLE_FIAT_INVOICE"},"fiatCurrency":{"type":"string","description":"Currency of featAmount"},"lastFiatUpdated":{"type":"string","description":"Time when the exchange rate was updated last time in SINGLE_FIAT invoices","format":"date-time"},"interventionType":{"type":"string","description":"Represents the case of intervention: UNDERPAY - client paid less money than payAmount, OVERPAY - client paid more money than payAmount","enum":["OVERPAY","UNDERPAY"]},"isInterventionResolved":{"type":"boolean","description":"Represents whether the intervention was resolved or not (set by user)"},"subscriptionEnabled":{"type":"boolean","description":"Represents whether client subscribed on email notifications or not"},"returnUrl":{"type":"string","description":"Link to the web page where client can come back to from payment link (page with invoice data for payment)"},"logoUrl":{"type":"string","description":"Link to the logo of merchant which will be shown in the payment link (page with invoice data for payment). The logo must be in PNG format. Recommended size 100*24 px"},"supportUrl":{"type":"string","description":"Link to the merchant support page where client can go to from payment link (page with invoice data for payment)"},"externalId":{"type":"string","description":"Merchant ID that can be assigned to invoice or several invoices in string format"},"lowerBound":{"type":"number","description":"Minimal amount for invoice deposit in BOUND invoices. Deposits with lower amount will be ignored"},"autoconversion":{"$ref":"#/components/schemas/AutoconversionDTO"},"fiatAvailable":{"type":"boolean","description":"Fiat available"}},"description":"Response with invoice data"},"AutoconversionDTO":{"required":["targetCurrency"],"type":"object","properties":{"targetCurrency":{"type":"string","description":"Target currency"},"amount":{"type":"number","description":"The pre-calculated amount or the actual amount after the conversion is completed"}},"description":"Response data of the Invoice Autoconversion configuration"},"PublicGatewayErrorResponse":{"required":["errorCode","message","traceId"],"type":"object","properties":{"traceId":{"type":"string"},"errorCode":{"type":"string"},"message":{"type":"string"}}}}}}
```

## Get Deposit for the Invoice

> Permission annotations:

```json
{"openapi":"3.0.1","info":{"title":"Public API","version":"dev"},"tags":[{"name":"Invoice API","description":"API for invoices"}],"servers":[{"url":"https://api.calypso.finance","description":"Generated server url"}],"paths":{"/api/v1/invoice/deposit":{"post":{"tags":["Invoice API"],"summary":"Get Deposit for the Invoice","description":"Permission annotations:","operationId":"getInvoiceDeposit","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/WithAccountContainerPGInvoiceDepositRequestDTO"}}},"required":true},"responses":{"200":{"description":"OK","content":{"*/*":{"schema":{"$ref":"#/components/schemas/PgInvoiceDepositResponseDTO"}}}},"400":{"description":"Bad Request","content":{"*/*":{"schema":{"$ref":"#/components/schemas/PublicGatewayErrorResponse"}}}},"500":{"description":"Internal Server Error","content":{"*/*":{"schema":{"$ref":"#/components/schemas/PublicGatewayErrorResponse"}}}}}}}},"components":{"schemas":{"WithAccountContainerPGInvoiceDepositRequestDTO":{"required":["account","payload","timestamp"],"type":"object","properties":{"account":{"type":"string","description":"Merchant account ID. Request will be sent for this account"},"timestamp":{"type":"integer","description":"Current unix UTC timestamp in milliseconds. Must not be less than 3 minutes in the past and not greater than 3 minutes in the future","format":"int64"},"payload":{"$ref":"#/components/schemas/PGInvoiceDepositRequestDTO"}},"description":"Object with request data"},"PGInvoiceDepositRequestDTO":{"required":["transactionId"],"type":"object","properties":{"transactionId":{"type":"string","description":"Invoice transaction ID","format":"uuid"},"id":{"type":"string","description":"System ID of the invoice. Either ID or idempotencyKey must be specified"},"idempotencyKey":{"type":"string","description":"The external ID that can be generated by user while creating the invoice","format":"uuid"}},"description":"Request for getting invoice deposit"},"PgInvoiceDepositResponseDTO":{"required":["amount","createdDate","currency","id"],"type":"object","properties":{"id":{"type":"string","description":"ID of the deposit","format":"uuid"},"amount":{"type":"number","description":"Amount of the deposit"},"currency":{"type":"string","description":"Currency of the deposit"},"transactionHash":{"type":"string","description":"Hash of the income transaction"},"createdDate":{"type":"string","description":"Date of the deposit","format":"date-time"}},"description":"Response with invoice deposit data"},"PublicGatewayErrorResponse":{"required":["errorCode","message","traceId"],"type":"object","properties":{"traceId":{"type":"string"},"errorCode":{"type":"string"},"message":{"type":"string"}}}}}}
```

## Get all Deposits for the Invoice

> Permission annotations:

```json
{"openapi":"3.0.1","info":{"title":"Public API","version":"dev"},"tags":[{"name":"Invoice API","description":"API for invoices"}],"servers":[{"url":"https://api.calypso.finance","description":"Generated server url"}],"paths":{"/api/v1/invoice/deposit-history":{"post":{"tags":["Invoice API"],"summary":"Get all Deposits for the Invoice","description":"Permission annotations:","operationId":"getInvoiceDepositHistory","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/WithAccountContainerInvoiceDepositHistoryRequestDTO"}}},"required":true},"responses":{"200":{"description":"OK","content":{"*/*":{"schema":{"$ref":"#/components/schemas/PageDTOInvoiceDepositHistoryDTO"}}}},"400":{"description":"Bad Request","content":{"*/*":{"schema":{"$ref":"#/components/schemas/PublicGatewayErrorResponse"}}}},"500":{"description":"Internal Server Error","content":{"*/*":{"schema":{"$ref":"#/components/schemas/PublicGatewayErrorResponse"}}}}}}}},"components":{"schemas":{"WithAccountContainerInvoiceDepositHistoryRequestDTO":{"required":["account","payload","timestamp"],"type":"object","properties":{"account":{"type":"string","description":"Merchant account ID. Request will be sent for this account"},"timestamp":{"type":"integer","description":"Current unix UTC timestamp in milliseconds. Must not be less than 3 minutes in the past and not greater than 3 minutes in the future","format":"int64"},"payload":{"$ref":"#/components/schemas/InvoiceDepositHistoryRequestDTO"}},"description":"Object with request data"},"InvoiceDepositHistoryRequestDTO":{"required":["pageNumber","pageSize","properties","sort"],"type":"object","properties":{"id":{"type":"string","description":"System id of the invoice. Either id or idempotencyKey must be specified"},"idempotencyKey":{"type":"string","description":"The external id that can be generated by user while creating the invoice","format":"uuid"},"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},"sort":{"type":"string","description":"Direction of result values which can be asc or desc","default":"ASC","enum":["ASC","DESC"]},"properties":{"type":"string","description":"Attribute by which sorting is performed. Accept the parameter name by which sorting is needed"}},"description":"Request for getting invoice deposits"},"PageDTOInvoiceDepositHistoryDTO":{"required":["page","result","size","total","totalElements"],"type":"object","properties":{"result":{"type":"array","description":"Array of requested objects","items":{"$ref":"#/components/schemas/InvoiceDepositHistoryDTO"}},"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"},"InvoiceDepositHistoryDTO":{"required":["amount","createdDate","currency","id"],"type":"object","properties":{"id":{"type":"string","description":"ID of the deposit","format":"uuid"},"amount":{"type":"number","description":"Amount of the deposit"},"currency":{"type":"string","description":"Currency of the deposit"},"transactionHash":{"type":"string","description":"Hash of the income transaction"},"createdDate":{"type":"string","description":"Date of the deposit","format":"date-time"}},"description":"Response with invoice deposits data"},"PublicGatewayErrorResponse":{"required":["errorCode","message","traceId"],"type":"object","properties":{"traceId":{"type":"string"},"errorCode":{"type":"string"},"message":{"type":"string"}}}}}}
```

## Mark that intervention is relolved in Invoice

> Permission annotations:

```json
{"openapi":"3.0.1","info":{"title":"Public API","version":"dev"},"tags":[{"name":"Invoice API","description":"API for invoices"}],"servers":[{"url":"https://api.calypso.finance","description":"Generated server url"}],"paths":{"/api/v1/invoice/close-intervention":{"post":{"tags":["Invoice API"],"summary":"Mark that intervention is relolved in Invoice","description":"Permission annotations:","operationId":"closeIntervention","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/InvoiceDTO"}}}},"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":{"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"},"InvoiceDTO":{"required":["createdDate","currency","description","fiatAvailable","id","idempotencyKey","invoiceAddress","isInterventionResolved","state","subscriptionEnabled","totalDebitAmount","type"],"type":"object","properties":{"id":{"type":"string","description":"Invoice id"},"invoiceAddress":{"type":"string","description":"Crypto address for deposit"},"type":{"type":"string","description":"The type of the invoice. SINGLE - allows to receive one payment in crypto-currency. SINGLE_FIAT - allows to receive one payment in crypto-currency but amount to pay is set in fiat currency. UNLIMITED - allows to receive unlimited amount of payments in crypto-currency. BOUND - allows to receive one payment with any money amount upper than settled in parameters","enum":["SINGLE","SINGLE_FIAT","UNLIMITED","UNLIMITED_LINKED","BOUND"]},"amount":{"type":"number","description":"Amount of the invoice"},"fee":{"type":"number","description":"Service fee for invoice. This amount will be deducted from invoice amount"},"totalDebitAmount":{"type":"number","description":"The total amount of money received on the invoice wallet"},"currency":{"type":"string","description":"Currency of the invoice"},"state":{"type":"string","description":"Status of the invoice","enum":["MEM_POOL_FOUND","PENDING_PAYMENT","PAID","COMPLETED","PENDING_INTERVENTION","CANCEL","ARCHIVED","DECLINED","PENDING_COMPLIANCE_CHECK","REVERSED"]},"lastDepositHash":{"type":"string","description":"Hash of the last deposit transaction to the invoice"},"description":{"type":"string","description":"Short invoice description"},"createdDate":{"type":"string","description":"Time of invoice creation","format":"date-time"},"idempotencyKey":{"type":"string","description":"The external id in the uuid format that can be generated by user while creating the invoice","format":"uuid"},"expiration":{"type":"string","description":"Server timestamp of invoice expiration moment","format":"date-time"},"fiatAmount":{"type":"number","description":"Amount of fiat money set for SINGLE_FIAT_INVOICE"},"fiatCurrency":{"type":"string","description":"Currency of featAmount"},"lastFiatUpdated":{"type":"string","description":"Time when the exchange rate was updated last time in SINGLE_FIAT invoices","format":"date-time"},"interventionType":{"type":"string","description":"Represents the case of intervention: UNDERPAY - client paid less money than payAmount, OVERPAY - client paid more money than payAmount","enum":["OVERPAY","UNDERPAY"]},"isInterventionResolved":{"type":"boolean","description":"Represents whether the intervention was resolved or not (set by user)"},"subscriptionEnabled":{"type":"boolean","description":"Represents whether client subscribed on email notifications or not"},"returnUrl":{"type":"string","description":"Link to the web page where client can come back to from payment link (page with invoice data for payment)"},"logoUrl":{"type":"string","description":"Link to the logo of merchant which will be shown in the payment link (page with invoice data for payment). The logo must be in PNG format. Recommended size 100*24 px"},"supportUrl":{"type":"string","description":"Link to the merchant support page where client can go to from payment link (page with invoice data for payment)"},"externalId":{"type":"string","description":"Merchant ID that can be assigned to invoice or several invoices in string format"},"lowerBound":{"type":"number","description":"Minimal amount for invoice deposit in BOUND invoices. Deposits with lower amount will be ignored"},"autoconversion":{"$ref":"#/components/schemas/AutoconversionDTO"},"fiatAvailable":{"type":"boolean","description":"Fiat available"}},"description":"Response with invoice data"},"AutoconversionDTO":{"required":["targetCurrency"],"type":"object","properties":{"targetCurrency":{"type":"string","description":"Target currency"},"amount":{"type":"number","description":"The pre-calculated amount or the actual amount after the conversion is completed"}},"description":"Response data of the Invoice Autoconversion configuration"},"PublicGatewayErrorResponse":{"required":["errorCode","message","traceId"],"type":"object","properties":{"traceId":{"type":"string"},"errorCode":{"type":"string"},"message":{"type":"string"}}}}}}
```

## New Bound Invoice

> Permission annotations:

```json
{"openapi":"3.0.1","info":{"title":"Public API","version":"dev"},"tags":[{"name":"Invoice API","description":"API for invoices"}],"servers":[{"url":"https://api.calypso.finance","description":"Generated server url"}],"paths":{"/api/v1/invoice/bound/create":{"post":{"tags":["Invoice API"],"summary":"New Bound Invoice","description":"Permission annotations:","operationId":"createBoundInvoice","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/WithAccountContainerPGInvoiceBoundCreateRequestDTO"}}},"required":true},"responses":{"200":{"description":"OK","content":{"*/*":{"schema":{"$ref":"#/components/schemas/InvoiceDTO"}}}},"400":{"description":"Bad Request","content":{"*/*":{"schema":{"$ref":"#/components/schemas/PublicGatewayErrorResponse"}}}},"500":{"description":"Internal Server Error","content":{"*/*":{"schema":{"$ref":"#/components/schemas/PublicGatewayErrorResponse"}}}}}}}},"components":{"schemas":{"WithAccountContainerPGInvoiceBoundCreateRequestDTO":{"required":["account","payload","timestamp"],"type":"object","properties":{"account":{"type":"string","description":"Merchant account ID. Request will be sent for this account"},"timestamp":{"type":"integer","description":"Current unix UTC timestamp in milliseconds. Must not be less than 3 minutes in the past and not greater than 3 minutes in the future","format":"int64"},"payload":{"$ref":"#/components/schemas/PGInvoiceBoundCreateRequestDTO"}},"description":"Object with request data"},"PGInvoiceBoundCreateRequestDTO":{"required":["currency","description","fiatAvailable","lowerBound"],"type":"object","properties":{"lowerBound":{"type":"number","description":"Minimal amount for invoice deposit. Deposits with lower amount will be ignored. Required for BOUND invoices"},"expiration":{"type":"string","description":"Server timestamp of invoice expiration moment. 1 days is default value","format":"date-time"},"currency":{"type":"string","description":"Crypto currency of the invoice"},"description":{"type":"string","description":"Short invoice description"},"idempotencyKey":{"type":"string","description":"The external id in the uuid format that can be generated by user while creating the invoice","format":"uuid"},"returnUrl":{"type":"string","description":"Link to the web page where client can come back to from payment link (page with invoice data for payment)"},"logoUrl":{"type":"string","description":"Link to the logo of merchant which will be shown in the payment link (page with invoice data for payment). The logo must be in PNG format. Recommended size 100*24 px"},"supportUrl":{"type":"string","description":"Link to the merchant support page where client can go to from payment link (page with invoice data for payment)"},"externalId":{"type":"string","description":"Merchant ID that can be assigned to invoice or several invoices in string format"},"fiatAvailable":{"type":"boolean","description":"Attribute indicates the merchant's ability to process payments in fiat currency."}},"description":"Object with request parameters"},"InvoiceDTO":{"required":["createdDate","currency","description","fiatAvailable","id","idempotencyKey","invoiceAddress","isInterventionResolved","state","subscriptionEnabled","totalDebitAmount","type"],"type":"object","properties":{"id":{"type":"string","description":"Invoice id"},"invoiceAddress":{"type":"string","description":"Crypto address for deposit"},"type":{"type":"string","description":"The type of the invoice. SINGLE - allows to receive one payment in crypto-currency. SINGLE_FIAT - allows to receive one payment in crypto-currency but amount to pay is set in fiat currency. UNLIMITED - allows to receive unlimited amount of payments in crypto-currency. BOUND - allows to receive one payment with any money amount upper than settled in parameters","enum":["SINGLE","SINGLE_FIAT","UNLIMITED","UNLIMITED_LINKED","BOUND"]},"amount":{"type":"number","description":"Amount of the invoice"},"fee":{"type":"number","description":"Service fee for invoice. This amount will be deducted from invoice amount"},"totalDebitAmount":{"type":"number","description":"The total amount of money received on the invoice wallet"},"currency":{"type":"string","description":"Currency of the invoice"},"state":{"type":"string","description":"Status of the invoice","enum":["MEM_POOL_FOUND","PENDING_PAYMENT","PAID","COMPLETED","PENDING_INTERVENTION","CANCEL","ARCHIVED","DECLINED","PENDING_COMPLIANCE_CHECK","REVERSED"]},"lastDepositHash":{"type":"string","description":"Hash of the last deposit transaction to the invoice"},"description":{"type":"string","description":"Short invoice description"},"createdDate":{"type":"string","description":"Time of invoice creation","format":"date-time"},"idempotencyKey":{"type":"string","description":"The external id in the uuid format that can be generated by user while creating the invoice","format":"uuid"},"expiration":{"type":"string","description":"Server timestamp of invoice expiration moment","format":"date-time"},"fiatAmount":{"type":"number","description":"Amount of fiat money set for SINGLE_FIAT_INVOICE"},"fiatCurrency":{"type":"string","description":"Currency of featAmount"},"lastFiatUpdated":{"type":"string","description":"Time when the exchange rate was updated last time in SINGLE_FIAT invoices","format":"date-time"},"interventionType":{"type":"string","description":"Represents the case of intervention: UNDERPAY - client paid less money than payAmount, OVERPAY - client paid more money than payAmount","enum":["OVERPAY","UNDERPAY"]},"isInterventionResolved":{"type":"boolean","description":"Represents whether the intervention was resolved or not (set by user)"},"subscriptionEnabled":{"type":"boolean","description":"Represents whether client subscribed on email notifications or not"},"returnUrl":{"type":"string","description":"Link to the web page where client can come back to from payment link (page with invoice data for payment)"},"logoUrl":{"type":"string","description":"Link to the logo of merchant which will be shown in the payment link (page with invoice data for payment). The logo must be in PNG format. Recommended size 100*24 px"},"supportUrl":{"type":"string","description":"Link to the merchant support page where client can go to from payment link (page with invoice data for payment)"},"externalId":{"type":"string","description":"Merchant ID that can be assigned to invoice or several invoices in string format"},"lowerBound":{"type":"number","description":"Minimal amount for invoice deposit in BOUND invoices. Deposits with lower amount will be ignored"},"autoconversion":{"$ref":"#/components/schemas/AutoconversionDTO"},"fiatAvailable":{"type":"boolean","description":"Fiat available"}},"description":"Response with invoice data"},"AutoconversionDTO":{"required":["targetCurrency"],"type":"object","properties":{"targetCurrency":{"type":"string","description":"Target currency"},"amount":{"type":"number","description":"The pre-calculated amount or the actual amount after the conversion is completed"}},"description":"Response data of the Invoice Autoconversion configuration"},"PublicGatewayErrorResponse":{"required":["errorCode","message","traceId"],"type":"object","properties":{"traceId":{"type":"string"},"errorCode":{"type":"string"},"message":{"type":"string"}}}}}}
```

## Archive Invoice

> Permission annotations:

```json
{"openapi":"3.0.1","info":{"title":"Public API","version":"dev"},"tags":[{"name":"Invoice API","description":"API for invoices"}],"servers":[{"url":"https://api.calypso.finance","description":"Generated server url"}],"paths":{"/api/v1/invoice/archive":{"post":{"tags":["Invoice API"],"summary":"Archive Invoice","description":"Permission annotations:","operationId":"moveToArchive","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/InvoiceDTO"}}}},"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":{"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"},"InvoiceDTO":{"required":["createdDate","currency","description","fiatAvailable","id","idempotencyKey","invoiceAddress","isInterventionResolved","state","subscriptionEnabled","totalDebitAmount","type"],"type":"object","properties":{"id":{"type":"string","description":"Invoice id"},"invoiceAddress":{"type":"string","description":"Crypto address for deposit"},"type":{"type":"string","description":"The type of the invoice. SINGLE - allows to receive one payment in crypto-currency. SINGLE_FIAT - allows to receive one payment in crypto-currency but amount to pay is set in fiat currency. UNLIMITED - allows to receive unlimited amount of payments in crypto-currency. BOUND - allows to receive one payment with any money amount upper than settled in parameters","enum":["SINGLE","SINGLE_FIAT","UNLIMITED","UNLIMITED_LINKED","BOUND"]},"amount":{"type":"number","description":"Amount of the invoice"},"fee":{"type":"number","description":"Service fee for invoice. This amount will be deducted from invoice amount"},"totalDebitAmount":{"type":"number","description":"The total amount of money received on the invoice wallet"},"currency":{"type":"string","description":"Currency of the invoice"},"state":{"type":"string","description":"Status of the invoice","enum":["MEM_POOL_FOUND","PENDING_PAYMENT","PAID","COMPLETED","PENDING_INTERVENTION","CANCEL","ARCHIVED","DECLINED","PENDING_COMPLIANCE_CHECK","REVERSED"]},"lastDepositHash":{"type":"string","description":"Hash of the last deposit transaction to the invoice"},"description":{"type":"string","description":"Short invoice description"},"createdDate":{"type":"string","description":"Time of invoice creation","format":"date-time"},"idempotencyKey":{"type":"string","description":"The external id in the uuid format that can be generated by user while creating the invoice","format":"uuid"},"expiration":{"type":"string","description":"Server timestamp of invoice expiration moment","format":"date-time"},"fiatAmount":{"type":"number","description":"Amount of fiat money set for SINGLE_FIAT_INVOICE"},"fiatCurrency":{"type":"string","description":"Currency of featAmount"},"lastFiatUpdated":{"type":"string","description":"Time when the exchange rate was updated last time in SINGLE_FIAT invoices","format":"date-time"},"interventionType":{"type":"string","description":"Represents the case of intervention: UNDERPAY - client paid less money than payAmount, OVERPAY - client paid more money than payAmount","enum":["OVERPAY","UNDERPAY"]},"isInterventionResolved":{"type":"boolean","description":"Represents whether the intervention was resolved or not (set by user)"},"subscriptionEnabled":{"type":"boolean","description":"Represents whether client subscribed on email notifications or not"},"returnUrl":{"type":"string","description":"Link to the web page where client can come back to from payment link (page with invoice data for payment)"},"logoUrl":{"type":"string","description":"Link to the logo of merchant which will be shown in the payment link (page with invoice data for payment). The logo must be in PNG format. Recommended size 100*24 px"},"supportUrl":{"type":"string","description":"Link to the merchant support page where client can go to from payment link (page with invoice data for payment)"},"externalId":{"type":"string","description":"Merchant ID that can be assigned to invoice or several invoices in string format"},"lowerBound":{"type":"number","description":"Minimal amount for invoice deposit in BOUND invoices. Deposits with lower amount will be ignored"},"autoconversion":{"$ref":"#/components/schemas/AutoconversionDTO"},"fiatAvailable":{"type":"boolean","description":"Fiat available"}},"description":"Response with invoice data"},"AutoconversionDTO":{"required":["targetCurrency"],"type":"object","properties":{"targetCurrency":{"type":"string","description":"Target currency"},"amount":{"type":"number","description":"The pre-calculated amount or the actual amount after the conversion is completed"}},"description":"Response data of the Invoice Autoconversion configuration"},"PublicGatewayErrorResponse":{"required":["errorCode","message","traceId"],"type":"object","properties":{"traceId":{"type":"string"},"errorCode":{"type":"string"},"message":{"type":"string"}}}}}}
```

## Get all Invoices

> Permission annotations:

```json
{"openapi":"3.0.1","info":{"title":"Public API","version":"dev"},"tags":[{"name":"Invoice API","description":"API for invoices"}],"servers":[{"url":"https://api.calypso.finance","description":"Generated server url"}],"paths":{"/api/v1/invoice/all":{"post":{"tags":["Invoice API"],"summary":"Get all Invoices","description":"Permission annotations:","operationId":"getInvoices","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/WithAccountContainerInvoicesWithPaginationRequestDTO"}}},"required":true},"responses":{"200":{"description":"OK","content":{"*/*":{"schema":{"$ref":"#/components/schemas/PageDTOInvoiceDTO"}}}},"400":{"description":"Bad Request","content":{"*/*":{"schema":{"$ref":"#/components/schemas/PublicGatewayErrorResponse"}}}},"500":{"description":"Internal Server Error","content":{"*/*":{"schema":{"$ref":"#/components/schemas/PublicGatewayErrorResponse"}}}}}}}},"components":{"schemas":{"WithAccountContainerInvoicesWithPaginationRequestDTO":{"required":["account","payload","timestamp"],"type":"object","properties":{"account":{"type":"string","description":"Merchant account ID. Request will be sent for this account"},"timestamp":{"type":"integer","description":"Current unix UTC timestamp in milliseconds. Must not be less than 3 minutes in the past and not greater than 3 minutes in the future","format":"int64"},"payload":{"$ref":"#/components/schemas/InvoicesWithPaginationRequestDTO"}},"description":"Object with request data"},"InvoicesWithPaginationRequestDTO":{"required":["pageNumber","pageSize","properties","sort","stateNames","typeNames"],"type":"object","properties":{"stateNames":{"type":"array","description":"Statuses of the invoices to return","items":{"type":"string","description":"Statuses of the invoices to return","enum":["MEM_POOL_FOUND","PENDING_PAYMENT","PAID","COMPLETED","PENDING_INTERVENTION","CANCEL","ARCHIVED","DECLINED","PENDING_COMPLIANCE_CHECK","REVERSED"]}},"typeNames":{"type":"array","description":"Types of the invoices","items":{"type":"string","description":"Types of the invoices","enum":["SINGLE","SINGLE_FIAT","UNLIMITED","UNLIMITED_LINKED","BOUND"]}},"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},"sort":{"type":"string","description":"Direction of result values which can be asc or desc","default":"ASC","enum":["ASC","DESC"]},"properties":{"type":"string","description":"Attribute by which sorting is performed. Accept the parameter name by which sorting is needed"}},"description":"Request data for getting invoices by state and type"},"PageDTOInvoiceDTO":{"required":["page","result","size","total","totalElements"],"type":"object","properties":{"result":{"type":"array","description":"Array of requested objects","items":{"$ref":"#/components/schemas/InvoiceDTO"}},"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"},"InvoiceDTO":{"required":["createdDate","currency","description","fiatAvailable","id","idempotencyKey","invoiceAddress","isInterventionResolved","state","subscriptionEnabled","totalDebitAmount","type"],"type":"object","properties":{"id":{"type":"string","description":"Invoice id"},"invoiceAddress":{"type":"string","description":"Crypto address for deposit"},"type":{"type":"string","description":"The type of the invoice. SINGLE - allows to receive one payment in crypto-currency. SINGLE_FIAT - allows to receive one payment in crypto-currency but amount to pay is set in fiat currency. UNLIMITED - allows to receive unlimited amount of payments in crypto-currency. BOUND - allows to receive one payment with any money amount upper than settled in parameters","enum":["SINGLE","SINGLE_FIAT","UNLIMITED","UNLIMITED_LINKED","BOUND"]},"amount":{"type":"number","description":"Amount of the invoice"},"fee":{"type":"number","description":"Service fee for invoice. This amount will be deducted from invoice amount"},"totalDebitAmount":{"type":"number","description":"The total amount of money received on the invoice wallet"},"currency":{"type":"string","description":"Currency of the invoice"},"state":{"type":"string","description":"Status of the invoice","enum":["MEM_POOL_FOUND","PENDING_PAYMENT","PAID","COMPLETED","PENDING_INTERVENTION","CANCEL","ARCHIVED","DECLINED","PENDING_COMPLIANCE_CHECK","REVERSED"]},"lastDepositHash":{"type":"string","description":"Hash of the last deposit transaction to the invoice"},"description":{"type":"string","description":"Short invoice description"},"createdDate":{"type":"string","description":"Time of invoice creation","format":"date-time"},"idempotencyKey":{"type":"string","description":"The external id in the uuid format that can be generated by user while creating the invoice","format":"uuid"},"expiration":{"type":"string","description":"Server timestamp of invoice expiration moment","format":"date-time"},"fiatAmount":{"type":"number","description":"Amount of fiat money set for SINGLE_FIAT_INVOICE"},"fiatCurrency":{"type":"string","description":"Currency of featAmount"},"lastFiatUpdated":{"type":"string","description":"Time when the exchange rate was updated last time in SINGLE_FIAT invoices","format":"date-time"},"interventionType":{"type":"string","description":"Represents the case of intervention: UNDERPAY - client paid less money than payAmount, OVERPAY - client paid more money than payAmount","enum":["OVERPAY","UNDERPAY"]},"isInterventionResolved":{"type":"boolean","description":"Represents whether the intervention was resolved or not (set by user)"},"subscriptionEnabled":{"type":"boolean","description":"Represents whether client subscribed on email notifications or not"},"returnUrl":{"type":"string","description":"Link to the web page where client can come back to from payment link (page with invoice data for payment)"},"logoUrl":{"type":"string","description":"Link to the logo of merchant which will be shown in the payment link (page with invoice data for payment). The logo must be in PNG format. Recommended size 100*24 px"},"supportUrl":{"type":"string","description":"Link to the merchant support page where client can go to from payment link (page with invoice data for payment)"},"externalId":{"type":"string","description":"Merchant ID that can be assigned to invoice or several invoices in string format"},"lowerBound":{"type":"number","description":"Minimal amount for invoice deposit in BOUND invoices. Deposits with lower amount will be ignored"},"autoconversion":{"$ref":"#/components/schemas/AutoconversionDTO"},"fiatAvailable":{"type":"boolean","description":"Fiat available"}},"description":"Response with invoice data"},"AutoconversionDTO":{"required":["targetCurrency"],"type":"object","properties":{"targetCurrency":{"type":"string","description":"Target currency"},"amount":{"type":"number","description":"The pre-calculated amount or the actual amount after the conversion is completed"}},"description":"Response data of the Invoice Autoconversion configuration"},"PublicGatewayErrorResponse":{"required":["errorCode","message","traceId"],"type":"object","properties":{"traceId":{"type":"string"},"errorCode":{"type":"string"},"message":{"type":"string"}}}}}}
```
