Calypso | Docs
Overview
Calypso is a technical platform for accepting payments and making payout in cryptocurrency. It enables a quick start of sales for businesses by completing easy integration and setup.
Products:
- Invoice is a commercial document issued by a merchant to a client relating to a sale transaction. It includes provided products and services, their quantities and agreed costs.
- Payment Link is a link to a one-time invoice. Payment links can be sent by email, messenger or in any other way.
- Unlimited invoice is an invoice without a fixed amount. Payments to the invoice of this type can be accepted in unlimited quantities for any amount for an unlimited time. Funds are transferred to the hot wallet if necessary.
- Payout is a payment of a reward, dividend, insurance compensation, etc. (i.e. you may need to pay dividends to partners). Withdrawal of funds is performed by Payment Processor.
- Mass Payout is a method of paying multiple recipients simultaneously. Since mass payouts are submitted online, they are processed instantly which helps organizations to save time, money and resources.
The purpose and target audience of this documentation
This documentation is targeted at:
- Developers using Calypso
- Merchants needing to integrate their system with the Calypso platform using the API for accepting payments
- Merchants needing payment API documentation and other technical documentation
Need help?
If you did not find the required information in this documentation, please contact us to get help.
Integration
Invoice
Overview
What is a cryptocurrency invoice?
In common interpretation, invoice is a commercial document that includes products and services provided by a merchant to a client, product quantities and its agreed costs.
Cryptocurrency invoice is also a document used for settlement between partners. The only difference from a regular invoice is that a cryptocurrency one is issued in cryptocurrency.
If you are going to accept payments in cryptocurrency, invoices must include the following data:
- Exact amount to be paid in fiat currency or in cryptocurrency
- Exact wallet address the client is going to transfer money
After sending an invoice, a client will only have to pay. You can get payment information both in the Calypso web interface and through the API.
Terminology and entities
Merchant is a participant of technical and financial interaction who provides goods and services, issues invoices and has the access to withdraw the funds.
Features:
- Add a payment form (payment widget) on the site
- Issue an invoice for payment of goods and send it directly to the client
- Pay using the Payment Link
- Monitor receipts
- Withdraw funds in fiat currency to a card, as a bank transfer, etc.
Client (buyer) is a person purchasing products/services.
Features:
- Pay for a product/service in cryptocurrency.
- Get a confirmation that purchase is completed and money are received by a merchant
- Resolve disputed issues
Invoice wallet is a unique wallet designed to receive payment from one end customer. It is generated when creating an invoice.
Features:
- Accept payments
- Identify a payment and confirm a user made this payment
API
Calypso enables external developers to programmatically interact with the service. One way to do this is to use Calypso APIs.
API access key
The API access key is used to authenticate operations required for making payments and payouts.
If passing incorrect API key in requests to Calypso API, the platform returns an authentication error (HTTP/401).
Please do not share your Calypso API key with anyone!
More details on API access keys are available on the Invoice API page.
Payment by invoice
To transfer funds for provided products/services to a merchant account, an invoice must be paid.
To make a payment from the Calypso payment form, there are the following steps to be performed:
- Send API request to create an invoice (POST https://public-gateway.calypso.finance/api/v1/pub/invoice/create)
- Redirect a browser of a user to the link of the following format: https://ui.calypso.finance/invoices/{idempotencyKey}
Example of the create invoice request:
{
"nonce": 13292792792,
"request": {
"amount": 1,
"currency": "ETH",
"description": "invoice for client 1",
"hotWalletAddress": "0x3c1f886e5edf475980bea31c5e05d2e457b7e752",
"idempotencyKey": "c15b5eb6-e01d-4161-9dfa-a1193ad0371e",
"type": "SINGLE"
}
}
Further steps to complete payment are performed by a user in the payment form.
If using a payment form designed on your side, interaction with the Calypso platform will look as shown in the scheme of information process interaction.
Invoice statuses
Status | Description |
---|---|
PENDING_PAYMENT | • A new unpaid invoice. • Client has transferred funds, but the funds has not yet been credited to the account. |
MEM_POOL_FOUND | Incoming transaction to invoice wallet is found in blockchain mempool. |
PAID | Invoice is paid. |
PENDING_INTERVENTION | • Intervention from the merchant is awaited. • Client transferred insufficient amount. • Client has transferred an amount exceeding an invoice amount. • Funds were transferred from different client accounts. |
CANCEL | Invoice is canceled by merchant. |
COMPLETED | Funds are transferd to merchant wallet. |
ARCHIVED | Invoce is deleted by merchant. |
Diagram nodes indicate invoice statuses, arrows indicate processes a successful completion of which transfers an invoice from one status to another.
Withdrawal of funds
There are two scenarios of fund withdrawal:
- If using invoices and payouts:
- Funds are credited to an invoice wallet and transferred to a payout hot wallet
- Payment can be made from a payout hot wallet
- If using invoices separately from payouts:
- Funds are credited to an invoice wallet
- Funds are transferred to a Calypso hot wallet
Payment Link
What is a Payment Link?
Payment Link is a link to a one-time invoice. Payment links can be sent by email, messenger or in any other way.
How does it work?
- Creating a Payment Link.
You can use payment links to sell products/services,
launch subscriptions or collect donations.
- Share the link.
Send the Payment Link via email, messenger or in any other way.
- Invoice payment.
Use the Calypso UI, email or webhooks to be notified about successful payment and crediting of funds.
How to implement this via API?
Calypso API enables you with creating your own Payment links
To use Calypso Payment Link:
- Send API request to create an invoice (POST https://public-gateway.calypso.finance/api/v1/pub/invoice/create)
- Copy generated idempotencyKey from the response
- Redirect a browser of a user to the link of the following format: https://ui.calypso.finance/invoices/{idempotencyKey}
Further steps to complete payment are performed by a user in the payment form.
Below is a scheme demonstrating the listed steps.
Names of requests on the scheme indicate certain payment API methods.
To create your own payment links using Calypso:
- Send API request to create an invoice (POST https://public-gateway.calypso.finance/api/v1/pub/invoice/create)
- Copy generated invoice ID from the response
- Send API request POST https://public-gateway.calypso.finance/api/v1/pub/invoice and copy the data required for a user to complete this invoice payment
- Add copied data to a payment page and share a page link with a user
Further steps to complete payment are performed by a user in the payment form.
Below is a scheme demonstrating the listed steps.
Names of requests on the scheme indicate certain payment API methods.
Unlimited invoice (or client wallet)
Unlimited invoice is an invoice without a fixed amount. Payments to the invoice of this type can be accepted in unlimited quantities for any amount for an unlimited time. Funds are transferred to the hot wallet if necessary.
Example of the create unlimited invoice request:
{
"nonce": 13292792793,
"request": {
"currency": "ETH",
"description": "wallet of client 1",
"hotWalletAddress": "0x3c1f886e5edf475980bea31c5e05d2e457b7e752",
"idempotencyKey": "c15b5eb6-e01d-4161-9dfa-a1193ad0371e",
"type": "UNLIMITED"
}
}
Unlimited invoices can be used as clients wallets:
- Send API request to create an invoice with type "UNLIMITED" (POST https://public-gateway.calypso.finance/api/v1/pub/invoice/create)
- Provide the generated address and other data from the responce to the client
- Client can top up this wallet whenever he wants without any restrictions
- To withdrawal money from this client wallet you can send the request "Funds withdrawal" (POST https://public-gateway.calypso.finance/api/v1/pub/invoice/unlimited/withdrawal)
Payment Widget
Overview
Calypso provides users with the ability to generate widgets for invoice payment, which can be sent to the client or embedded on any web page. The widget indicates the amount to be paid, the available cryptocurrencies and description of payment. When paying the amount specified in the fiat currency, the exchange rate is fixed for 15 minutes (60 minutes for BTC) from the moment the invoice is created.
There are 3 types of payment widget depending on use case you need:
- A single payment for a product with a fixed price. The price customer needs to pay is defined by merchant in fiat currency.
- A single payment with a customer-defined price. The customer inputs the amount he wants to pay.
- Several payments with a customer-defined price. The customer can pay many times any amount of money for one invoice.
Features:
- Payment of an invoice without the need to create it specifically in the system
- Allows to specify the payment amount in a fiat currency or to give a posibility to define the payment amount to customer
- Exchange rate is fixed for 15 minutes
- Flexible parameter setting: the ability to choose a different cryptocurrency, full or reduced frame of widget, add a description
- The possibility to pay for one invoice unlimited number of time
How does it work?
There are two possible use cases for payment widget functionality.
Using a static payment widget link (recommended way):
- The merchant specifies the currencies, description, expiration and other options and creates payment widget using Calypso APIs.
- The merchant receives payment widget unique idempotencyKey in response and forms a static link using this value. The static link means that client will always be able to open earlier created payment widget to see its state.
- A client follows the link and specifies the cryptocurrency he wants to pay with.
- The client clicks the button "Proceed to payment".
- Clicking the button triggers a call to Calypso Invoice API to create a new invoice.
- When the invoice is created, the widget shows to the client a payment page.
- The client completes the payment.
- The client sees the message that transaction is processing.
- Transaction is completed by a network.
- The client sees the notification that payment is complete successfully.
Using a dynamic payment widget link (not recommended):
- The merchant forms the link to create dynamic payment widget link. The dynamic link means that each time the client follows the link a new payment widget will be created with no way to see the state of previous payment.
- A client follow the link and specify the cryptocurrency he wants to pay with.
- The client clicks the button "Proceed to payment".
- Clicking the button triggers a call to Calypso Invoice API to create a new invoice.
- When the invoice is created, the widget shows to the client a payment page.
- The client completes the payment.
- The client sees the message that transaction is processing.
- Transaction is completed by a network.
- The client sees the notification that payment is complete successfully.
The examples of how you can use it in your service to accept different types of payments are provided on the page
How to create and use a static payment widget? (recommended)
To create a static payment widget, there are the following steps to be performed:
- Send an API request to create SINGLE_FIAT or UNLIMITED_LINKED payment widget (POST https://public-gateway.calypso.finance/api/v1/pub/payment-widget/single-fiat/create or POST https://public-gateway.calypso.finance/api/v1/pub/payment-widget/unlimited-linked/create)
- Form a payment widget static link for sharing it with client using earlier received idempotencyKey in response
- Send formed link to the client or embed in the web site.
Pay attention! Order the currencies will be transmitted to the request will be saved in the widget interface.
Example of the create SINGLE_FIAT payment widget request:
{
"nonce": 13292792792,
"request": {
"description": "Payment Widget №1",
"fiatAmount": 100,
"fiatCurrency": "EUR",
"hotWallets": [
{
"address": "reprehenderit ad",
"cryptoCurrency": "USDC"
},
{
"address": "tempor v",
"cryptoCurrency": "USDT"
},
{
"address": "tempor v",
"cryptoCurrency": "USDT_TRX"
}
],
"upperCommission": true,
"useLiquidity": false,
"returnUrl": "https://google.com/",
"supportUrl": "https://google.com/",
"idempotencyKey": "e73ed7b1-a941-429e-9d59-315591bfeb68"
}
}
Example of the create UNLIMITED_LINKED payment widget request:
{
"nonce": 13292792792,
"request": {
"cryptoCurrencies": [
"MATIC",
"FRAX",
"USDT",
"USDT_TRX",
"ETH",
"BTC"
],
"description": "Unlimited Linked Payment Widget 1",
"upperCommission": true,
"useLiquidity": false,
"returnUrl": "https://google.com/",
"supportUrl": "https://google.com/",
"idempotencyKey": "3eea9433-d545-479f-95e1-0be86c7c8b59"
}
}
To access the widget, a static link is formed. This link allows you to always get access to the widget to see it's current payment state.
The method of link generation is the same for both widget types (SINGLE_FIAT and UNLIMITED_LINKED):
https://ui.calypso.finance/pay?widgetKey={idempotencyKey}
Example of static payment widget embedded in the web site:
<!-- Put this code to the file index.html and open in browser to see how it works -->
<html>
<head>
<title>Pay</title>
</head>
<body>
<style>
.button_1661340660317 {
display: inline-block !important;
text-decoration: none !important;
background-color: #1e37ff !important;
color: #ffffff !important;
border: 3px solid #3967ff !important;
border-radius: 5px !important;
font-size: 16px !important;
padding: 17px 50px !important;
transition: all 1.6s ease !important;
}
.button_1661340660317:hover{
text-decoration: none !important;
background-color: #8294ff !important;
color: #ffffff !important;
border-color: #4e67ff !important;
}
</style>
<a href="https://ui.calypso.finance/pay?widgetKey={*idempotencyKey*}" class="button_1661340660317" target="_blank">
Pay fix amount in crypto
</a>
</body>
</html>
Payment widget statuses
Status | Description |
---|---|
IN_PROGRESS | The payment widget has been created and is active |
COMPLETED | The invoice created from payment widget has been payed |
ARCHIVED | The payment widget has expired and was automatically archived |
Diagram nodes indicate subscription statuses, arrows indicate processes of changing payment widget's state.
How to create and use a dynamic payment widget? (not recommended)
To create a dynamic payment widget, there are the following steps to be performed:
- Send an API request to create SINGLE_FIAT or UNLIMITED_LINKED payment widget (POST https://public-gateway.calypso.finance/api/v1/pub/reusable-key-service)
- Send link with payment widget and configured parameters to the client or embed it to the web-site where the payment is needed.
Example of dynamic payment widget embedded in the web site:
<!-- Put this code to the file index.html and open in browser to see how it works -->
<html>
<head>
<title>Pay</title>
</head>
<body>
<style>
.button_1661340660317 {
display: inline-block !important;
text-decoration: none !important;
background-color: #1e37ff !important;
color: #ffffff !important;
border: 3px solid #3967ff !important;
border-radius: 5px !important;
font-size: 16px !important;
padding: 17px 50px !important;
transition: all 1.6s ease !important;
}
.button_1661340660317:hover{
text-decoration: none !important;
background-color: #8294ff !important;
color: #ffffff !important;
border-color: #4e67ff !important;
}
</style>
<a href="https://ui.calypso.finance/payment?currency=EUR&amount=1&description=Pay amount determined by merchant&key=fd441c87-3939-44d0-b0d3-6f7cbceda44c&full=true&btc_wallet=bc1ql3k0gh0ysvyxtfuntvrjmtp4r266s4wpspse67ð_wallet=0xf857cf4be74a7b97e8bca24c53507773f60ed5fe&usdt_wallet=0xf857cf4be74a7b97e8bca24c53507773f60ed5fe&usdc_wallet=0xf857cf4be74a7b97e8bca24c53507773f60ed5fe&trx_wallet=TYqokfymRRWQLN6J2uvwzf3SCLp5jKcDUe&usdt_trx_wallet=TYqokfymRRWQLN6J2uvwzf3SCLp5jKcDUe&xdg_wallet=DSZnQMhM6p6MrUXfdYY3tMn38nYo5rYM41&dai_wallet=0xf857cf4be74a7b97e8bca24c53507773f60ed5fe&frax_wallet=0xf857cf4be74a7b97e8bca24c53507773f60ed5fe&busd_eth_wallet=0xf857cf4be74a7b97e8bca24c53507773f60ed5fe" class="button_1661340660317" target="_blank">
Pay fix amount in crypto
</a>
</body>
</html>
To access the widget, a link is formed with a certain set of parameters. Depending on the specified parameters you can create different types of payment widget for particular use case you need.
A single payment for a product with a fixed price
https://ui.calypso.finance/payment?currency={fiat_currency}&amount={payment_amount}&description={text}&btc_wallet={btc_address}ð_wallet={eth_address}&usdt_wallet={usdt_address}&trx_wallet={trx_address}&usdt_trx_wallet={usdt_trx_address}&xdg_wallet={xdg_address}&dai_wallet={dai_address}&frax_wallet={frax_address}&usdc_wallet={usdc_address}&busd_eth_wallet={busd_eth_address}&bnb_wallet={bnb_address}&busd_wallet={busd_address}&matic_wallet={matic_address}&usdt_matic_wallet={usdt_matic_address}&key={genereted_reusable_key}&full={true_or_false}&idempotency_key={idempotency_key}&logo_url={logo_logo}&return_url={url_to_return_page}&support_url={support_url}
A single payment with a customer-defined price
https://ui.calypso.finance/payment?currency={fiat_currency}&description={text}&btc_wallet={btc_address}ð_wallet={eth_address}&usdt_wallet={usdt_address}&trx_wallet={trx_address}&usdt_trx_wallet={usdt_trx_address}&xdg_wallet={xdg_address}&dai_wallet={dai_address}&frax_wallet={frax_address}&usdc_wallet={usdc_address}&busd_eth_wallet={busd_eth_address}&bnb_wallet={bnb_address}&busd_wallet={busd_address}&matic_wallet={matic_address}&usdt_matic_wallet={usdt_matic_address}&key={genereted_reusable_key}&full={true_or_false}&idempotency_key={idempotency_key}&logo_url={logo_logo}&return_url={url_to_return_page}&support_url={support_url}
Several payments with a customer-defined price
https://ui.calypso.finance/payment?type=unlimited&description={text}&key={genereted_reusable_key}&full={true_or_false}&idempotency_key={idempotency_key}&logo_url={logo_logo}&return_url={url_to_return_page}&support_url={support_url}
Depending on the specified parameters you can create different types of payment widget for particular use case you need.
Description of parameters
- currency - the currency in which the payment is made. Not obligatory for unlimited payments; string, optional.
- amount - the amount for which the payment is made. Don't specify it if you want to give possibility to customer to difine the amount of money he will pay; number, optional.
- type - type of payment widget. Default value is "fiat". Set value "unlimited" if you want to create widget for unlimited payments; string, optional.
- description - description or comment that is displayed in the widget; string, obligatory.
- btc_wallet - the address of the bitcoin wallet to which the funds from the invoice payment will be received. Not obligatory for unlimited payments; string, optional.
- eth_wallet - the address of the ethereum wallet to which the funds from the invoice payment will be received.Not obligatory for unlimited payments; string, optional.
- usdt_wallet - the address of the ethereum wallet to which the funds from the invoice payment will be received in USDT. Not obligatory for unlimited payments; string, optional.
- trx_wallet - the address of the tron wallet to which the funds from the invoice payment will be received. Not obligatory for unlimited payments; string, optional.
- usdt_trx_wallet - the address of the tron wallet to which the funds from the invoice payment will be received in USDT (TRC20). Not obligatory for unlimited payments; string, optional.
- xdg_wallet - the address of the doge wallet to which the funds from the invoice payment will be received. Not obligatory for unlimited payments; string, optional.
- dai_wallet - the address of the ethereum wallet to which the funds from the invoice payment will be received in DAI. Not obligatory for unlimited payments; string, optional.
- frax_wallet - the address of the ethereum wallet to which the funds from the invoice payment will be received in FRAX. Not obligatory for unlimited payments; string, optional.
- usdc_wallet - the address of the ethereum wallet to which the funds from the invoice payment will be received in USDT. Not obligatory for unlimited payments; string, optional.
- busd_eth_wallet - the address of the ethereum wallet to which the funds from the invoice payment will be received in BUSD (ERC20). Not obligatory for unlimited payments; string, optional.
- bnb_wawllet - the address of the binance smart chain wallet to which the funds from the invoice payment will be received. Not obligatory for unlimited payments; string, optional.
- busd_wallet - the address of the binance smart chain wallet to which the funds from the invoice payment will be received in BUSD. Not obligatory for unlimited payments; string, optional.
- matic_wallet - the address of the polygon wallet to which the funds from the invoice payment will be received. Not obligatory for unlimited payments; string, optional.
- usdt_matic_wallet - the address of the polygon wallet to which the funds from the invoice payment will be received in USDT. Not obligatory for unlimited payments; string, optional.
- key - a reusable key with a limited validity period, which is generated by the user via the Public API using the api key; string, obligatory.
- full - if true, the full version of the widget is displayed, if false, the mini version of the widget is shown; boolean; optional.
- idempotencyKey - idempotency key in the uuid4 format, that allows to get created invoice by idempotencyKey field; string, optional.
- logo_url - link to the logo of merchant which will be shown in the payment widget. The logo must be in PNG format. Recommended size 100*24 px; string, optional.
- return_url - link to the web page where client can come back to from payment widget; string, optional.
- support_url - link to the merchant support page where client can go to from payment widget; string, optional.
Quick guide on payment widget type
To summarize, here is a quick guide on what type of payment widget you need to use for your purposes.
- If you want to receive a single payment for your product with a fixed predetermined price you'll need to use:
- A SINGLE_FIAT static payment widget (recommended)
- A dynamic payment widget with fixed price set of parameters
- If you want to receive a single payment for your product with a customer-defined price you'll need to use:
- A dynamic payment widget with a customer-defined price set of parameters
- If you want to receive several payments with a customer-defined price you'll need to use:
- An UNLIMITED_LINKED static payment widget (recommended)
- A dynamic payment widget with several payments & customer-defined price set of parameters
Payout
Overview
Payout is a payment of a reward, dividend, insurance compensation, etc. (i.e. a client may request to withdraw funds won in a casino). Withdrawal of funds is performed by Payment Processor.
Terminology and entities
- Payout is an object with data about a payout: payout ID, its status and data on the amount to be paid. The difference between the payment amount and the payout amount is the sum of all commissions.
- Wallet allows you to deposit and withdraw funds, as well as receive all information on payments made. A wallet in the Calypso system is set up in the context of the company.
- Client is a payee. Client data can be re-included in the payment.
API
Calypso enables external developers to programmatically interact with the service. One way to do this is to use Calypso APIs.
API access key
The API access key is used to authenticate operations required for making payments and payouts.
If passing incorrect API key in requests to Calypso API, the platform returns an authentication error (HTTP/401).
Please do not share your Calypso API key with anyone!
More details on API access keys are available on the Invoice API page.
Payout wallets
Hot wallet is a wallet designed to deposit and withdraw funds by creating a payout. It can be created via interface in Wallets section.
Features:
- View a balance
- Deposit funds
- Withdraw funds
- View transactions
- View statistics
Working with payout wallets via API:
Data on wallets and available assets in them can be received by using the method POST https://public-gateway.calypso.finance/api/v1/pub/payout/asset/all;
Example:
To get a payout wallet address to deposit funds:
- Send API request POST https://public-gateway.calypso.finance/api/v1/pub/payout/asset/all
- In the response, find the link for payout in required currency by navigating through the “currency” fields in the “assets” array
- Copy a wallet address for required currency from the field “address” and transfer funds to this address
Creating payout via API
- Check wallet balance and ensure enough funds for payouts are available by using the method POST https://public-gateway.calypso.finance/api/v1/pub/payout/asset/all;
- Before creating a payout, get a network commission coefficient by using the method POST https://public-gateway.calypso.finance/api/v1/pub/payout/fee. The received value must be passed in the parameter networkFeeRatio of the payout creation method.
- Create the payout by using the method POST https://public-gateway.calypso.finance/api/v1/pub/payout/create;
- Get the data on the payout and its status by using the method POST https://public-gateway.calypso.finance/api/v1/pub/payout;
Scheme of information process interaction
Below is an example of creating a payout from a client’s site or application.
Names of requests on the scheme indicate certain payment API methods.
Payout statuses:
Status | Description |
---|---|
PENDING_CONFIRMATION | A payout is created via UI and is awaiting confirmation from other process participants. |
CONFIRMED | • A payout is created via UI and confirmed by other process participants. • A payout created via API is automatically created with this status. |
IN_PROGRESS | • Transaction for a payout is created and is awaiting to be sent to the network. •Transaction for a payout is sent to the network to be sent to a block and is awaiting confirmation from nodes. |
COMPLETED | Funds are successfully credited to destination wallet. |
FAILED | An error occurred when sending funds. There can be many reasons of the error. You may follow these remediation steps: 1. Wait a while and create a new similar payout. 2. Contact our technical support. |
CANCELED | A payout has been canceled by merchant. |
Diagram nodes indicate payout statuses, arrows indicate processes a successful completion of which transfers a payout from one status to another.
Notifications about events
Currently, notifications are displayed only in the Calypso UI in transaction details. There are the following notification types:
- Price has been changed during a transaction.
- There are not enough funds in the account to pay a commission after the payout creation and confirmation.
Payout limits
Currently, the limit is 10,000 payouts per day. There are no limits for transaction amounts in the total payout amount.
How long will it take for the funds to be credited to the account?
When a request is confirmed, some time is required to confirm transactions in the blockchain.
Confirmation time depends on the following factors:
- Blockchain type and current network load
- Specificities of the cryptocurrency provider wallet accepting payments. Since the very last blocks on the blockchain are not considered completely secure, services often wait for additional block confirmations before considering a transaction to be successful and irreversible.
Then, it is required to wait for the transaction to complete. The funds will be credited to your wallet shortly.
Mass Payouts
What are Mass Payouts?
Mass Payout is a method of paying up to 10,000 recipients simultaneously. Since mass payouts are submitted online, they are processed instantly which helps organizations to save time, money and resources.
How does it work?
The principle of Mass Payout is based on the use of the API:
- First, the company sends a request for a balance to check if funds are available.
- Next, you need to get the network commission coefficient. This value is required to create a request for Mass Payout.
- Next, the company sends a request to Calypso Payout API to conduct a Mass Payout.
- Next, Calypso handles a request.
- Next, Calypso verifies if there are enough funds on the balance.
- Next, the funds are sent to the recipients.
The Calypso Payout API is great for merchants needing to automate sending payments in real time. The company provides the ability to simultaneously make up to 10,000 payments.
Mass payouts are perfect for sending salaries to subordinates, payouts to partners or e-commerce marketplaces.
How to implement this via API?
Below is an example of creating Mass Payout from the client’s site or application.
Names of requests on the scheme indicate certain payment API methods.
Limits
Currently, there is a limit for quantity of transactions in one mass payout:
- 1000 transactions for ETH and tokens ERC-20;
- 100 transactions for other currencies.
Recurrent payments
Overview
Recurrent payments is a way to receive payments by merchant from a client on a regular basis via subscription.
This functionality allows you to create, manage and receive information about a subscription for your client.
For now we allow merchants and their clients to use recurrent payments functionality for ERC-20 (Ethereum, Binance Smart Chain, Polygon blockchains) tokens.
Merchant features:
- Add a subscription form on the site
- Customize your clients subscription: change duration, periodicity and free period options
- Monitor your client payments
- Receive funds directly to merchant’s wallet address
Client features:
- Subscribe for a product/service and pay for it in cryptocurrency
- Get a confirmation that subscription is active and money are received by a merchant
- Cancel the subscription any time you want
API
Calypso enables external developers to programmatically interact with the service. One way to do this is to use Calypso APIs.
API access key
The API access key is used to authenticate operations required for making payments and payouts.
If passing incorrect API key in requests to Calypso API, the platform returns an authentication error (HTTP/401).
Please do not share your Calypso API key with anyone!
More details on API access keys are available on the Invoice API page.
Payment by subscription
To regularly transfer funds for provided products/services to a merchant account, the subscription must be created.
To allow a client to subscribe to your service from the Calypso subscription form, there are the following steps to be performed:
- Send API request to create a subscription (POST https://public-gateway.calypso.finance/api/v1/pub/recurrent/create)
- Redirect a browser of a user to the link of the following format: https://ui.calypso.finance/subscription?uuid={linkId}
Example of the create subscription request:
{
"nonce": 0,
"request": {
"amount": 1,
"currency": "USDT",
"depositAddress": "0x45aafbde1243ab39eccea1b4ba0174bc7bd130c7",
"description": "subscription for client 1",
"duration": 60,
"freePeriod": 3,
"name": "Subscription Extra",
"periodicity": 30,
"redirectUrl": "https://google.com/",
"supportUrl": "https://google.com/"
}
}
Further steps to complete payment are performed by a user in the subscription form.
Subscription statuses
Status | Description |
---|---|
CREATED | • A new subscription has been created. • The client has not yet subscribed for your product/service. |
PENDING_ACTIVATION | • The client has subscribed for your product/service and gave allowance for funds withdrawal. • The the incoming payment transaction has not yet been mined in the blockchain. |
ACTIVE | • The subscription is active. • The funds for the the billing period have been received on merchant’s wallet. |
PAUSED | • Not enough funds on the client blockchain address to pay for subscription. • he client has cancelled the allowance for funds permission. |
ARCHIVED | Subscription is deleted by merchant (manually) or the system (after the subscription has ended) |
Diagram nodes indicate subscription statuses, arrows indicate processes of a successful completion of subscription steps or occurring errors.
Authentication
Example
const crypto = require("crypto-js");
const request = require('request');
const body = JSON.stringify({
"nonce": 0,
"request": {
"stateNames": "string",
"pageNumber": 0,
"size": 0,
"direction": "ASC",
"properties": "string"
}
});
const apiKey = '<your_api_key>';
const secretKey = '<your_secret_key>'
function sign(message, secretKey) {
return crypto.HmacSHA512(message, secretKey).toString(crypto.enc.hex);
}
var signature = sign(body, secretKey);
const headers = {
'Key': apiKey,
'Sign': signature,
'Content-Type': 'application/json'
}
request({
url: `https://public-gateway.calypso.finance/api/v1/pub/invoice/all,
method: 'POST',
headers: headers,
json: true,
body: body
}, (error, response, body) => {
console.log('statusCode:', response && response.statusCode)
console.log('body:', body)
});
Create API key
Calypso uses API keys to allow access to the API. You can contact Technical Support to generate a new pair of API keys for you (public and secret keys).
All requests must contain the following headers:
Header name | Description |
---|---|
Key | The api key as a string. |
Sign | The HEX-encoded signature (see Signing a Request). |
Content-Type | All request bodies should have content type application/json and be valid JSON. |
Signing a Request
Sign — POST data (in the same format in which you want to send) encrypted with method HMAC-SHA512 using secret key and the result object is converted to a HEX string.
The body is the request body string (in all cases this is JSON stringified request params object).
All the requests should also include the obligatory POST parameter nonce
with incremental numerical value (>0). The incremental numerical value should never reiterate or decrease.
Invoice API
Status | Description |
---|---|
PENDING_PAYMENT | • A new unpaid invoice. • Client has transferred funds, but the funds has not yet been credited to the account. |
MEM_POOL_FOUND | Incoming transaction to invoice wallet is found in blockchain mempool. |
PAID | Invoice is paid. |
PENDING_INTERVENTION | • Intervention from the merchant is awaited. • Client transferred insufficient amount. • Client has transferred an amount exceeding an invoice amount. • Funds were transferred from different client accounts. |
CANCEL | Invoice is canceled by merchant. |
COMPLETED | Funds are transferd to merchant wallet. |
ARCHIVED | Invoce is deleted by merchant. |
Get All Invoices
Request
curl --location --request POST 'https://public-gateway.calypso.finance/api/v1/pub/invoice/all' \
--header 'Key: <your_api_key>' \
--header 'Sign: <your_sign>' \
--header 'Content-Type: application/json' \
--data-raw '{
"nonce": 0,
"request": {
"stateNames": [
"PENDING_PAYMENT"
],
"typeNames": [
"SINGLE", "UNLIMITED"
],
"pageNumber": 0,
"size": 0,
"direction": "ASC",
"property": "DATE"
}
}'
Response
{
"page": 0,
"result": [
{
"amount": 0,
"amountInInvoiceWallet": 0,
"cartItems": [
{
"currency": "BNB",
"price": 0,
"product": "string",
"quantity": 0
}
],
"createdDate": "2022-07-27T14:24:14.955Z",
"currency": "BNB",
"description": "string",
"expiration": "2022-07-27T14:24:14.955Z",
"externalId": "string",
"fee": 0,
"fiat": {
"additionalProp1": 0,
"additionalProp2": 0,
"additionalProp3": 0
},
"fiatAmount": 0,
"fiatCurrency": "USD",
"fiatInInvoiceWallet": {
"additionalProp1": 0,
"additionalProp2": 0,
"additionalProp3": 0
},
"hotWallet": {
"address": "string",
"name": "string"
},
"id": 0,
"idempotencyKey": "3fa85f64-5717-4562-b3fc-2c963f66afa6",
"interventionType": "OVERPAY",
"invoiceAddress": "string",
"invoicePayments": [
{
"amount": 0,
"blockchainTransactionFee": 0,
"currency": "BNB",
"feeCurrency": "BNB",
"hotWallet": {
"address": "string",
"name": "string"
},
"notEnoughFundsForTokenFee": false,
"notEnoughFundsForTokenFeeAmount": 0,
"payAmount": 0,
"state": "CANCELED",
"toHotWalletHash": "string",
"tokenFeeRequestHash": "string",
"tokenTransactionFee": 0
}
],
"isInterventionResolved": false,
"lastDepositHash": "string",
"lastFiatUpdated": "2022-07-27T14:24:14.955Z",
"logoUrl": "string",
"payAmount": 0,
"returnUrl": "string",
"state": "ARCHIVED",
"subscriptionEnabled": false,
"supportUrl": "string",
"totalDebitAmount": 0,
"type": "SINGLE",
"upperCommission": false,
"useLiquidity": false
}
],
"size": 0,
"total": 0,
"totalElements": 0
}
This endpoint retrieves all invoices.
HTTP Request
POST https://public-gateway.calypso.finance/api/v1/pub/invoice/all
Header
Parameter | Type | Mandatory | Description |
---|---|---|---|
Key | STRING | Yes | <your_api_key> |
Sign | STRING | Yes | <your_sign> |
Content-Type | STRING | Yes | must be set to application/json for requests to the Calypso API |
Request Body
parameter | type | mandatory | description |
---|---|---|---|
nonce | number | Yes | nonce used in construction of sign header. |
request | object | Yes | this object contains request details. |
request.stateNames | array | Yes | specify the status of results to return. [ MEM_POOL_FOUND, PENDING_PAYMENT, PAID, COMPLETED, PENDING_INTERVENTION, CANCEL, ARCHIVED ] |
request.typeNames | array | Yes | type of invoices. [ SINGLE, SINGLE_FIAT, UNLIMITED ] |
request.pageNumber | number | Yes | specify the page of results to return. |
request.size | number | Yes | a numeric value indicating the page size. |
request.direction | string | Yes | the direction of this api call which can be asc or desc. [ ASC, DESC ] |
request.property | array | Yes | the attribute by which sorting is performed. [ PAY_AMOUNT, CURRENCY, STATE, DATE ] |
Response Body
parameter | type | mandatory | description |
---|---|---|---|
page | number | Yes | result page number. |
result | array | Yes | this object contains response details. |
result.amount | number | No | represents amount of the invoice. |
result.amountInInvoicewallet | number | Yes | initially set to 0 when creating the invoice. It will be updated with the total amount paid to the invoice. |
result.cartItems | array | Yes | list of line items. |
result.cartItems.currency | string | Yes | this is the currency associated with the price field. [ BNB, BTC, BUSD, BUSD_ETH, DAI, ETH, EUR, FRAX, KZT, MATIC, RUB, TRX, UAH, USD, USDC, USDT, USDT_MATIC, USDT_TRX, XDG, BTC_LNG, USDT_BSC ] |
result.cartItems.price | number | Yes | price of this unit. |
result.cartItems.product | string | Yes | name of this unit. |
result.cartItems.quantity | number | Yes | line item number of units. |
result.createdDate | string | Yes | time of invoice creation. |
result.currency | string | Yes | represents the currency of the invoice. [ BNB, BTC, BUSD, BUSD_ETH, DAI, ETH, FRAX, MATIC, TRX, USDC, USDT, USDT_MATIC, USDT_TRX, XDG, BTC_LNG, USDT_BSC ] |
result.description | string | Yes | short invoice description. |
result.expiration | string | No | represents server timestamp of invoice expiration moment. |
result.externalId | string | No | merchant ID that can be assigned to invoice or several invoices in string format |
result.fee | number | No | this is referenced as "network cost" on an invoice. |
result.fiat | object | Yes | the total amount of the invoice in different fiat currencies. |
result.featAmount | number | No | amount of fiat money set for SINGLE_FIAT_INVOICE |
result.fiatCurrency | string | No | currency of featAmount [ EUR, USD ] |
result.fiatInInvoiceWallet | object | No | actual amount on the invoice wallet in different fiat currencies. |
result.hotWallet | object | No | object with information about wallet where funds from invoice will be transfered |
result.hotWallet.address | string | Yes | address of the hot wallet |
result.hotWallet.name | string | No | name of the hot wallet |
result.id | number | Yes | invoice id. |
result.idempotencyKey | string | Yes | the external id that can be generated by user while creating the invoice |
result.interventionType | string | No | represents the case of intervention: UNDERPAY - client paid less money than payAmount, OVERPAY - client paid more money than payAmount |
result.invoiceAddress | string | Yes | crypto address for deposit. |
result.invoicePayments | object | No | object with data about withdrawal from invoice wallet to hot wallet |
result.invoicePayments.amount | number | Yes | amount of withdrawal |
result.invoicePayments.blockchainTransactionFee | number | Yes | amount of transaction fee for the withdrawal |
result.invoicePayments.currency | string | Yes | currency of the withdrawal. [ BNB, BTC, BUSD, BUSD_ETH, DAI, ETH, FRAX, MATIC, TRX, USDC, USDT, USDT_MATIC, USDT_TRX, XDG, BTC_LNG, USDT_BSC ] |
result.invoicePayments.feeCurrency | string | Yes | currency of the transaction fee for the withdrawal. [ BNB, BTC, BUSD, BUSD_ETH, DAI, ETH, FRAX, MATIC, TRX, USDC, USDT, USDT_MATIC, USDT_TRX, XDG ] |
result.invoicePayments.hotWallet | object | Yes | address of the hot wallet where transfered money from invoice wallet |
result.invoicePayments.notEnoughFundsForTokenFee | boolean | Yes | represents whether enough funds for transaction fee in token withdrawal or not |
result.invoicePayments.notEnoughFundsForTokenFeeAmount | number | Yes | amount of required money for transaction fee in token withdrawal |
result.invoicePayments.payAmount | number | Yes | amount of withdrawal money in total (amount + blockchainTransactionFee ) |
result.invoicePayments.state | string | Yes | state of the withdrawal [ INIT, REQUEST_FOUNDS_FOR_FEE, REQUEST_FOUNDS_FOR_FEE_FAILED, MAKE_WITHDRAWAL, PENDING_WITHDRAWAL_COMPLETED, WITHDRAWAL_FAILED, WITHDRAWAL_COMPLETED, CANCELED ] |
result.invoicePayments.toHotWalletHash | string | Yes | hash of the transaction from invoice wallet to merchant wallet |
result.invoicePayments.tokenFeeRequestHash | string | No | hash of the transaction from merchant wallet to invoice wallet which transfers base currency for token transfer from invoice wallet to merchant wallet. Only for invoices in token currencies |
result.invoicePayments.tokenTransactionFee | number | Yes | transaction fee for transferring base currency from merchant wallet to invoice wallet to pay transaction fee for token withdrawal |
result.isInterventionResolved | boolean | Yes | represents whether the intervention was resolved or not (set by user) |
result.lastDepositHash | string | No | Hash of the last deposit transaction to the invoice |
result.lastFiatUpdated | string | No | time when the exchange rate was updated last time in SINGLE_FIAT invoices |
result.payAmount | number | No | amount of money to pay. |
result.state | string | Yes | represents status of the invoice. |
result.logoUrl | string | No | 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 |
result.returnUrl | string | No | link to the web page where client can come back to from payment link (page with invoice data for payment) |
result.supportUrl | string | No | link to the merchant support page where client can go to from payment link (page with invoice data for payment) |
result.totalDebitAmount | number | Yes | the total amount received on the invoice wallet. |
result.type | string | Yes | 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 |
result.upperCommission | boolean | No | defines whether network transaction fee for transfer from invoice wallet to your wallet will be substracted from transfer amount (false) or not (true). true is by default. |
result.useLiquidity | boolean | No | defines whether fee for transaction will be charged from liquidity wallet of Calypso (true) or from merchant wallet (false) |
size | number | Yes | a numeric value indicating the page size. |
total | number | Yes | the total number of pages matching the query. |
totalElements | number | Yes | the total number of objects matching the query. |
Get Invoices By External ID
Request
curl --location --request POST 'https://public-gateway.calypso.finance/api/v1/pub/invoice/external' \
--header 'Key: <your_api_key>' \
--header 'Sign: <your_sign>' \
--header 'Content-Type: application/json' \
--data-raw '{
"nonce": 0,
"request": {
"pageNumber": 0,
"size": 0,
"direction": "ASC"
"externalId": "string"
}
}'
Response
{
"page": 0,
"result": [
{
"amount": 0,
"amountInInvoiceWallet": 0,
"cartItems": [
{
"currency": "BNB",
"price": 0,
"product": "string",
"quantity": 0
}
],
"createdDate": "2022-07-27T14:24:14.955Z",
"currency": "BNB",
"description": "string",
"expiration": "2022-07-27T14:24:14.955Z",
"externalId": "string",
"fee": 0,
"fiat": {
"additionalProp1": 0,
"additionalProp2": 0,
"additionalProp3": 0
},
"fiatAmount": 0,
"fiatCurrency": "USD",
"fiatInInvoiceWallet": {
"additionalProp1": 0,
"additionalProp2": 0,
"additionalProp3": 0
},
"hotWallet": {
"address": "string",
"name": "string"
},
"id": 0,
"idempotencyKey": "3fa85f64-5717-4562-b3fc-2c963f66afa6",
"interventionType": "OVERPAY",
"invoiceAddress": "string",
"invoicePayments": [
{
"amount": 0,
"blockchainTransactionFee": 0,
"currency": "BNB",
"feeCurrency": "BNB",
"hotWallet": {
"address": "string",
"name": "string"
},
"notEnoughFundsForTokenFee": false,
"notEnoughFundsForTokenFeeAmount": 0,
"payAmount": 0,
"state": "CANCELED",
"toHotWalletHash": "string",
"tokenFeeRequestHash": "string",
"tokenTransactionFee": 0
}
],
"isInterventionResolved": false,
"lastDepositHash": "string",
"lastFiatUpdated": "2022-07-27T14:24:14.955Z",
"logoUrl": "string",
"payAmount": 0,
"returnUrl": "string",
"state": "ARCHIVED",
"subscriptionEnabled": false,
"supportUrl": "string",
"totalDebitAmount": 0,
"type": "SINGLE",
"upperCommission": false,
"useLiquidity": false
}
],
"size": 0,
"total": 0,
"totalElements": 0
}
This endpoint retrieves invoices by specified externalId.
HTTP Request
POST https://public-gateway.calypso.finance/api/v1/pub/invoice/external
Header
Parameter | Type | Mandatory | Description |
---|---|---|---|
Key | STRING | Yes | <your_api_key> |
Sign | STRING | Yes | <your_sign> |
Content-Type | STRING | Yes | must be set to application/json for requests to the Calypso API |
Request Body
parameter | type | mandatory | description |
---|---|---|---|
nonce | number | Yes | nonce used in construction of sign header. |
request | object | Yes | this object contains request details. |
request.pageNumber | number | Yes | specify the page of results to return. |
request.size | number | Yes | a numeric value indicating the page size. |
request.direction | string | Yes | the direction of this api call which can be asc or desc. [ ASC, DESC ] |
request.externalId | string | Yes | merchant ID that can be assigned to invoice or several invoices in string format. |
Response Body
parameter | type | mandatory | description |
---|---|---|---|
page | number | Yes | result page number. |
result | array | Yes | this object contains response details. |
result.amount | number | No | represents amount of the invoice. |
result.amountInInvoicewallet | number | Yes | initially set to 0 when creating the invoice. It will be updated with the total amount paid to the invoice. |
result.cartItems | array | Yes | list of line items. |
result.cartItems.currency | string | Yes | this is the currency associated with the price field. [ BNB, BTC, BUSD, BUSD_ETH, DAI, ETH, EUR, FRAX, KZT, MATIC, RUB, TRX, UAH, USD, USDC, USDT, USDT_MATIC, USDT_TRX, XDG, BTC_LNG, USDT_BSC ] |
result.cartItems.price | number | Yes | price of this unit. |
result.cartItems.product | string | Yes | name of this unit. |
result.cartItems.quantity | number | Yes | line item number of units. |
result.createdDate | string | Yes | time of invoice creation. |
result.currency | string | Yes | represents the currency of the invoice. [ BNB, BTC, BUSD, BUSD_ETH, DAI, ETH, FRAX, MATIC, TRX, USDC, USDT, USDT_MATIC, USDT_TRX, XDG, BTC_LNG, USDT_BSC ] |
result.description | string | Yes | short invoice description. |
result.expiration | string | No | represents server timestamp of invoice expiration moment. |
result.externalId | string | No | merchant ID that can be assigned to invoice or several invoices in string format. |
result.fee | number | No | this is referenced as "network cost" on an invoice. |
result.fiat | object | Yes | the total amount of the invoice in different fiat currencies. |
result.featAmount | number | No | amount of fiat money set for SINGLE_FIAT_INVOICE |
result.fiatCurrency | string | No | currency of featAmount [ EUR, USD ] |
result.fiatInInvoiceWallet | object | No | actual amount on the invoice wallet in different fiat currencies. |
result.hotWallet | object | No | object with information about wallet where funds from invoice will be transfered |
result.hotWallet.address | string | Yes | address of the hot wallet |
result.hotWallet.name | string | No | name of the hot wallet |
result.id | number | Yes | invoice id. |
result.idempotencyKey | string | Yes | the external id that can be generated by user while creating the invoice |
result.interventionType | string | No | represents the case of intervention: UNDERPAY - client paid less money than payAmount, OVERPAY - client paid more money than payAmount |
result.invoiceAddress | string | Yes | crypto address for deposit. |
result.invoicePayments | object | No | object with data about withdrawal from invoice wallet to hot wallet |
result.invoicePayments.amount | number | Yes | amount of withdrawal |
result.invoicePayments.blockchainTransactionFee | number | Yes | amount of transaction fee for the withdrawal |
result.invoicePayments.currency | string | Yes | currency of the withdrawal. [ BNB, BTC, BUSD, BUSD_ETH, DAI, ETH, FRAX, MATIC, TRX, USDC, USDT, USDT_MATIC, USDT_TRX, XDG, BTC_LNG, USDT_BSC ] |
result.invoicePayments.feeCurrency | string | Yes | currency of the transaction fee for the withdrawal. [ BNB, BTC, BUSD, BUSD_ETH, DAI, ETH, FRAX, MATIC, TRX, USDC, USDT, USDT_MATIC, USDT_TRX, XDG ] |
result.invoicePayments.hotWallet | object | Yes | address of the hot wallet where transfered money from invoice wallet |
result.invoicePayments.notEnoughFundsForTokenFee | boolean | Yes | represents whether enough funds for transaction fee in token withdrawal or not |
result.invoicePayments.notEnoughFundsForTokenFeeAmount | number | Yes | amount of required money for transaction fee in token withdrawal |
result.invoicePayments.payAmount | number | Yes | amount of withdrawal money in total (amount + blockchainTransactionFee ) |
result.invoicePayments.state | string | Yes | state of the withdrawal [ INIT, REQUEST_FOUNDS_FOR_FEE, REQUEST_FOUNDS_FOR_FEE_FAILED, MAKE_WITHDRAWAL, PENDING_WITHDRAWAL_COMPLETED, WITHDRAWAL_FAILED, WITHDRAWAL_COMPLETED, CANCELED ] |
result.invoicePayments.toHotWalletHash | string | Yes | hash of the transaction from invoice wallet to merchant wallet |
result.invoicePayments.tokenFeeRequestHash | string | No | hash of the transaction from merchant wallet to invoice wallet which transfers base currency for token transfer from invoice wallet to merchant wallet. Only for invoices in token currencies |
result.invoicePayments.tokenTransactionFee | number | Yes | transaction fee for transferring base currency from merchant wallet to invoice wallet to pay transaction fee for token withdrawal |
result.isInterventionResolved | boolean | Yes | represents whether the intervention was resolved or not (set by user) |
result.lastDepositHash | string | No | Hash of the last deposit transaction to the invoice |
result.lastFiatUpdated | string | No | time when the exchange rate was updated last time in SINGLE_FIAT invoices |
result.payAmount | number | No | amount of money to pay. |
result.state | string | Yes | represents status of the invoice. |
result.logoUrl | string | No | 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 |
result.returnUrl | string | No | link to the web page where client can come back to from payment link (page with invoice data for payment) |
result.supportUrl | string | No | link to the merchant support page where client can go to from payment link (page with invoice data for payment) |
result.totalDebitAmount | number | Yes | the total amount received on the invoice wallet. |
result.type | string | Yes | 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 |
result.upperCommission | boolean | No | defines whether network transaction fee for transfer from invoice wallet to your wallet will be substracted from transfer amount (false) or not (true). true is by default. |
result.useLiquidity | boolean | No | defines whether fee for transaction will be charged from liquidity wallet of Calypso (true) or from merchant wallet (false) |
size | number | Yes | a numeric value indicating the page size. |
total | number | Yes | the total number of pages matching the query. |
totalElements | number | Yes | the total number of objects matching the query. |
Get a Specific Invoice
Request
curl --location --request POST 'https://public-gateway.calypso.finance/api/v1/pub/invoice' \
--header 'Key: <your_api_key>' \
--header 'Sign: <your_sign>' \
--header 'Content-Type: application/json' \
--data-raw '{
"nonce": 0,
"request": {
"id": 0,
"idempotencyKey": "3fa85f64-5717-4562-b3fc-2c963f66afa6"
}
}'
Response
{
"amount": 0,
"amountInInvoiceWallet": 0,
"cartItems": [
{
"currency": "BNB",
"price": 0,
"product": "string",
"quantity": 0
}
],
"createdDate": "2022-07-27T14:24:14.955Z",
"currency": "BNB",
"description": "string",
"expiration": "2022-07-27T14:24:14.955Z",
"externalId": "string",
"fee": 0,
"fiat": {
"additionalProp1": 0,
"additionalProp2": 0,
"additionalProp3": 0
},
"fiatAmount": 0,
"fiatCurrency": "USD",
"fiatInInvoiceWallet": {
"additionalProp1": 0,
"additionalProp2": 0,
"additionalProp3": 0
},
"hotWallet": {
"address": "string",
"name": "string"
},
"id": 0,
"idempotencyKey": "3fa85f64-5717-4562-b3fc-2c963f66afa6",
"interventionType": "OVERPAY",
"invoiceAddress": "string",
"invoicePayments": [
{
"amount": 0,
"blockchainTransactionFee": 0,
"currency": "BNB",
"feeCurrency": "BNB",
"hotWallet": {
"address": "string",
"name": "string"
},
"notEnoughFundsForTokenFee": false,
"notEnoughFundsForTokenFeeAmount": 0,
"payAmount": 0,
"state": "CANCELED",
"toHotWalletHash": "string",
"tokenFeeRequestHash": "string",
"tokenTransactionFee": 0
}
],
"isInterventionResolved": false,
"lastDepositHash": "string",
"lastFiatUpdated": "2022-07-27T14:24:14.955Z",
"logoUrl": "string",
"payAmount": 0,
"returnUrl": "string",
"state": "ARCHIVED",
"subscriptionEnabled": false,
"supportUrl": "string",
"totalDebitAmount": 0,
"type": "SINGLE",
"upperCommission": false,
"useLiquidity": false
}
This endpoint retrieves a specific invoice.
HTTP Request
POST https://public-gateway.calypso.finance/api/v1/pub/invoice
Header
Parameter | Type | Mandatory | Description |
---|---|---|---|
Key | STRING | Yes | <your_api_key> |
Sign | STRING | Yes | <your_sign> |
Content-Type | STRING | Yes | must be set to application/json for requests to the Calypso API |
Request Body
parameter | type | mandatory | description |
---|---|---|---|
nonce | number | Yes | nonce used in construction of sign header. |
request | object | Yes | this object contains request details. |
request.id | string | No | the id of the invoice you want to look up. |
request.idempotencyKey | string | No | the external id that can be generated by user while creating the invoice |
Response Body
parameter | type | mandatory | description |
---|---|---|---|
amount | number | No | represents amount of the invoice. |
amountInInvoicewallet | number | Yes | initially set to 0 when creating the invoice. It will be updated with the total amount paid to the invoice. |
cartItems | array | Yes | list of line items. |
cartItems.currency | string | Yes | this is the currency associated with the price field. [ BNB, BTC, BUSD, BUSD_ETH, DAI, ETH, EUR, FRAX, KZT, MATIC, RUB, TRX, UAH, USD, USDC, USDT, USDT_MATIC, USDT_TRX, XDG, BTC_LNG, USDT_BSC ] |
cartItems.price | number | Yes | price of this unit. |
cartItems.product | string | Yes | name of this unit. |
cartItems.quantity | number | Yes | line item number of units. |
createdDate | string | Yes | time of invoice creation. |
currency | string | Yes | represents the currency of the invoice. [ BNB, BTC, BUSD, BUSD_ETH, DAI, ETH, FRAX, MATIC, TRX, USDC, USDT, USDT_MATIC, USDT_TRX, XDG, BTC_LNG, USDT_BSC ] |
description | string | Yes | short invoice description. |
expiration | string | No | represents server timestamp of invoice expiration moment. |
externalId | string | No | merchant ID that can be assigned to invoice or several invoices in string format. |
fee | number | No | this is referenced as "network cost" on an invoice. |
fiat | object | Yes | the total amount of the invoice in different fiat currencies. |
featAmount | number | No | amount of fiat money set for SINGLE_FIAT_INVOICE |
fiatCurrency | string | No | currency of featAmount [ EUR, USD ] |
fiatInInvoiceWallet | object | No | actual amount on the invoice wallet in different fiat currencies. |
hotWallet | object | No | object with information about wallet where funds from invoice will be transfered |
hotWallet.address | string | Yes | address of the hot wallet |
hotWallet.name | string | No | name of the hot wallet |
id | number | Yes | invoice id. |
idempotencyKey | string | Yes | the external id that can be generated by user while creating the invoice |
interventionType | string | No | represents the case of intervention: UNDERPAY - client paid less money than payAmount, OVERPAY - client paid more money than payAmount |
invoiceAddress | string | Yes | crypto address for deposit. |
invoicePayments | object | No | object with data about withdrawal from invoice wallet to hot wallet |
invoicePayments.amount | number | Yes | amount of withdrawal |
invoicePayments.blockchainTransactionFee | number | Yes | amount of transaction fee for the withdrawal |
invoicePayments.currency | string | Yes | currency of the withdrawal. [ BNB, BTC, BUSD, BUSD_ETH, DAI, ETH, FRAX, MATIC, TRX, USDC, USDT, USDT_MATIC, USDT_TRX, XDG, BTC_LNG, USDT_BSC ] |
invoicePayments.feeCurrency | string | Yes | currency of the transaction fee for the withdrawal. [ BNB, BTC, BUSD, BUSD_ETH, DAI, ETH, FRAX, MATIC, TRX, USDC, USDT, USDT_MATIC, USDT_TRX, XDG ] |
invoicePayments.hotWallet | object | Yes | address of the hot wallet where transfered money from invoice wallet |
invoicePayments.notEnoughFundsForTokenFee | boolean | Yes | represents whether enough funds for transaction fee in token withdrawal or not |
invoicePayments.notEnoughFundsForTokenFeeAmount | number | Yes | amount of required money for transaction fee in token withdrawal |
invoicePayments.payAmount | number | Yes | amount of withdrawal money in total (amount + blockchainTransactionFee ) |
invoicePayments.state | string | Yes | state of the withdrawal [ INIT, REQUEST_FOUNDS_FOR_FEE, REQUEST_FOUNDS_FOR_FEE_FAILED, MAKE_WITHDRAWAL, PENDING_WITHDRAWAL_COMPLETED, WITHDRAWAL_FAILED, WITHDRAWAL_COMPLETED, CANCELED ] |
invoicePayments.toHotWalletHash | string | Yes | hash of the transaction from invoice wallet to merchant wallet |
invoicePayments.tokenFeeRequestHash | string | No | hash of the transaction from merchant wallet to invoice wallet which transfers base currency for token transfer from invoice wallet to merchant wallet. Only for invoices in token currencies |
invoicePayments.tokenTransactionFee | number | Yes | transaction fee for transferring base currency from merchant wallet to invoice wallet to pay transaction fee for token withdrawal |
isInterventionResolved | boolean | Yes | represents whether the intervention was resolved or not (set by user) |
lastDepositHash | string | No | Hash of the last deposit transaction to the invoice |
lastFiatUpdated | string | No | time when the exchange rate was updated last time in SINGLE_FIAT invoices |
payAmount | number | No | amount of money to pay. |
state | string | Yes | represents status of the invoice. |
logoUrl | string | No | 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 |
returnUrl | string | No | link to the web page where client can come back to from payment link (page with invoice data for payment) |
supportUrl | string | No | link to the merchant support page where client can go to from payment link (page with invoice data for payment) |
totalDebitAmount | number | Yes | the total amount received on the invoice wallet. |
type | string | Yes | 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 |
upperCommission | boolean | No | defines whether network transaction fee for transfer from invoice wallet to your wallet will be substracted from transfer amount (false) or not (true). true is by default. |
useLiquidity | boolean | No | defines whether fee for transaction will be charged from liquidity wallet of Calypso (true) or from merchant wallet (false) |
New Invoice
Request
curl --location --request POST 'https://public-gateway.calypso.finance/api/v1/pub/invoice/create' \
--header 'Key: <your_api_key>' \
--header 'Sign: <your_sign>' \
--header 'Content-Type: application/json' \
--data-raw '{
"nonce": 0,
"request": {
"amount": 0,
"expiration": "2022-07-19T08:30Z",
"externalId": "string",
"currency": "BTC",
"description": "string",
"type": "SINGLE",
"cartItems": [
{
"currency": "BTC",
"price": 0,
"product": "string",
"quantity": 0
}
],
"hotWalletAddress": "string",
"idempotencyKey": "3fa85f64-5717-4562-b3fc-2c963f66afa6",
"logoUrl": "string",
"returnUrl": "string",
"supportUrl": "string",
"type": "SINGLE",
"upperCommission": true,
"useLiquidity": false
}
}'
Response
{
"amount": 0,
"amountInInvoiceWallet": 0,
"cartItems": [
{
"currency": "BNB",
"price": 0,
"product": "string",
"quantity": 0
}
],
"createdDate": "2022-07-27T14:24:14.955Z",
"currency": "BNB",
"description": "string",
"expiration": "2022-07-27T14:24:14.955Z",
"externalId": "string",
"fee": 0,
"fiat": {
"additionalProp1": 0,
"additionalProp2": 0,
"additionalProp3": 0
},
"fiatAmount": 0,
"fiatCurrency": "USD",
"fiatInInvoiceWallet": {
"additionalProp1": 0,
"additionalProp2": 0,
"additionalProp3": 0
},
"hotWallet": {
"address": "string",
"name": "string"
},
"id": 0,
"idempotencyKey": "3fa85f64-5717-4562-b3fc-2c963f66afa6",
"interventionType": "OVERPAY",
"invoiceAddress": "string",
"invoicePayments": [
{
"amount": 0,
"blockchainTransactionFee": 0,
"currency": "BNB",
"feeCurrency": "BNB",
"hotWallet": {
"address": "string",
"name": "string"
},
"notEnoughFundsForTokenFee": false,
"notEnoughFundsForTokenFeeAmount": 0,
"payAmount": 0,
"state": "CANCELED",
"toHotWalletHash": "string",
"tokenFeeRequestHash": "string",
"tokenTransactionFee": 0
}
],
"isInterventionResolved": false,
"lastDepositHash": "string",
"lastFiatUpdated": "2022-07-27T14:24:14.955Z",
"logoUrl": "string",
"payAmount": 0,
"returnUrl": "string",
"state": "ARCHIVED",
"subscriptionEnabled": false,
"supportUrl": "string",
"totalDebitAmount": 0,
"type": "SINGLE",
"upperCommission": false,
"useLiquidity": false
}
This endpoint creates a new invoice.
HTTP Request
POST https://public-gateway.calypso.finance/api/v1/pub/invoice/create
Header
Parameter | Type | Mandatory | Description |
---|---|---|---|
Key | STRING | Yes | <your_api_key> |
Sign | STRING | Yes | <your_sign> |
Content-Type | STRING | Yes | must be set to application/json for requests to the Calypso API |
Request Body
name | type | mandatory | description |
---|---|---|---|
nonce | number | Yes | nonce used in construction of sign header. |
request | object | Yes | this object contains request details. |
request.fiatAmount | number | No | total invoice amount in fiat currency. Required for SINGLE_FIAT invoices. |
request.fiatCurrency | string | No | received fiat currency. [ USD, EUR ]. Required for SINGLE_FIAT invoices. |
request.amount | number | No | total invoice amount. Required for SINGLE and SINGLE_FIAT invoices. |
request.expiration | string | No | represents server timestamp of invoice expiration moment. 1 day is default value. |
request.externalId | string | No | merchant ID that can be assigned to invoice or several invoices in string format. |
request.currency | string | Yes | received blockchain currency. [ BNB, BTC, BUSD, BUSD_ETH, DAI, ETH, FRAX, MATIC, TRX, USDC, USDT, USDT_MATIC, USDT_TRX, XDG, BTC_LNG, USDT_BSC ] |
request.description | string | Yes | short invoice description. |
request.cartItems | object | No | shopping cart. |
request.cartItems.currency | string | Yes | this is the currency associated with the price field. [ BNB, BTC, BUSD, BUSD_ETH, DAI, ETH, EUR, FRAX, KZT, MATIC, RUB, TRX, UAH, USD, USDC, USDT, USDT_MATIC, USDT_TRX, XDG, BTC_LNG, USDT_BSC ] |
request.cartItems.price | number | Yes | price of this unit. |
request.cartItems.product | string | Yes | name of this unit. |
request.cartItems.quantity | number | Yes | line item number of units. |
request.hotWalletAddress | string | No | merchant crypto address where the funds will be transferred to. Required for SINGLE and SINGLE_FIAT invoices. |
request.idempotencyKey | string | No | the external id that can be generated by user while creating the invoice |
request.logoUrl | string | No | 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 |
request.returnUrl | string | No | link to the web page where client can come back to from payment link (page with invoice data for payment) |
request.supportUrl | string | No | link to the merchant support page where client can go to from payment link (page with invoice data for payment) |
request.type | string | Yes | 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 |
request.upperCommission | boolean | No | defines whether network transaction fee for transfer from invoice wallet to your wallet will be substracted from transfer amount (false) or not (true). true is by default. |
useLiquidity | boolean | No | defines whether fee for transaction will be charged from liquidity wallet of Calypso (true) or from merchant wallet (false) |
Response Body
parameter | type | mandatory | description |
---|---|---|---|
amount | number | No | represents amount of the invoice. |
amountInInvoicewallet | number | Yes | initially set to 0 when creating the invoice. It will be updated with the total amount paid to the invoice. |
cartItems | array | Yes | list of line items. |
cartItems.currency | string | Yes | this is the currency associated with the price field. [ BNB, BTC, BUSD, BUSD_ETH, DAI, ETH, EUR, FRAX, KZT, MATIC, RUB, TRX, UAH, USD, USDC, USDT, USDT_MATIC, USDT_TRX, XDG, BTC_LNG, USDT_BSC ] |
cartItems.price | number | Yes | price of this unit. |
cartItems.product | string | Yes | name of this unit. |
cartItems.quantity | number | Yes | line item number of units. |
createdDate | string | Yes | time of invoice creation. |
currency | string | Yes | represents the currency of the invoice. [ BNB, BTC, BUSD, BUSD_ETH, DAI, ETH, FRAX, MATIC, TRX, USDC, USDT, USDT_MATIC, USDT_TRX, XDG, BTC_LNG, USDT_BSC ] |
description | string | Yes | short invoice description. |
expiration | string | No | represents server timestamp of invoice expiration moment. |
externalId | string | No | merchant ID that can be assigned to invoice or several invoices in string format. |
fee | number | No | this is referenced as "network cost" on an invoice. |
fiat | object | Yes | the total amount of the invoice in different fiat currencies. |
featAmount | number | No | amount of fiat money set for SINGLE_FIAT_INVOICE |
fiatCurrency | string | No | currency of featAmount [ EUR, USD ] |
fiatInInvoiceWallet | object | No | actual amount on the invoice wallet in different fiat currencies. |
hotWallet | object | No | object with information about wallet where funds from invoice will be transfered |
hotWallet.address | string | Yes | address of the hot wallet |
hotWallet.name | string | No | name of the hot wallet |
id | number | Yes | invoice id. |
idempotencyKey | string | Yes | the external id that can be generated by user while creating the invoice |
interventionType | string | No | represents the case of intervention: UNDERPAY - client paid less money than payAmount, OVERPAY - client paid more money than payAmount |
invoiceAddress | string | Yes | crypto address for deposit. |
invoicePayments | object | No | object with data about withdrawal from invoice wallet to hot wallet |
invoicePayments.amount | number | Yes | amount of withdrawal |
invoicePayments.blockchainTransactionFee | number | Yes | amount of transaction fee for the withdrawal |
invoicePayments.currency | string | Yes | currency of the withdrawal. [ BNB, BTC, BUSD, BUSD_ETH, DAI, ETH, FRAX, MATIC, TRX, USDC, USDT, USDT_MATIC, USDT_TRX, XDG, BTC_LNG, USDT_BSC ] |
invoicePayments.feeCurrency | string | Yes | currency of the transaction fee for the withdrawal. [ BNB, BTC, BUSD, BUSD_ETH, DAI, ETH, FRAX, MATIC, TRX, USDC, USDT, USDT_MATIC, USDT_TRX, XDG ] |
invoicePayments.hotWallet | object | Yes | address of the hot wallet where transfered money from invoice wallet |
invoicePayments.notEnoughFundsForTokenFee | boolean | Yes | represents whether enough funds for transaction fee in token withdrawal or not |
invoicePayments.notEnoughFundsForTokenFeeAmount | number | Yes | amount of required money for transaction fee in token withdrawal |
invoicePayments.payAmount | number | Yes | amount of withdrawal money in total (amount + blockchainTransactionFee ) |
invoicePayments.state | string | Yes | state of the withdrawal [ INIT, REQUEST_FOUNDS_FOR_FEE, REQUEST_FOUNDS_FOR_FEE_FAILED, MAKE_WITHDRAWAL, PENDING_WITHDRAWAL_COMPLETED, WITHDRAWAL_FAILED, WITHDRAWAL_COMPLETED, CANCELED ] |
invoicePayments.toHotWalletHash | string | Yes | hash of the transaction from invoice wallet to merchant wallet |
invoicePayments.tokenFeeRequestHash | string | No | hash of the transaction from merchant wallet to invoice wallet which transfers base currency for token transfer from invoice wallet to merchant wallet. Only for invoices in token currencies |
invoicePayments.tokenTransactionFee | number | Yes | transaction fee for transferring base currency from merchant wallet to invoice wallet to pay transaction fee for token withdrawal |
isInterventionResolved | boolean | Yes | represents whether the intervention was resolved or not (set by user) |
lastDepositHash | string | No | Hash of the last deposit transaction to the invoice |
lastFiatUpdated | string | No | time when the exchange rate was updated last time in SINGLE_FIAT invoices |
payAmount | number | No | amount of money to pay. |
state | string | Yes | represents status of the invoice. |
logoUrl | string | No | 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 |
returnUrl | string | No | link to the web page where client can come back to from payment link (page with invoice data for payment) |
supportUrl | string | No | link to the merchant support page where client can go to from payment link (page with invoice data for payment) |
totalDebitAmount | number | Yes | the total amount received on the invoice wallet. |
type | string | Yes | 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 |
upperCommission | boolean | No | defines whether network transaction fee for transfer from invoice wallet to your wallet will be substracted from transfer amount (false) or not (true). true is by default. |
useLiquidity | boolean | No | defines whether fee for transaction will be charged from liquidity wallet of Calypso (true) or from merchant wallet (false) |
Funds Withdrawal (from unlimited invoice)
Request
curl --location --request POST 'https://public-gateway.calypso.finance/api/v1/pub/invoice/unlimited/withdrawal' \
--header 'Key: <your_api_key>' \
--header 'Sign: <your_sign>' \
--header 'Content-Type: application/json' \
--data-raw '{
"nonce": 0,
"request": {
"hotWalletAddress": "string",
"id": 0,
"idempotencyKey": "3fa85f64-5717-4562-b3fc-2c963f66afa6"
}
}'
Response
{
"amount": 0,
"amountInInvoiceWallet": 0,
"cartItems": [
{
"currency": "BNB",
"price": 0,
"product": "string",
"quantity": 0
}
],
"createdDate": "2022-07-27T14:24:14.955Z",
"currency": "BNB",
"description": "string",
"expiration": "2022-07-27T14:24:14.955Z",
"externalId": "string",
"fee": 0,
"fiat": {
"additionalProp1": 0,
"additionalProp2": 0,
"additionalProp3": 0
},
"fiatAmount": 0,
"fiatCurrency": "USD",
"fiatInInvoiceWallet": {
"additionalProp1": 0,
"additionalProp2": 0,
"additionalProp3": 0
},
"hotWallet": {
"address": "string",
"name": "string"
},
"id": 0,
"idempotencyKey": "3fa85f64-5717-4562-b3fc-2c963f66afa6",
"interventionType": "OVERPAY",
"invoiceAddress": "string",
"invoicePayments": [
{
"amount": 0,
"blockchainTransactionFee": 0,
"currency": "BNB",
"feeCurrency": "BNB",
"hotWallet": {
"address": "string",
"name": "string"
},
"notEnoughFundsForTokenFee": false,
"notEnoughFundsForTokenFeeAmount": 0,
"payAmount": 0,
"state": "CANCELED",
"toHotWalletHash": "string",
"tokenFeeRequestHash": "string",
"tokenTransactionFee": 0
}
],
"isInterventionResolved": false,
"lastDepositHash": "string",
"lastFiatUpdated": "2022-07-27T14:24:14.955Z",
"logoUrl": "string",
"payAmount": 0,
"returnUrl": "string",
"state": "ARCHIVED",
"subscriptionEnabled": false,
"supportUrl": "string",
"totalDebitAmount": 0,
"type": "SINGLE",
"upperCommission": false,
"useLiquidity": false
}
This endpoint allow withdraw funds to internal crypto address.
HTTP Request
POST https://public-gateway.calypso.finance/api/v1/pub/invoice/unlimited/withdrawal
Header
Parameter | Type | Mandatory | Description |
---|---|---|---|
Key | STRING | Yes | <your_api_key> |
Sign | STRING | Yes | <your_sign> |
Content-Type | STRING | Yes | must be set to application/json for requests to the Calypso API |
Request Body
parameter | type | mandatory | description |
---|---|---|---|
nonce | number | Yes | nonce used in construction of sign header. |
request | object | Yes | this object contains request details. |
request.hotWalletAddress | string | Yes | the wallet address where the funds will be transferred to |
request.id | string | Yes | the id of the invoice you want to look up. |
request.idempotencyKey | string | No | the external id that can be generated by user while creating the invoice |
Response Body
parameter | type | mandatory | description |
---|---|---|---|
amount | number | No | represents amount of the invoice. |
amountInInvoicewallet | number | Yes | initially set to 0 when creating the invoice. It will be updated with the total amount paid to the invoice. |
cartItems | array | Yes | list of line items. |
cartItems.currency | string | Yes | this is the currency associated with the price field. [ BNB, BTC, BUSD, BUSD_ETH, DAI, ETH, EUR, FRAX, KZT, MATIC, RUB, TRX, UAH, USD, USDC, USDT, USDT_MATIC, USDT_TRX, XDG, BTC_LNG, USDT_BSC ] |
cartItems.price | number | Yes | price of this unit. |
cartItems.product | string | Yes | name of this unit. |
cartItems.quantity | number | Yes | line item number of units. |
createdDate | string | Yes | time of invoice creation. |
currency | string | Yes | represents the currency of the invoice. [ BNB, BTC, BUSD, BUSD_ETH, DAI, ETH, FRAX, MATIC, TRX, USDC, USDT, USDT_MATIC, USDT_TRX, XDG, BTC_LNG, USDT_BSC ] |
description | string | Yes | short invoice description. |
expiration | string | No | represents server timestamp of invoice expiration moment. |
externalId | string | No | merchant ID that can be assigned to invoice or several invoices in string format. |
fee | number | No | this is referenced as "network cost" on an invoice. |
fiat | object | Yes | the total amount of the invoice in different fiat currencies. |
featAmount | number | No | amount of fiat money set for SINGLE_FIAT_INVOICE |
fiatCurrency | string | No | currency of featAmount [ EUR, USD ] |
fiatInInvoiceWallet | object | No | actual amount on the invoice wallet in different fiat currencies. |
hotWallet | object | No | object with information about wallet where funds from invoice will be transfered |
hotWallet.address | string | Yes | address of the hot wallet |
hotWallet.name | string | No | name of the hot wallet |
id | number | Yes | invoice id. |
idempotencyKey | string | Yes | the external id that can be generated by user while creating the invoice |
interventionType | string | No | represents the case of intervention: UNDERPAY - client paid less money than payAmount, OVERPAY - client paid more money than payAmount |
invoiceAddress | string | Yes | crypto address for deposit. |
invoicePayments | object | No | object with data about withdrawal from invoice wallet to hot wallet |
invoicePayments.amount | number | Yes | amount of withdrawal |
invoicePayments.blockchainTransactionFee | number | Yes | amount of transaction fee for the withdrawal |
invoicePayments.currency | string | Yes | currency of the withdrawal. [ BNB, BTC, BUSD, BUSD_ETH, DAI, ETH, FRAX, MATIC, TRX, USDC, USDT, USDT_MATIC, USDT_TRX, XDG, BTC_LNG, USDT_BSC ] |
invoicePayments.feeCurrency | string | Yes | currency of the transaction fee for the withdrawal. [ BNB, BTC, BUSD, BUSD_ETH, DAI, ETH, FRAX, MATIC, TRX, USDC, USDT, USDT_MATIC, USDT_TRX, XDG ] |
invoicePayments.hotWallet | object | Yes | address of the hot wallet where transfered money from invoice wallet |
invoicePayments.notEnoughFundsForTokenFee | boolean | Yes | represents whether enough funds for transaction fee in token withdrawal or not |
invoicePayments.notEnoughFundsForTokenFeeAmount | number | Yes | amount of required money for transaction fee in token withdrawal |
invoicePayments.payAmount | number | Yes | amount of withdrawal money in total (amount + blockchainTransactionFee ) |
invoicePayments.state | string | Yes | state of the withdrawal [ INIT, REQUEST_FOUNDS_FOR_FEE, REQUEST_FOUNDS_FOR_FEE_FAILED, MAKE_WITHDRAWAL, PENDING_WITHDRAWAL_COMPLETED, WITHDRAWAL_FAILED, WITHDRAWAL_COMPLETED, CANCELED ] |
invoicePayments.toHotWalletHash | string | Yes | hash of the transaction from invoice wallet to merchant wallet |
invoicePayments.tokenFeeRequestHash | string | No | hash of the transaction from merchant wallet to invoice wallet which transfers base currency for token transfer from invoice wallet to merchant wallet. Only for invoices in token currencies |
invoicePayments.tokenTransactionFee | number | Yes | transaction fee for transferring base currency from merchant wallet to invoice wallet to pay transaction fee for token withdrawal |
isInterventionResolved | boolean | Yes | represents whether the intervention was resolved or not (set by user) |
lastDepositHash | string | No | Hash of the last deposit transaction to the invoice |
lastFiatUpdated | string | No | time when the exchange rate was updated last time in SINGLE_FIAT invoices |
payAmount | number | No | amount of money to pay. |
state | string | Yes | represents status of the invoice. |
logoUrl | string | No | 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 |
returnUrl | string | No | link to the web page where client can come back to from payment link (page with invoice data for payment) |
supportUrl | string | No | link to the merchant support page where client can go to from payment link (page with invoice data for payment) |
totalDebitAmount | number | Yes | the total amount received on the invoice wallet. |
type | string | Yes | 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 |
upperCommission | boolean | No | defines whether network transaction fee for transfer from invoice wallet to your wallet will be substracted from transfer amount (false) or not (true). true is by default. |
useLiquidity | boolean | No | defines whether fee for transaction will be charged from liquidity wallet of Calypso (true) or from merchant wallet (false) |
Generate reusable api key
Request
curl --location --request POST 'https://public-gateway.calypso.finance/api/v1/pub/reusable-key-service' \
--header 'Key: <your_api_key>' \
--header 'Sign: <your_sign>' \
--header 'Content-Type: application/json' \
--data-raw '{
"nonce": 0,
"request": {
"expirationDate": "2022-02-10T11:04:24.435Z",
"quantity": 1
}
}'
Response
{
"expirationDate": "2022-02-10T11:04:24.435Z",
"key": "<reusable_api_key>",
"quantity": 1
}
This endpoint allows to create reusable api key for payment widget
HTTP Request
POST https://public-gateway.calypso.finance/api/v1/pub/reusable-key-service
Header
Parameter | Type | Mandatory | Description |
---|---|---|---|
Key | STRING | Yes | <your_api_key> |
Sign | STRING | Yes | <your_sign> |
Content-Type | STRING | Yes | must be set to application/json for requests to the Calypso API |
Request Body
parameter | type | mandatory | description |
---|---|---|---|
nonce | number | Yes | nonce used in construction of sign header. |
request | object | Yes | this object contains request details. |
request.expirationDate | string | Yes | The date until which the key is valid |
request.quantity | number | No | limit of uasage the created api key. If not define, the quantity equals 1 as default |
Response Body
parameter | type | mandatory | description |
---|---|---|---|
expirationDate | string | Yes | The date until which the key is valid |
key | string | Yes | generated reusable api key |
quantity | number | No | limit of uasage the created api key. If not define, the created api key is unlimited |
Mark that intervention is resolved in invoice
Request
curl --location --request POST 'https://public-gateway.calypso.finance/api/v1/pub/invoice/close-intervention' \
--header 'Key: <your_api_key>' \
--header 'Sign: <your_sign>' \
--header 'Content-Type: application/json' \
--data-raw '{
"nonce": 0,
"request": {
"id": 0,
"idempotencyKey": "3fa85f64-5717-4562-b3fc-2c963f66afa6"
}
}'
Response
{
"amount": 0,
"amountInInvoiceWallet": 0,
"cartItems": [
{
"currency": "BNB",
"price": 0,
"product": "string",
"quantity": 0
}
],
"createdDate": "2022-07-27T14:24:14.955Z",
"currency": "BNB",
"description": "string",
"expiration": "2022-07-27T14:24:14.955Z",
"externalId": "string",
"fee": 0,
"fiat": {
"additionalProp1": 0,
"additionalProp2": 0,
"additionalProp3": 0
},
"fiatAmount": 0,
"fiatCurrency": "USD",
"fiatInInvoiceWallet": {
"additionalProp1": 0,
"additionalProp2": 0,
"additionalProp3": 0
},
"hotWallet": {
"address": "string",
"name": "string"
},
"id": 0,
"idempotencyKey": "3fa85f64-5717-4562-b3fc-2c963f66afa6",
"interventionType": "OVERPAY",
"invoiceAddress": "string",
"invoicePayments": [
{
"amount": 0,
"blockchainTransactionFee": 0,
"currency": "BNB",
"feeCurrency": "BNB",
"hotWallet": {
"address": "string",
"name": "string"
},
"notEnoughFundsForTokenFee": false,
"notEnoughFundsForTokenFeeAmount": 0,
"payAmount": 0,
"state": "CANCELED",
"toHotWalletHash": "string",
"tokenFeeRequestHash": "string",
"tokenTransactionFee": 0
}
],
"isInterventionResolved": false,
"lastDepositHash": "string",
"lastFiatUpdated": "2022-07-27T14:24:14.955Z",
"logoUrl": "string",
"payAmount": 0,
"returnUrl": "string",
"state": "ARCHIVED",
"subscriptionEnabled": false,
"supportUrl": "string",
"totalDebitAmount": 0,
"type": "SINGLE",
"upperCommission": false,
"useLiquidity": false
}
This endpoint changes the value isInterventionResolved to true. The invoice must be in state COMPLETED.
HTTP Request
POST https://public-gateway.calypso.finance/api/v1/pub/invoice/close-intervention
Header
Parameter | Type | Mandatory | Description |
---|---|---|---|
Key | STRING | Yes | <your_api_key> |
Sign | STRING | Yes | <your_sign> |
Content-Type | STRING | Yes | must be set to application/json for requests to the Calypso API |
Request Body
parameter | type | mandatory | description |
---|---|---|---|
nonce | number | Yes | nonce used in construction of sign header. |
request | object | Yes | this object contains request details. |
request.id | string | No | the id of the invoice you want to look up. |
request.idempotencyKey | string | No | the external id that can be generated by user while creating the invoice |
Response Body
parameter | type | mandatory | description |
---|---|---|---|
amount | number | No | represents amount of the invoice. |
amountInInvoicewallet | number | Yes | initially set to 0 when creating the invoice. It will be updated with the total amount paid to the invoice. |
cartItems | array | Yes | list of line items. |
cartItems.currency | string | Yes | this is the currency associated with the price field. [ BNB, BTC, BUSD, BUSD_ETH, DAI, ETH, EUR, FRAX, KZT, MATIC, RUB, TRX, UAH, USD, USDC, USDT, USDT_MATIC, USDT_TRX, XDG, BTC_LNG, USDT_BSC ] |
cartItems.price | number | Yes | price of this unit. |
cartItems.product | string | Yes | name of this unit. |
cartItems.quantity | number | Yes | line item number of units. |
createdDate | string | Yes | time of invoice creation. |
currency | string | Yes | represents the currency of the invoice. [ BNB, BTC, BUSD, BUSD_ETH, DAI, ETH, FRAX, MATIC, TRX, USDC, USDT, USDT_MATIC, USDT_TRX, XDG, BTC_LNG, USDT_BSC ] |
description | string | Yes | short invoice description. |
expiration | string | No | represents server timestamp of invoice expiration moment. |
externalId | string | No | merchant ID that can be assigned to invoice or several invoices in string format. |
fee | number | No | this is referenced as "network cost" on an invoice. |
fiat | object | Yes | the total amount of the invoice in different fiat currencies. |
featAmount | number | No | amount of fiat money set for SINGLE_FIAT_INVOICE |
fiatCurrency | string | No | currency of featAmount [ EUR, USD ] |
fiatInInvoiceWallet | object | No | actual amount on the invoice wallet in different fiat currencies. |
hotWallet | object | No | object with information about wallet where funds from invoice will be transfered |
hotWallet.address | string | Yes | address of the hot wallet |
hotWallet.name | string | No | name of the hot wallet |
id | number | Yes | invoice id. |
idempotencyKey | string | Yes | the external id that can be generated by user while creating the invoice |
interventionType | string | No | represents the case of intervention: UNDERPAY - client paid less money than payAmount, OVERPAY - client paid more money than payAmount |
invoiceAddress | string | Yes | crypto address for deposit. |
invoicePayments | object | No | object with data about withdrawal from invoice wallet to hot wallet |
invoicePayments.amount | number | Yes | amount of withdrawal |
invoicePayments.blockchainTransactionFee | number | Yes | amount of transaction fee for the withdrawal |
invoicePayments.currency | string | Yes | currency of the withdrawal. [ BNB, BTC, BUSD, BUSD_ETH, DAI, ETH, FRAX, MATIC, TRX, USDC, USDT, USDT_MATIC, USDT_TRX, XDG, BTC_LNG, USDT_BSC ] |
invoicePayments.feeCurrency | string | Yes | currency of the transaction fee for the withdrawal. [ BNB, BTC, BUSD, BUSD_ETH, DAI, ETH, FRAX, MATIC, TRX, USDC, USDT, USDT_MATIC, USDT_TRX, XDG ] |
invoicePayments.hotWallet | object | Yes | address of the hot wallet where transfered money from invoice wallet |
invoicePayments.notEnoughFundsForTokenFee | boolean | Yes | represents whether enough funds for transaction fee in token withdrawal or not |
invoicePayments.notEnoughFundsForTokenFeeAmount | number | Yes | amount of required money for transaction fee in token withdrawal |
invoicePayments.payAmount | number | Yes | amount of withdrawal money in total (amount + blockchainTransactionFee ) |
invoicePayments.state | string | Yes | state of the withdrawal [ INIT, REQUEST_FOUNDS_FOR_FEE, REQUEST_FOUNDS_FOR_FEE_FAILED, MAKE_WITHDRAWAL, PENDING_WITHDRAWAL_COMPLETED, WITHDRAWAL_FAILED, WITHDRAWAL_COMPLETED, CANCELED ] |
invoicePayments.toHotWalletHash | string | Yes | hash of the transaction from invoice wallet to merchant wallet |
invoicePayments.tokenFeeRequestHash | string | No | hash of the transaction from merchant wallet to invoice wallet which transfers base currency for token transfer from invoice wallet to merchant wallet. Only for invoices in token currencies |
invoicePayments.tokenTransactionFee | number | Yes | transaction fee for transferring base currency from merchant wallet to invoice wallet to pay transaction fee for token withdrawal |
isInterventionResolved | boolean | Yes | represents whether the intervention was resolved or not (set by user) |
lastDepositHash | string | No | Hash of the last deposit transaction to the invoice |
lastFiatUpdated | string | No | time when the exchange rate was updated last time in SINGLE_FIAT invoices |
payAmount | number | No | amount of money to pay. |
state | string | Yes | represents status of the invoice. |
logoUrl | string | No | 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 |
returnUrl | string | No | link to the web page where client can come back to from payment link (page with invoice data for payment) |
supportUrl | string | No | link to the merchant support page where client can go to from payment link (page with invoice data for payment) |
totalDebitAmount | number | Yes | the total amount received on the invoice wallet. |
type | string | Yes | 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 |
upperCommission | boolean | No | defines whether network transaction fee for transfer from invoice wallet to your wallet will be substracted from transfer amount (false) or not (true). true is by default. |
useLiquidity | boolean | No | defines whether fee for transaction will be charged from liquidity wallet of Calypso (true) or from merchant wallet (false) |
Resolve intervention and receive money to the wallet
Request
curl --location --request POST 'https://public-gateway.calypso.finance/api/v1/pub/invoice/return-to-paid' \
--header 'Key: <your_api_key>' \
--header 'Sign: <your_sign>' \
--header 'Content-Type: application/json' \
--data-raw '{
"nonce": 0,
"request": {
"id": 0,
"idempotencyKey": "3fa85f64-5717-4562-b3fc-2c963f66afa6"
}
}'
Response
{
"amount": 0,
"amountInInvoiceWallet": 0,
"cartItems": [
{
"currency": "BNB",
"price": 0,
"product": "string",
"quantity": 0
}
],
"createdDate": "2022-07-27T14:24:14.955Z",
"currency": "BNB",
"description": "string",
"expiration": "2022-07-27T14:24:14.955Z",
"externalId": "string",
"fee": 0,
"fiat": {
"additionalProp1": 0,
"additionalProp2": 0,
"additionalProp3": 0
},
"fiatAmount": 0,
"fiatCurrency": "USD",
"fiatInInvoiceWallet": {
"additionalProp1": 0,
"additionalProp2": 0,
"additionalProp3": 0
},
"hotWallet": {
"address": "string",
"name": "string"
},
"id": 0,
"idempotencyKey": "3fa85f64-5717-4562-b3fc-2c963f66afa6",
"interventionType": "OVERPAY",
"invoiceAddress": "string",
"invoicePayments": [
{
"amount": 0,
"blockchainTransactionFee": 0,
"currency": "BNB",
"feeCurrency": "BNB",
"hotWallet": {
"address": "string",
"name": "string"
},
"notEnoughFundsForTokenFee": false,
"notEnoughFundsForTokenFeeAmount": 0,
"payAmount": 0,
"state": "CANCELED",
"toHotWalletHash": "string",
"tokenFeeRequestHash": "string",
"tokenTransactionFee": 0
}
],
"isInterventionResolved": false,
"lastDepositHash": "string",
"lastFiatUpdated": "2022-07-27T14:24:14.955Z",
"logoUrl": "string",
"payAmount": 0,
"returnUrl": "string",
"state": "ARCHIVED",
"subscriptionEnabled": false,
"supportUrl": "string",
"totalDebitAmount": 0,
"type": "SINGLE",
"upperCommission": false,
"useLiquidity": false
}
This endpoint allows to transfer money from invoice in internvention to merchant wallet.
HTTP Request
POST https://public-gateway.calypso.finance/api/v1/pub/invoice/return-to-paid
Header
Parameter | Type | Mandatory | Description |
---|---|---|---|
Key | STRING | Yes | <your_api_key> |
Sign | STRING | Yes | <your_sign> |
Content-Type | STRING | Yes | must be set to application/json for requests to the Calypso API |
Request Body
parameter | type | mandatory | description |
---|---|---|---|
nonce | number | Yes | nonce used in construction of sign header. |
request | object | Yes | this object contains request details. |
request.id | string | No | the id of the invoice you want to look up. |
request.idempotencyKey | string | No | the external id that can be generated by user while creating the invoice |
Response Body
parameter | type | mandatory | description |
---|---|---|---|
amount | number | No | represents amount of the invoice. |
amountInInvoicewallet | number | Yes | initially set to 0 when creating the invoice. It will be updated with the total amount paid to the invoice. |
cartItems | array | Yes | list of line items. |
cartItems.currency | string | Yes | this is the currency associated with the price field. [ BNB, BTC, BUSD, BUSD_ETH, DAI, ETH, EUR, FRAX, KZT, MATIC, RUB, TRX, UAH, USD, USDC, USDT, USDT_MATIC, USDT_TRX, XDG, BTC_LNG, USDT_BSC ] |
cartItems.price | number | Yes | price of this unit. |
cartItems.product | string | Yes | name of this unit. |
cartItems.quantity | number | Yes | line item number of units. |
createdDate | string | Yes | time of invoice creation. |
currency | string | Yes | represents the currency of the invoice. [ BNB, BTC, BUSD, BUSD_ETH, DAI, ETH, FRAX, MATIC, TRX, USDC, USDT, USDT_MATIC, USDT_TRX, XDG, BTC_LNG, USDT_BSC ] |
description | string | Yes | short invoice description. |
expiration | string | No | represents server timestamp of invoice expiration moment. |
externalId | string | No | merchant ID that can be assigned to invoice or several invoices in string format. |
fee | number | No | this is referenced as "network cost" on an invoice. |
fiat | object | Yes | the total amount of the invoice in different fiat currencies. |
featAmount | number | No | amount of fiat money set for SINGLE_FIAT_INVOICE |
fiatCurrency | string | No | currency of featAmount [ EUR, USD ] |
fiatInInvoiceWallet | object | No | actual amount on the invoice wallet in different fiat currencies. |
hotWallet | object | No | object with information about wallet where funds from invoice will be transfered |
hotWallet.address | string | Yes | address of the hot wallet |
hotWallet.name | string | No | name of the hot wallet |
id | number | Yes | invoice id. |
idempotencyKey | string | Yes | the external id that can be generated by user while creating the invoice |
interventionType | string | No | represents the case of intervention: UNDERPAY - client paid less money than payAmount, OVERPAY - client paid more money than payAmount |
invoiceAddress | string | Yes | crypto address for deposit. |
invoicePayments | object | No | object with data about withdrawal from invoice wallet to hot wallet |
invoicePayments.amount | number | Yes | amount of withdrawal |
invoicePayments.blockchainTransactionFee | number | Yes | amount of transaction fee for the withdrawal |
invoicePayments.currency | string | Yes | currency of the withdrawal. [ BNB, BTC, BUSD, BUSD_ETH, DAI, ETH, FRAX, MATIC, TRX, USDC, USDT, USDT_MATIC, USDT_TRX, XDG, BTC_LNG, USDT_BSC ] |
invoicePayments.feeCurrency | string | Yes | currency of the transaction fee for the withdrawal. [ BNB, BTC, BUSD, BUSD_ETH, DAI, ETH, FRAX, MATIC, TRX, USDC, USDT, USDT_MATIC, USDT_TRX, XDG ] |
invoicePayments.hotWallet | object | Yes | address of the hot wallet where transfered money from invoice wallet |
invoicePayments.notEnoughFundsForTokenFee | boolean | Yes | represents whether enough funds for transaction fee in token withdrawal or not |
invoicePayments.notEnoughFundsForTokenFeeAmount | number | Yes | amount of required money for transaction fee in token withdrawal |
invoicePayments.payAmount | number | Yes | amount of withdrawal money in total (amount + blockchainTransactionFee ) |
invoicePayments.state | string | Yes | state of the withdrawal [ INIT, REQUEST_FOUNDS_FOR_FEE, REQUEST_FOUNDS_FOR_FEE_FAILED, MAKE_WITHDRAWAL, PENDING_WITHDRAWAL_COMPLETED, WITHDRAWAL_FAILED, WITHDRAWAL_COMPLETED, CANCELED ] |
invoicePayments.toHotWalletHash | string | Yes | hash of the transaction from invoice wallet to merchant wallet |
invoicePayments.tokenFeeRequestHash | string | No | hash of the transaction from merchant wallet to invoice wallet which transfers base currency for token transfer from invoice wallet to merchant wallet. Only for invoices in token currencies |
invoicePayments.tokenTransactionFee | number | Yes | transaction fee for transferring base currency from merchant wallet to invoice wallet to pay transaction fee for token withdrawal |
isInterventionResolved | boolean | Yes | represents whether the intervention was resolved or not (set by user) |
lastDepositHash | string | No | Hash of the last deposit transaction to the invoice |
lastFiatUpdated | string | No | time when the exchange rate was updated last time in SINGLE_FIAT invoices |
payAmount | number | No | amount of money to pay. |
state | string | Yes | represents status of the invoice. |
logoUrl | string | No | 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 |
returnUrl | string | No | link to the web page where client can come back to from payment link (page with invoice data for payment) |
supportUrl | string | No | link to the merchant support page where client can go to from payment link (page with invoice data for payment) |
totalDebitAmount | number | Yes | the total amount received on the invoice wallet. |
type | string | Yes | 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 |
upperCommission | boolean | No | defines whether network transaction fee for transfer from invoice wallet to your wallet will be substracted from transfer amount (false) or not (true). true is by default. |
useLiquidity | boolean | No | defines whether fee for transaction will be charged from liquidity wallet of Calypso (true) or from merchant wallet (false) |
Get all deposits for the invoice
Request
curl --location --request POST 'https://public-gateway.calypso.finance/api/v1/pub/invoice/deposit/all' \
--header 'Key: <your_api_key>' \
--header 'Sign: <your_sign>' \
--header 'Content-Type: application/json' \
--data-raw '{
"nonce": 0,
"request": {
"id": 0,
"idempotencyKey": "3fa85f64-5717-4562-b3fc-2c963f66afa6",
"pageNumber": 0,
"size": 0,
"direction": "ASC",
"property": "AMOUNT"
}
}'
Response
{
"result": [
[
{
"amount": 0,
"currency": "BTC",
"transactionHash": "string",
"createdDate": "2022-09-13T07:03:05.423Z",
"addressFrom": "string"
}
]
],
"page": 0,
"size": 0,
"total": 0,
"totalElements": 0
}
This endpoint retreaves all deposits for the particular invoice.
HTTP Request
POST https://public-gateway.calypso.finance/api/v1/pub/invoice/deposit/all
Header
Parameter | Type | Mandatory | Description |
---|---|---|---|
Key | string | Yes | <your_api_key> |
Sign | string | Yes | <your_sign> |
Content-Type | string | Yes | must be set to application/json for requests to the Calypso API |
Request Body
parameter | type | mandatory | description |
---|---|---|---|
nonce | number | Yes | nonce used in construction of sign header. |
request | object | Yes | this object contains request details. |
request.id | number | No | system id of the invoice. Either id or idempotencyKey must be specified. |
request.idempotencyKey | string | No | the external id that can be generated by user while creating the invoice. |
request.pageNumber | number | Yes | specify the page of results to return. |
request.size | number | Yes | a numeric value indicating the page size. |
request.direction | string | Yes | the direction of this api call which can be asc or desc. [ ASC, DESC ] |
request.property | string | Yes | the parameter by which deposits in response will be sorted. [ AMOUNT, CURRENCY, DATE ] |
Response Body
parameter | type | mandatory | description |
---|---|---|---|
page | number | Yes | result page number. |
result | array | Yes | this object contains response details. |
result.amount | number | Yes | the amount of the deposit. |
result.currency | string | Yes | the currency of the depostit. [ BNB, BTC, BUSD, BUSD_ETH, DAI, ETH, FRAX, MATIC, TRX, USDC, USDT, USDT_MATIC, USDT_TRX, XDG, BTC_LNG, USDT_BSC ] |
result.transactionHash | string | Yes | the hash of income transaction. |
result.createdDate | string | Yes | time of the deposit. |
result.addressFrom | string | Yes | address of the transaction sender. |
size | number | Yes | a numeric value indicating the page size. |
total | number | Yes | the total number of pages matching the query. |
totalElements | number | Yes | the total number of objects matching the query. |
Archive Invoice
Request
curl --location --request POST 'https://public-gateway.calypso.finance/api/v1/pub/invoice/archive' \
--header 'Key: <your_api_key>' \
--header 'Sign: <your_sign>' \
--header 'Content-Type: application/json' \
--data-raw '{
"nonce": 0,
"request": {
"id": 0,
"idempotencyKey": "3fa85f64-5717-4562-b3fc-2c963f66afa6"
}
}'
Response
{
"amount": 0,
"amountInInvoiceWallet": 0,
"cartItems": [
{
"currency": "BNB",
"price": 0,
"product": "string",
"quantity": 0
}
],
"createdDate": "2022-07-27T14:24:14.955Z",
"currency": "BNB",
"description": "string",
"expiration": "2022-07-27T14:24:14.955Z",
"externalId": "string",
"fee": 0,
"fiat": {
"additionalProp1": 0,
"additionalProp2": 0,
"additionalProp3": 0
},
"fiatAmount": 0,
"fiatCurrency": "USD",
"fiatInInvoiceWallet": {
"additionalProp1": 0,
"additionalProp2": 0,
"additionalProp3": 0
},
"hotWallet": {
"address": "string",
"name": "string"
},
"id": 0,
"idempotencyKey": "3fa85f64-5717-4562-b3fc-2c963f66afa6",
"interventionType": "OVERPAY",
"invoiceAddress": "string",
"invoicePayments": [
{
"amount": 0,
"blockchainTransactionFee": 0,
"currency": "BNB",
"feeCurrency": "BNB",
"hotWallet": {
"address": "string",
"name": "string"
},
"notEnoughFundsForTokenFee": false,
"notEnoughFundsForTokenFeeAmount": 0,
"payAmount": 0,
"state": "CANCELED",
"toHotWalletHash": "string",
"tokenFeeRequestHash": "string",
"tokenTransactionFee": 0
}
],
"isInterventionResolved": false,
"lastDepositHash": "string",
"lastFiatUpdated": "2022-07-27T14:24:14.955Z",
"logoUrl": "string",
"payAmount": 0,
"returnUrl": "string",
"state": "ARCHIVED",
"subscriptionEnabled": false,
"supportUrl": "string",
"totalDebitAmount": 0,
"type": "SINGLE",
"upperCommission": false,
"useLiquidity": false
}
This endpoint archives invoice by id or idempotency key.
HTTP Request
POST https://public-gateway.calypso.finance/api/v1/pub/invoice/archive
Header
Parameter | Type | Mandatory | Description |
---|---|---|---|
Key | STRING | Yes | <your_api_key> |
Sign | STRING | Yes | <your_sign> |
Content-Type | STRING | Yes | must be set to application/json for requests to the Calypso API |
Request Body
parameter | type | mandatory | description |
---|---|---|---|
nonce | number | Yes | nonce used in construction of sign header. |
request | object | Yes | this object contains request details. |
request.id | string | No | the id of the invoice you want to look up. |
request.idempotencyKey | string | No | the external id that can be generated by user while creating the invoice |
Response Body
parameter | type | mandatory | description |
---|---|---|---|
amount | number | No | represents amount of the invoice. |
amountInInvoicewallet | number | Yes | initially set to 0 when creating the invoice. It will be updated with the total amount paid to the invoice. |
cartItems | array | Yes | list of line items. |
cartItems.currency | string | Yes | this is the currency associated with the price field. [ BNB, BTC, BUSD, BUSD_ETH, DAI, ETH, EUR, FRAX, KZT, MATIC, RUB, TRX, UAH, USD, USDC, USDT, USDT_MATIC, USDT_TRX, XDG, BTC_LNG, USDT_BSC ] |
cartItems.price | number | Yes | price of this unit. |
cartItems.product | string | Yes | name of this unit. |
cartItems.quantity | number | Yes | line item number of units. |
createdDate | string | Yes | time of invoice creation. |
currency | string | Yes | represents the currency of the invoice. [ BNB, BTC, BUSD, BUSD_ETH, DAI, ETH, FRAX, MATIC, TRX, USDC, USDT, USDT_MATIC, USDT_TRX, XDG, BTC_LNG, USDT_BSC ] |
description | string | Yes | short invoice description. |
expiration | string | No | represents server timestamp of invoice expiration moment. |
externalId | string | No | merchant ID that can be assigned to invoice or several invoices in string format. |
fee | number | No | this is referenced as "network cost" on an invoice. |
fiat | object | Yes | the total amount of the invoice in different fiat currencies. |
featAmount | number | No | amount of fiat money set for SINGLE_FIAT_INVOICE |
fiatCurrency | string | No | currency of featAmount [ EUR, USD ] |
fiatInInvoiceWallet | object | No | actual amount on the invoice wallet in different fiat currencies. |
hotWallet | object | No | object with information about wallet where funds from invoice will be transfered |
hotWallet.address | string | Yes | address of the hot wallet |
hotWallet.name | string | No | name of the hot wallet |
id | number | Yes | invoice id. |
idempotencyKey | string | Yes | the external id that can be generated by user while creating the invoice |
interventionType | string | No | represents the case of intervention: UNDERPAY - client paid less money than payAmount, OVERPAY - client paid more money than payAmount |
invoiceAddress | string | Yes | crypto address for deposit. |
invoicePayments | object | No | object with data about withdrawal from invoice wallet to hot wallet |
invoicePayments.amount | number | Yes | amount of withdrawal |
invoicePayments.blockchainTransactionFee | number | Yes | amount of transaction fee for the withdrawal |
invoicePayments.currency | string | Yes | currency of the withdrawal. [ BNB, BTC, BUSD, BUSD_ETH, DAI, ETH, FRAX, MATIC, TRX, USDC, USDT, USDT_MATIC, USDT_TRX, XDG, BTC_LNG, USDT_BSC ] |
invoicePayments.feeCurrency | string | Yes | currency of the transaction fee for the withdrawal. [ BNB, BTC, BUSD, BUSD_ETH, DAI, ETH, FRAX, MATIC, TRX, USDC, USDT, USDT_MATIC, USDT_TRX, XDG ] |
invoicePayments.hotWallet | object | Yes | address of the hot wallet where transfered money from invoice wallet |
invoicePayments.notEnoughFundsForTokenFee | boolean | Yes | represents whether enough funds for transaction fee in token withdrawal or not |
invoicePayments.notEnoughFundsForTokenFeeAmount | number | Yes | amount of required money for transaction fee in token withdrawal |
invoicePayments.payAmount | number | Yes | amount of withdrawal money in total (amount + blockchainTransactionFee ) |
invoicePayments.state | string | Yes | state of the withdrawal [ INIT, REQUEST_FOUNDS_FOR_FEE, REQUEST_FOUNDS_FOR_FEE_FAILED, MAKE_WITHDRAWAL, PENDING_WITHDRAWAL_COMPLETED, WITHDRAWAL_FAILED, WITHDRAWAL_COMPLETED, CANCELED ] |
invoicePayments.toHotWalletHash | string | Yes | hash of the transaction from invoice wallet to merchant wallet |
invoicePayments.tokenFeeRequestHash | string | No | hash of the transaction from merchant wallet to invoice wallet which transfers base currency for token transfer from invoice wallet to merchant wallet. Only for invoices in token currencies |
invoicePayments.tokenTransactionFee | number | Yes | transaction fee for transferring base currency from merchant wallet to invoice wallet to pay transaction fee for token withdrawal |
isInterventionResolved | boolean | Yes | represents whether the intervention was resolved or not (set by user) |
lastDepositHash | string | No | Hash of the last deposit transaction to the invoice |
lastFiatUpdated | string | No | time when the exchange rate was updated last time in SINGLE_FIAT invoices |
payAmount | number | No | amount of money to pay. |
state | string | Yes | represents status of the invoice. |
logoUrl | string | No | 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 |
returnUrl | string | No | link to the web page where client can come back to from payment link (page with invoice data for payment) |
supportUrl | string | No | link to the merchant support page where client can go to from payment link (page with invoice data for payment) |
totalDebitAmount | number | Yes | the total amount received on the invoice wallet. |
type | string | Yes | 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 |
upperCommission | boolean | No | defines whether network transaction fee for transfer from invoice wallet to your wallet will be substracted from transfer amount (false) or not (true). true is by default. |
useLiquidity | boolean | No | defines whether fee for transaction will be charged from liquidity wallet of Calypso (true) or from merchant wallet (false) |
Payout API
Status | Description |
---|---|
PENDING_CONFIRMATION | A payout is created via UI and is awaiting confirmation from other process participants. |
CONFIRMED | • A payout is created via UI and confirmed by other process participants. • A payout created via API is automatically created with this status. |
IN_PROGRESS | • Transaction for a payout is created and is awaiting to be sent to the network. •Transaction for a payout is sent to the network to be sent to a block and is awaiting confirmation from nodes. |
COMPLETED | Funds are successfully credited to destination wallet. |
FAILED | An error occurred when sending funds. There can be many reasonsof the error. You may follow these remediation steps: 1. Wait a while and create a new similar payout. 2. Contact our technical support. |
CANCELED | A payout has been canceled by merchant. |
Get Assets And Wallet Addresses
Request
curl --silent --location --request POST "https://public-gateway.calypso.finance/api/v1/pub/payout/asset/all" \
--header 'Key: <your_api_key>' \
--header 'Sign: <your_sign>' \
--header "Content-Type: application/json" \
--data-raw "{
"nonce": 0
}"
Response
{
"overallBalance": {
"availableTotalInFiat": {
"additionalProp1": 0,
"additionalProp2": 0,
"additionalProp3": 0
},
"totalInPercentage": {
"additionalProp1": 0,
"additionalProp2": 0,
"additionalProp3": 0
}
},
"assets": [
{
"currency": "BTC",
"isToken": true,
"serviceFee": 0,
"totalAvailable": 0,
"totalAvailableInFiat": {
"additionalProp1": 0,
"additionalProp2": 0,
"additionalProp3": 0
},
"wallets": [
{
"name": "string",
"address": "string",
"currency": "BTC",
"mainCurrencyAsset": {
"name": "string",
"address": "string",
"currency": "BTC",
"availableAmount": 0,
"availableAmountInFiat": {
"additionalProp1": 0,
"additionalProp2": 0,
"additionalProp3": 0
}
},
"availableAmount": 0,
"availableAmountInFiat": {
"additionalProp1": 0,
"additionalProp2": 0,
"additionalProp3": 0
}
}
]
}
]
}
This endpoint retrieves all assets and wallet addresses.
HTTP Request
POST https://public-gateway.calypso.finance/api/v1/pub/payout/asset/all
Header
Parameter | Type | Mandatory | Description |
---|---|---|---|
Key | STRING | Yes | <your_api_key> |
Sign | STRING | Yes | <your_sign> |
Content-Type | STRING | Yes | must be set to application/json for requests to the Calypso API |
Request Body
Parameter | Type | Mandatory | Description |
---|---|---|---|
nonce | NUMBER | Yes | Nonce used in construction of Sign header. |
Response Body
parameter | type | mandatory | description |
---|---|---|---|
overallBalance | object | Yes | object with information about the total balance |
overallBalance.availableTotalInFiat | object | Yes | the total available balance in different fiat currencies. |
overallBalance.availableTotalInFiat.{currency} | number | Yes | the total balance in particular fiat currencies. USD, EUR, RUB, UAH, KZT ] |
overallBalance.totalInPercentage | object | Yes | the total balance in percentage of crypto currencies. |
overallBalance.totalInPercentage.{currency} | number | Yes | the total balance in percentage of particular crypto currency. [ BNB, BTC, BUSD, BUSD_ETH, DAI, ETH, FRAX, MATIC, TRX, USDC, USDT, USDT_MATIC, USDT_TRX, XDG ] |
assets | array | Yes | this object contains detailed information about assets. |
assets.currency | string | Yes | this is the currency associated with the amount field. [ BNB, BTC, BUSD, BUSD_ETH, DAI, ETH, FRAX, MATIC, TRX, USDC, USDT, USDT_MATIC, USDT_TRX, XDG, BTC_LNG, USDT_BSC ] |
assets.isToken | boolean | Yes | represents whether the wallet is used for token currency or not. |
assets.serviceFee | number | Yes | funds blocked for this crypto currency by service fee. |
assets.totalAvailable | number | Yes | total available amount of funds in all wallets in crypto currency. This balance takes into account funds blocked by sevice fee. |
assets.totalAvailableInFiat | object | Yes | total available amount of funds in all wallets in fiat currency. This balance takes into account funds blocked by sevice fee. |
assets.totalAvailableInFiat.{currency} | number | Yes | total available amount of funds in all wallets in particular fiat currency. [ USD, EUR, RUB, UAH, KZT ] |
assets.wallets | array | Yes | array of wallet objects |
assets.wallets.address | string | Yes | crypto address of wallet. |
assets.wallets.availableAmount | number | Yes | current wallet available balance. |
assets.wallets.availableAmountInFiat | object | Yes | amount of the account in different fiat currencies. |
assets.wallets.availableAmountInFiat.{currency} | number | Yes | this is the fiat currency associated with the amount field. [ USD, EUR, RUB, UAH, KZT ] |
assets.wallets.currency | string | No | this is the currency associated with the amount field of wallet. [ BNB, BTC, BUSD, BUSD_ETH, DAI, ETH, FRAX, MATIC, TRX, USDC, USDT, USDT_MATIC, USDT_TRX, XDG, BTC_LNG, USDT_BSC ] |
assets.wallets.name | string | Yes | the wallet name. |
New Payout
Request
curl --location --request POST 'https://public-gateway.calypso.finance/api/v1/pub/payout/create' \
--header 'key: <your_api_key>' \
--header 'sign: <your_sign>' \
--header 'Content-Type: application/json' \
--data-raw '{
"nonce": 0,
"request": {
"withdrawalAddress": "string",
"clientAddress": "string",
"amount": 0,
"currency": "ETH",
"executionDate": "2022-02-21T13:46:15.823Z",
"idempotencyKey": "3fa85f64-5717-4562-b3fc-2c963f66afa6",
"networkFeeRatio": 0,
"comment": "string"
}
}'
Response
{
"id": 0,
"clientAddress": "string",
"amount": 0,
"currency": "BTC",
"networkFeeCurrency": "BTC",
"networkFee": 0,
"networkFeePercentage": 0,
"networkFeeRatio": 0,
"state": "CREATION_IN_PROGRESS",
"createdDate": "2022-11-30T09:35:53.101Z",
"hash": "string",
"comment": "string",
"executionDate": "2022-11-30T09:35:53.101Z",
"idempotencyKey": "3fa85f64-5717-4562-b3fc-2c963f66afa6",
"errors": {
"withdrawalErrors": [
{
"withdrawalId": 0,
"errors": [
{
"id": 0,
"status": "SUCCESS",
"errorResolved": true,
"errorMessage": "string"
}
]
}
]
},
"cancellation": {
"canceledByUserId": "string",
"canceledByFirstname": "string",
"canceledByLastname": "string",
"cancelMessage": "string",
"cancelRole": "USER"
}
}
This endpoint creates a new payout (except lightning network).
HTTP Request
POST https://public-gateway.calypso.finance/api/v1/pub/payout/create
Header
Parameter | Type | Mandatory | Description |
---|---|---|---|
Key | STRING | Yes | <your_api_key> |
Sign | STRING | Yes | <your_sign> |
Content-Type | STRING | Yes | must be set to application/json for requests to the Calypso API |
Request Body
parameter | type | mandatory | description |
---|---|---|---|
nonce | number | Yes | nonce used in construction of sign header. |
request | object | Yes | this object contains request details. |
request.withdrawalAddress | string | Yes | sender's cryptoaddress. |
request.clientAddress | string | Yes | recipient's crypto-address. |
request.amount | number | Yes | withdrawal amount. |
request.currency | string | Yes | this is the currency associated with the amount field. [ BNB, BTC, BUSD, BUSD_ETH, DAI, ETH, FRAX, MATIC, TRX, USDC, USDT, USDT_MATIC, USDT_TRX, XDG, USDT_BSC ] |
request.networkFeeRatio | number | Yes | selected network fee coefficient (see get expected transaction fee). |
request.comment | string | No | comment for the payout. |
request.executionDate | string | No | execution date of payout. Can be used for payouts to date |
request.idempotencyKey | string | No | the external id that can be generated by user while creating the payout |
Response Body
parameter | type | mandatory | description |
---|---|---|---|
amount | number | Yes | withdrawal amount. |
clientAddress | string | Yes | crypto address for deposit. |
comment | string | No | comment for the payout. |
createdDate | string | Yes | time of payout creation. |
currency | string | Yes | this is the currency associated with the amount field. [ BNB, BTC, BUSD, BUSD_ETH, DAI, ETH, FRAX, MATIC, TRX, USDC, USDT, USDT_MATIC, USDT_TRX, XDG, USDT_BSC ] |
errors | object | No | payout errors |
errors.withdrawalErrors | array | Yes | list of validation errors |
errors.withdrawalErrors.errors | array | Yes | list of validation errors of a particular withdrawal |
errors.withdrawalErrors.errors.errorMessage | string | No | text of the error message |
errors.withdrawalErrors.errors.errorResolved | boolean | Yes | represents whether errors were resolved or not |
errors.withdrawalErrors.errors.id | number | Yes | id of the error |
errors.withdrawalErrors.errors.status | string | Yes | validation status of the withdrawal [NOT_ENOUGH_FUNDS, NOT_ENOUGH_FUNDS_FOR_COMMISSION, NO_BALANCE, NO_PERMISSION, SUCCESS] |
errors.withdrawalErrors.withdrawalId | number | Yes | id of the withdrawal where error occured |
executionDate | string | No | execution date of payout. Time when payout will be executed |
hash | string | No | transaction hash. |
id | number | Yes | payout id |
networkFee | number | Yes | is a cryptocurrency transaction fee that is charged to users when performing crypto transactions. |
networkFeeCurrency | string | Yes | this is the currency associated with the networkfee field. [ BNB, BTC, ETH, MATIC, TRX, XDG ] |
networkFeePercentage | number | Yes | describes percentage that should be applied to the executed payout amount to calculate the commission amount. |
networkFeeRatio | number | Yes | selected network fee coefficient (see get expected transaction fee). |
state | string | Yes | represents status of the payout. [ PENDING_CONFIRMATION, CONFIRMED, IN_PROGRESS, COMPLETED, FAILED, CANCELED ] |
idempotencyKey | string | No | the external id that can be generated by user while creating the payout |
New Payout In Lightning Network
Request
curl --location --request POST 'https://public-gateway.calypso.finance/api/v1/pub/payout/create/lightning' \
--header 'key: <your_api_key>' \
--header 'sign: <your_sign>' \
--header 'Content-Type: application/json' \
--data-raw '{
"nonce": 0,
"request": {
"paymentRequest": "string",
"withdrawalAddress": "3fa85f64-5717-4562-b3fc-2c963f66afa6",
"amount": 0,
"comment": "string",
"executionDate": "2022-11-30T09:34:29.157Z",
"idempotencyKey": "3fa85f64-5717-4562-b3fc-2c963f66afa6"
}
}'
Response
{
"id": 0,
"clientAddress": "string",
"amount": 0,
"currency": "BTC",
"networkFeeCurrency": "BTC",
"networkFee": 0,
"networkFeePercentage": 0,
"networkFeeRatio": 0,
"state": "CREATION_IN_PROGRESS",
"createdDate": "2022-11-30T09:35:53.101Z",
"hash": "string",
"comment": "string",
"executionDate": "2022-11-30T09:35:53.101Z",
"idempotencyKey": "3fa85f64-5717-4562-b3fc-2c963f66afa6",
"errors": {
"withdrawalErrors": [
{
"withdrawalId": 0,
"errors": [
{
"id": 0,
"status": "SUCCESS",
"errorResolved": true,
"errorMessage": "string"
}
]
}
]
},
"cancellation": {
"canceledByUserId": "string",
"canceledByFirstname": "string",
"canceledByLastname": "string",
"cancelMessage": "string",
"cancelRole": "USER"
}
}
This endpoint creates a new payout in lightning network.
HTTP Request
POST https://public-gateway.calypso.finance/api/v1/pub/payout/create/lightning
Header
Parameter | Type | Mandatory | Description |
---|---|---|---|
Key | STRING | Yes | <your_api_key> |
Sign | STRING | Yes | <your_sign> |
Content-Type | STRING | Yes | must be set to application/json for requests to the Calypso API |
Request Body
parameter | type | mandatory | description |
---|---|---|---|
nonce | number | Yes | nonce used in construction of sign header. |
request | object | Yes | this object contains request details. |
request.withdrawalAddress | string | Yes | sender's cryptoaddress. |
request.paymentRequest | string | Yes | address of the lightning invoice (e.g. lnbcrt1p3ct08fpp52g4...) |
request.amount | number | Yes | withdrawal amount. |
request.comment | string | No | comment for the payout. |
request.executionDate | string | No | execution date of payout. Can be used for payouts to date |
request.idempotencyKey | string | No | the external id that can be generated by user while creating the payout |
Response Body
parameter | type | mandatory | description |
---|---|---|---|
amount | number | Yes | withdrawal amount. |
clientAddress | string | Yes | crypto address for deposit. |
comment | string | No | comment for the payout. |
createdDate | string | Yes | time of payout creation. |
currency | string | Yes | this is the currency associated with the amount field. [ BTC_LNG ] |
errors | object | No | payout errors |
errors.withdrawalErrors | array | Yes | list of validation errors |
errors.withdrawalErrors.errors | array | Yes | list of validation errors of a particular withdrawal |
errors.withdrawalErrors.errors.errorMessage | string | No | text of the error message |
errors.withdrawalErrors.errors.errorResolved | boolean | Yes | represents whether errors were resolved or not |
errors.withdrawalErrors.errors.id | number | Yes | id of the error |
errors.withdrawalErrors.errors.status | string | Yes | validation status of the withdrawal [NOT_ENOUGH_FUNDS, NOT_ENOUGH_FUNDS_FOR_COMMISSION, NO_BALANCE, NO_PERMISSION, SUCCESS] |
errors.withdrawalErrors.withdrawalId | number | Yes | id of the withdrawal where error occured |
executionDate | string | No | execution date of payout. Time when payout will be executed |
hash | string | No | transaction hash. |
id | number | Yes | payout id |
networkFee | number | Yes | is a cryptocurrency transaction fee that is charged to users when performing crypto transactions. |
networkFeeCurrency | string | Yes | this is the currency associated with the networkfee field. [ BNB, BTC, ETH, MATIC, TRX, XDG ] |
networkFeePercentage | number | Yes | describes percentage that should be applied to the executed payout amount to calculate the commission amount. |
networkFeeRatio | number | Yes | selected network fee coefficient (see get expected transaction fee). |
state | string | Yes | represents status of the payout. [ PENDING_CONFIRMATION, CONFIRMED, IN_PROGRESS, COMPLETED, FAILED, CANCELED ] |
idempotencyKey | string | No | the external id that can be generated by user while creating the payout |
Get Specific Payout
Request
curl --silent --location --request POST "https://public-gateway.calypso.finance/api/v1/pub/payout" \
--header 'Key: <your_api_key>' \
--header 'Sign: <your_sign>' \
--header "Content-Type: application/json" \
--data-raw "{
"nonce": 0,
"request": {
"id": 0,
"idempotencyKey": "3fa85f64-5717-4562-b3fc-2c963f66afa6"
}
}"
Response
{
"id": 0,
"clientAddress": "string",
"amount": 0,
"currency": "BTC",
"networkFeeCurrency": "BTC",
"networkFee": 0,
"networkFeePercentage": 0,
"networkFeeRatio": 0,
"state": "CREATION_IN_PROGRESS",
"createdDate": "2022-11-30T09:35:53.101Z",
"hash": "string",
"comment": "string",
"executionDate": "2022-11-30T09:35:53.101Z",
"idempotencyKey": "3fa85f64-5717-4562-b3fc-2c963f66afa6",
"errors": {
"withdrawalErrors": [
{
"withdrawalId": 0,
"errors": [
{
"id": 0,
"status": "SUCCESS",
"errorResolved": true,
"errorMessage": "string"
}
]
}
]
},
"cancellation": {
"canceledByUserId": "string",
"canceledByFirstname": "string",
"canceledByLastname": "string",
"cancelMessage": "string",
"cancelRole": "USER"
}
}
This endpoint retrieves a specific payout.
HTTP Request
POST https://public-gateway.calypso.finance/api/v1/pub/payout
Header
Parameter | Type | Mandatory | Description |
---|---|---|---|
Key | STRING | Yes | <your_api_key> |
Sign | STRING | Yes | <your_sign> |
Content-Type | STRING | Yes | must be set to application/json for requests to the Calypso API |
Request Body
Parameter | Type | Mandatory | Description |
---|---|---|---|
nonce | NUMBER | Yes | Nonce used in construction of Sign header. |
request | OBJECT | Yes | This object contains request details. |
request.id | NUMBER | Yes | The id of the payout you want to look up. |
request.idempotencyKey | string | No | the external id that can be generated by user while creating the payout |
Response Body
parameter | type | mandatory | description |
---|---|---|---|
amount | number | Yes | withdrawal amount. |
clientAddress | string | Yes | crypto address for deposit. |
comment | string | No | comment for the payout. |
createdDate | string | Yes | time of payout creation. |
currency | string | Yes | this is the currency associated with the amount field. [ BNB, BTC, BUSD, BUSD_ETH, DAI, ETH, FRAX, MATIC, TRX, USDC, USDT, USDT_MATIC, USDT_TRX, XDG, BTC_LNG, USDT_BSC ] |
errors | object | No | payout errors |
errors.withdrawalErrors | array | Yes | list of validation errors |
errors.withdrawalErrors.errors | array | Yes | list of validation errors of a particular withdrawal |
errors.withdrawalErrors.errors.errorMessage | string | No | text of the error message |
errors.withdrawalErrors.errors.errorResolved | boolean | Yes | represents whether errors were resolved or not |
errors.withdrawalErrors.errors.id | number | Yes | id of the error |
errors.withdrawalErrors.errors.status | string | Yes | validation status of the withdrawal [NOT_ENOUGH_FUNDS, NOT_ENOUGH_FUNDS_FOR_COMMISSION, NO_BALANCE, NO_PERMISSION, SUCCESS] |
errors.withdrawalErrors.withdrawalId | number | Yes | id of the withdrawal where error occured |
executionDate | string | No | execution date of payout. Time when payout will be executed |
hash | string | No | transaction hash. |
id | number | Yes | payout id |
networkFee | number | Yes | is a cryptocurrency transaction fee that is charged to users when performing crypto transactions. |
networkFeeCurrency | string | Yes | this is the currency associated with the networkfee field. [ BNB, BTC, ETH, MATIC, TRX, XDG ] |
networkFeePercentage | number | Yes | describes percentage that should be applied to the executed payout amount to calculate the commission amount. |
networkFeeRatio | number | Yes | selected network fee coefficient (see get expected transaction fee). |
state | string | Yes | represents status of the payout. [ PENDING_CONFIRMATION, CONFIRMED, IN_PROGRESS, COMPLETED, FAILED, CANCELED ] |
executionDate | string | No | execution date of payout. Time when payout will be executed |
idempotencyKey | string | No | the external id that can be generated by user while creating the payout |
Get All Payouts
Request
curl --silent --location --request POST "https://public-gateway.calypso.finance/api/v1/pub/payout/all" \
--header 'Key: <your_api_key>' \
--header 'Sign: <your_sign>' \
--header "Content-Type: application/json" \
--data-raw "{
"nonce": 0,
"request": {
"stateNames": [
"PENDING_CONFIRMATION"
],
"size": 0,
"pageNumber": 0,
"isExecutionDateInFuture": true
}
}"
Response
{
"result": [
{
"id": 0,
"clientAddress": "string",
"amount": 0,
"currency": "BTC",
"networkFeeCurrency": "BTC",
"networkFee": 0,
"networkFeePercentage": 0,
"networkFeeRatio": 0,
"state": "CREATION_IN_PROGRESS",
"createdDate": "2022-11-30T09:42:48.531Z",
"hash": "string",
"comment": "string",
"executionDate": "2022-11-30T09:42:48.531Z",
"idempotencyKey": "3fa85f64-5717-4562-b3fc-2c963f66afa6",
"errors": {
"withdrawalErrors": [
{
"withdrawalId": 0,
"errors": [
{
"id": 0,
"status": "SUCCESS",
"errorResolved": true,
"errorMessage": "string"
}
]
}
]
},
"cancellation": {
"canceledByUserId": "string",
"canceledByFirstname": "string",
"canceledByLastname": "string",
"cancelMessage": "string",
"cancelRole": "USER"
}
}
],
"page": 0,
"size": 0,
"total": 0,
"totalElements": 0
}
This endpoint retrieves all payouts.
HTTP Request
POST https://public-gateway.calypso.finance/api/v1/pub/payout/all
Header
Parameter | Type | Mandatory | Description |
---|---|---|---|
Key | STRING | Yes | <your_api_key> |
Sign | STRING | Yes | <your_sign> |
Content-Type | STRING | Yes | must be set to application/json for requests to the Calypso API |
Request Body
parameter | type | mandatory | description |
---|---|---|---|
nonce | number | Yes | nonce used in construction of sign header. |
request | object | Yes | this object contains request details. |
request.stateNames | string | Yes | represents status of the payout. [ PENDING_CONFIRMATION, CONFIRMED, IN_PROGRESS, COMPLETED, FAILED, CANCELED ] |
request.pageNumber | number | Yes | specify the page of results to return. |
request.size | number | Yes | a numeric value indicating the page size. |
request.isExecutionDateInFuture | boolean | No | if true includes all payouts where execution date in future. if false includes all payouts where execution date in past. if null includes all payouts |
Response Body
parameter | type | mandatory | description |
---|---|---|---|
result | array | Yes | this object contains response details. |
result.amount | number | Yes | withdrawal amount. |
result.clientAddress | string | Yes | crypto address for deposit. |
result.comment | string | No | comment for the payout. |
result.createdDate | string | Yes | time of payout creation. |
result.currency | string | Yes | this is the currency associated with the amount field. [ BNB, BTC, BUSD, BUSD_ETH, DAI, ETH, FRAX, MATIC, TRX, USDC, USDT, USDT_MATIC, USDT_TRX, XDG, BTC_LNG, USDT_BSC ] |
result.errors | object | No | payout errors |
result.errors.withdrawalErrors | array | Yes | list of validation errors |
result.errors.withdrawalErrors.errors | array | Yes | list of validation errors of a particular withdrawal |
result.errors.withdrawalErrors.errors.errorMessage | string | No | text of the error message |
result.errors.withdrawalErrors.errors.errorResolved | boolean | Yes | represents whether errors were resolved or not |
result.errors.withdrawalErrors.errors.id | number | Yes | id of the error |
result.errors.withdrawalErrors.errors.status | string | Yes | validation status of the withdrawal [NOT_ENOUGH_FUNDS, NOT_ENOUGH_FUNDS_FOR_COMMISSION, NO_BALANCE, NO_PERMISSION, SUCCESS] |
result.errors.withdrawalErrors.withdrawalId | number | Yes | id of the withdrawal where error occured |
result.executionDate | string | No | execution date of payout. Time when payout will be executed |
result.hash | string | No | transaction hash. |
result.id | number | Yes | payout id |
result.networkFee | number | Yes | is a cryptocurrency transaction fee that is charged to users when performing crypto transactions. |
result.networkFeeCurrency | string | Yes | this is the currency associated with the networkfee field. [ BNB, BTC, ETH, MATIC, TRX, XDG ] |
result.networkFeePercentage | number | Yes | describes percentage that should be applied to the executed payout amount to calculate the commission amount. |
result.networkFeeRatio | number | Yes | selected network fee coefficient (see get expected transaction fee). |
result.state | string | Yes | represents status of the payout. [ PENDING_CONFIRMATION, CONFIRMED, IN_PROGRESS, COMPLETED, FAILED, CANCELED ] |
result.idempotencyKey | string | No | the external id that can be generated by user while creating the payout |
page | number | Yes | result page number. |
size | number | Yes | a numeric value indicating the page size. |
total | number | Yes | the total number of pages matching the query. |
totalElements | number | Yes | the total number of objects matching the query. |
New Mass Payout
Request
curl --location --request POST 'https://public-gateway.calypso.finance/api/v1/pub/payout/mass/create' \
--header 'key: <your_api_key>' \
--header 'sign: <your_sign>' \
--header 'Content-Type: application/json' \
--data-raw '{
"nonce": 0,
"request": {
"withdrawalAddress": "string",
"currency": "BTC",
"networkFeeRatio": 0,
"name": "string",
"comment": "string",
"massAddresses": [
{
"depositAddress": "string",
"amount": 0,
"externalId": "string",
"comment": "string"
}
],
"executionDate": "2022-11-30T09:00:52.165Z",
"idempotencyKey": "3fa85f64-5717-4562-b3fc-2c963f66afa6"
}
}'
Response
{
"comment": "string",
"companyId": "string",
"createdBy": "string",
"createdDate": "2021-12-03T07:41:59.795Z",
"currency": "BTC",
"errors": {
"withdrawalErrors": [
{
"errors": [
{
"errorMessage": "string",
"errorResolved": false,
"id": 0,
"status": "NOT_ENOUGH_FUNDS"
}
],
"withdrawalId": 0
}
]
},
"executionDate": "2022-02-21T13:50:25.814Z",
"id": 0,
"idempotencyKey": "3fa85f64-5717-4562-b3fc-2c963f66afa6",
"name": "string",
"networkFeeCurrency": "BTC",
"networkFeeRatio": 0,
"state": "PENDING_CONFIRMATION",
"totalNetworkFee": 0,
"totalNetworkFeePercentage": 0,
"totalWithdrawalAmount": 0
}
This endpoint creates a new mass payout.
HTTP Request
POST https://public-gateway.calypso.finance/api/v1/pub/payout/mass/create
Header
Parameter | Type | Mandatory | Description |
---|---|---|---|
Key | STRING | Yes | <your_api_key> |
Sign | STRING | Yes | <your_sign> |
Content-Type | STRING | Yes | must be set to application/json for requests to the Calypso API |
Request Body
parameter | type | mandatory | description |
---|---|---|---|
nonce | number | Yes | nonce used in construction of sign header. |
request | object | Yes | this object contains request details. |
request.withdrawalAddress | string | Yes | sender's crypto-address. |
request.currency | string | Yes | this is the currency associated with the amount field. [ BNB, BTC, BUSD, BUSD_ETH, DAI, ETH, FRAX, MATIC, TRX, USDC, USDT, USDT_MATIC, USDT_TRX, XDG, USDT_BSC ] |
request.networkFeeRatio | number | Yes | selected network fee coefficient (see get expected transaction fee). |
request.name | string | Yes | mass payout name. |
request.comment | string | No | comment for the mass payout. |
request.executionDate | string | No | execution date of payout. Can be used for payouts to date |
request.idempotencyKey | string | No | the external id that can be generated by user while creating the payout |
request.massAddresses | array | Yes | this object contains mass payout transactions. |
request.massAddresses.depositAddress | string | Yes | recipient's crypto-address. |
request.massAddresses.amount | number | Yes | transaction amount. |
request.massAddresses.comment | string | Yes | comment for the withdrawal transaction. |
request.massAddresses.externalId | string | No | the external id that can be generated by user for particular transaction while creating the payout . |
Response Body
parameter | type | mandatory | description |
---|---|---|---|
comment | string | Yes | comment for the mass payout. |
companyId | string | Yes | company id. |
createdBy | string | Yes | user who created this payout. |
createdDate | string | Yes | time of payout creation. |
currency | string | Yes | transaction currency. [ BNB, BTC, BUSD, BUSD_ETH, DAI, ETH, FRAX, MATIC, TRX, USDC, USDT, USDT_MATIC, USDT_TRX, XDG, USDT_BSC ] |
errors | object | No | payout errors |
errors.withdrawalErrors | array | Yes | list of validation errors |
errors.withdrawalErrors.errors | array | Yes | list of validation errors of a particular withdrawal |
errors.withdrawalErrors.errors.errorMessage | string | No | text of the error message |
errors.withdrawalErrors.errors.errorResolved | boolean | Yes | represents whether errors were resolved or not |
errors.withdrawalErrors.errors.id | number | Yes | id of the error |
errors.withdrawalErrors.errors.status | string | Yes | validation status of the withdrawal [NOT_ENOUGH_FUNDS, NOT_ENOUGH_FUNDS_FOR_COMMISSION, NO_BALANCE, NO_PERMISSION, SUCCESS] |
errors.withdrawalErrors.withdrawalId | number | Yes | id of the withdrawal where error occured |
executionDate | string | No | execution date of payout. Time when payout will be executed |
id | number | Yes | mass payout id. |
idempotencyKey | string | No | the external id that can be generated by user while creating the payout |
name | string | Yes | mass payout name. |
networkFeeCurrency | enum | Yes | this is the currency associated with the networkfee field. [ BNB, BTC, ETH, MATIC, TRX, XDG ] |
networkfeeratio | number | Yes | selected network fee coefficient (see get expected transaction fee). |
state | enum | Yes | represents status of the mass payout. |
totalNetworkFee | number | Yes | amount of network fees for all transactions. |
totalNetworkFeePercentage | number | Yes | describes percentage that should be applied to the executed total transactions amount to calculate the commission amount. |
totalWithdrawalAmount | number | Yes | total amount of all transactions in a mass payout. |
Get All Mass Payouts
Request
curl --location --request POST 'https://public-gateway.calypso.finance/api/v1/pub/payout/mass/all' \
--header 'key: <your_api_key>' \
--header 'sign: <your_sign>' \
--header 'Content-Type: application/json' \
--data-raw '{
"nonce": 0,
"request": {
"isExecutionDateInFuture": true,
"pageNumber": 0,
"size": 0,
"stateNames": [
"CANCELED"
]
}
}'
Response
{
"page": 0,
"result": [
{
"comment": "string",
"companyId": "string",
"createdBy": "string",
"createdDate": "2022-04-04T18:18:10.735Z",
"currency": "BNB",
"errors": {
"withdrawalErrors": [
{
"errors": [
{
"errorMessage": "string",
"errorResolved": false,
"id": 0,
"status": "NOT_ENOUGH_FUNDS"
}
],
"withdrawalId": 0
}
]
},
"executionDate": "2022-04-04T18:18:10.736Z",
"id": 0,
"idempotencyKey": "3fa85f64-5717-4562-b3fc-2c963f66afa6",
"name": "string",
"networkFeeCurrency": "BNB",
"networkFeeRatio": 0,
"state": "CANCELED",
"totalNetworkFee": 0,
"totalNetworkFeePercentage": 0,
"totalWithdrawalAmount": 0
}
],
"size": 0,
"total": 0,
"totalElements": 0
}
This endpoint retrieves all mass payouts.
HTTP Request
POST https://public-gateway.calypso.finance/api/v1/pub/payout/mass/all
Header
Parameter | Type | Mandatory | Description |
---|---|---|---|
Key | STRING | Yes | <your_api_key> |
Sign | STRING | Yes | <your_sign> |
Content-Type | STRING | Yes | must be set to application/json for requests to the Calypso API |
Request Body
parameter | type | mandatory | description |
---|---|---|---|
nonce | number | Yes | nonce used in construction of sign header. |
request | object | Yes | this object contains request details. |
request.stateNames | array | Yes | status of the payouts you want to look up. [ PENDING_CONFIRMATION, CONFIRMED, IN_PROGRESS, COMPLETED, FAILED, CANCELED ] |
request.pageNumber | number | Yes | specify the page of results to return. |
request.size | number | Yes | a numeric value indicating the page size. |
request.isExecutionDateInFuture | boolean | No | if true includes all payouts where execution date in future. if false includes all payouts where execution date in past. if null includes all payouts |
Response Body
parameter | type | mandatory | description |
---|---|---|---|
result | array | Yes | this object contains response details. |
result.comment | string | Yes | comment for the mass payout. |
result.companyId | string | Yes | company id. |
result.createdBy | string | Yes | user who created this payout. |
result.createdDate | string | Yes | time of payout creation. |
result.currency | string | Yes | transaction currency. [ BNB, BTC, BUSD, BUSD_ETH, DAI, ETH, FRAX, MATIC, TRX, USDC, USDT, USDT_MATIC, USDT_TRX, XDG, USDT_BSC ] |
result.errors | object | No | payout errors |
result.errors.withdrawalErrors | array | Yes | list of validation errors |
result.errors.withdrawalErrors.errors | array | Yes | list of validation errors of a particular withdrawal |
result.errors.withdrawalErrors.errors.errorMessage | string | No | text of the error message |
result.errors.withdrawalErrors.errors.errorResolved | boolean | Yes | represents whether errors were resolved or not |
result.errors.withdrawalErrors.errors.id | number | Yes | id of the error |
result.errors.withdrawalErrors.errors.status | string | Yes | validation status of the withdrawal [NOT_ENOUGH_FUNDS, NOT_ENOUGH_FUNDS_FOR_COMMISSION, NO_BALANCE, NO_PERMISSION, SUCCESS] |
result.errors.withdrawalErrors.withdrawalId | number | Yes | id of the withdrawal where error occured |
result.executionDate | string | No | execution date of payout. Time when payout will be executed |
result.id | number | Yes | mass payout id. |
result.idempotencyKey | string | No | the external id that can be generated by user while creating the payout |
result.name | string | Yes | mass payout name. |
result.networkFeeCurrency | enum | Yes | this is the currency associated with the networkfee field. [ BNB, BTC, ETH, MATIC, TRX, XDG ] |
result.networkfeeratio | number | Yes | selected network fee coefficient (see get expected transaction fee). |
result.state | enum | Yes | represents status of the mass payout. |
result.totalNetworkFee | number | Yes | amount of network fees for all transactions. |
result.totalNetworkFeePercentage | number | Yes | describes percentage that should be applied to the executed total transactions amount to calculate the commission amount. |
result.totalWithdrawalAmount | number | Yes | total amount of all transactions in a mass payout. |
page | number | Yes | result page number. |
size | number | Yes | a numeric value indicating the page size. |
total | number | Yes | the total number of pages matching the query. |
totalElements | number | Yes | the total number of objects matching the query. |
Get Specific Mass Payout
Request
curl --location --request POST 'https://public-gateway.calypso.finance/api/v1/pub/payout/mass' \
--header 'key: <your_api_key>' \
--header 'sign: <your_sign>' \
--header 'Content-Type: application/json' \
--data-raw '{
"nonce": 0,
"request": {
"dealId": 0,
"idempotencyKey": "3fa85f64-5717-4562-b3fc-2c963f66afa6"
}
}'
Response
{
"comment": "string",
"companyId": "string",
"createdBy": "string",
"createdDate": "2022-04-04T18:20:19.120Z",
"currency": "BNB",
"errors": {
"withdrawalErrors": [
{
"errors": [
{
"errorMessage": "string",
"errorResolved": false,
"id": 0,
"status": "NOT_ENOUGH_FUNDS"
}
],
"withdrawalId": 0
}
]
},
"executionDate": "2022-04-04T18:20:19.120Z",
"id": 0,
"idempotencyKey": "3fa85f64-5717-4562-b3fc-2c963f66afa6",
"name": "string",
"networkFeeCurrency": "BNB",
"networkFeeRatio": 0,
"state": "CANCELED",
"totalNetworkFee": 0,
"totalNetworkFeePercentage": 0,
"totalWithdrawalAmount": 0
}
This endpoint retrieves a specific mass payout.
HTTP Request
POST https://public-gateway.calypso.finance/api/v1/pub/payout/mass
Header
Parameter | Type | Mandatory | Description |
---|---|---|---|
Key | STRING | Yes | <your_api_key> |
Sign | STRING | Yes | <your_sign> |
Content-Type | STRING | Yes | must be set to application/json for requests to the Calypso API |
Request Body
parameter | type | mandatory | description |
---|---|---|---|
nonce | number | Yes | nonce used in construction of sign header. |
request | object | Yes | this object contains request details. |
request.dealId | string | Yes | the id of the mass payout you want to look up. |
request.idempotencyKey | string | No | the external id that can be generated by user while creating the payout. |
Response Body
parameter | type | mandatory | description |
---|---|---|---|
comment | string | Yes | comment for the mass payout. |
companyId | string | Yes | company id. |
createdBy | string | Yes | user who created this payout. |
createdDate | string | Yes | time of payout creation. |
currency | string | Yes | transaction currency. [ BNB, BTC, BUSD, BUSD_ETH, DAI, ETH, FRAX, MATIC, TRX, USDC, USDT, USDT_MATIC, USDT_TRX, XDG, USDT_BSC ] |
errors | object | No | payout errors |
errors.withdrawalErrors | array | Yes | list of validation errors |
errors.withdrawalErrors.errors | array | Yes | list of validation errors of a particular withdrawal |
errors.withdrawalErrors.errors.errorMessage | string | No | text of the error message |
errors.withdrawalErrors.errors.errorResolved | boolean | Yes | represents whether errors were resolved or not |
errors.withdrawalErrors.errors.id | number | Yes | id of the error |
errors.withdrawalErrors.errors.status | string | Yes | validation status of the withdrawal [NOT_ENOUGH_FUNDS, NOT_ENOUGH_FUNDS_FOR_COMMISSION, NO_BALANCE, NO_PERMISSION, SUCCESS] |
errors.withdrawalErrors.withdrawalId | number | Yes | id of the withdrawal where error occured |
executionDate | string | No | execution date of payout. Time when payout will be executed |
id | number | Yes | mass payout id. |
idempotencyKey | string | No | the external id that can be generated by user while creating the payout |
name | string | Yes | mass payout name. |
networkFeeCurrency | enum | Yes | this is the currency associated with the networkfee field. [ BNB, BTC, ETH, MATIC, TRX, XDG ] |
networkfeeratio | number | Yes | selected network fee coefficient (see get expected transaction fee). |
state | enum | Yes | represents status of the mass payout. |
totalNetworkFee | number | Yes | amount of network fees for all transactions. |
totalNetworkFeePercentage | number | Yes | describes percentage that should be applied to the executed total transactions amount to calculate the commission amount. |
totalWithdrawalAmount | number | Yes | total amount of all transactions in a mass payout. |
Get Transactions From a Specific Mass Payout
Request
curl --silent --location --request POST "https://public-gateway.calypso.finance/api/v1/pub/payout/withdrawal/all" \
--header 'Key: <your_api_key>' \
--header 'Sign: <your_sign>' \
--header "Content-Type: application/json" \
--data-raw "{
"nonce": 0,
"request": {
"dealId": 0,
"externalId": "string",
"idempotencyKey": "3fa85f64-5717-4562-b3fc-2c963f66afa6",
"pageNumber": 0,
"size": 0,
"stateNames": [
"CANCELED"
]
}
}"
Response
{
"page": 0,
"result": [
{
"amount": 0,
"clientAddress": "string",
"comment": "string",
"companyName": "string",
"createdDate": "2022-04-04T18:22:28.496Z",
"currency": "BNB",
"hash": "string",
"id": 0,
"networkFee": 0,
"networkFeeCurrency": "BNB",
"networkFeeRatio": 0,
"nonce": 0,
"state": "CANCELED",
"withdrawalErrors": [
{
"errorMessage": "string",
"errorResolved": true,
"id": 0,
"status": "NOT_ENOUGH_FUNDS"
}
],
"withdrawalId": 0,
"externalId": "string"
}
],
"size": 0,
"total": 0,
"totalElements": 0
}
This endpoint retrieves all transactions from a specific mass payout.
HTTP Request
POST https://public-gateway.calypso.finance/api/v1/pub/payout/withdrawal/all
Header
Parameter | Type | Mandatory | Description |
---|---|---|---|
Key | STRING | Yes | <your_api_key> |
Sign | STRING | Yes | <your_sign> |
Content-Type | STRING | Yes | must be set to application/json for requests to the Calypso API |
Request Body
parameter | type | mandatory | description |
---|---|---|---|
nonce | number | Yes | nonce used in construction of sign header. |
request | object | Yes | this object contains request details. |
request.dealId | string | Yes | the id of the mass payout you want to look up. |
request.stateNames | string | Yes | specify the status of results to return. [ DRAFT, IN_PROGRESS, COMPLETED, REPLACED, FAILED ] |
request.pageNumber | number | Yes | specify the page of results to return. |
request.size | number | Yes | a numeric value indicating the page size. |
request.idempotencyKey | string | No | the external id that can be generated by user while creating the payout |
Response Body
parameter | type | mandatory | description |
---|---|---|---|
amount | number | Yes | withdrawal amount. |
clientAddress | string | Yes | recipient's crypto-address. |
comment | string | No | comment for the transaction. |
companyName | string | Yes | company of the user who created the payout. |
createdDate | string | Yes | time of payout creation. |
currency | string | Yes | this is the currency associated with the amount field. [ BNB, BTC, BUSD, BUSD_ETH, DAI, ETH, FRAX, MATIC, TRX, USDC, USDT, USDT_MATIC, USDT_TRX, XDG, USDT_BSC ] |
hash | string | No | transaction hash. |
id | number | Yes | transaction id. |
modifiedBy | string | Yes | user who modified this payout. |
modifiedDate | string | Yes | time of transaction modification. |
networkFee | number | Yes | is a cryptocurrency transaction fee that is charged to users when performing crypto transactions. |
networkFeeCurrency | string | Yes | this is the currency associated with the networkfee field. [ BNB, BTC, ETH, MATIC, TRX, XDG ] |
networkFeeRatio | number | Yes | selected network fee coefficient (see get expected transaction fee). |
nonce | number | No | sequence number of the transaction. |
state | string | Yes | represents status of the transaction. [ DRAFT, IN_PROGRESS, COMPLETED, REPLACED, FAILED ] |
withdrawalErrors | array | Yes | this object contains error details. |
withdrawalErrors.errorMessage | string | No | represents human readable error reason of why request is not successful. |
withdrawalErrors.errorResolved | boolean | Yes | flag indicating that the error has been resolved. |
withdrawalErrors.id | number | Yes | id of the withdrawal error that occurred. |
withdrawalErrors.status | string | Yes | error status when withdrawing funds. [ SUCCESS, NO_PERMISSION, NO_BALANCE, NOT_ENOUGH_FUNDS, NOT_ENOUGH_FUNDS _FOR_COMMISSION ] |
withdrawalid | number | No | transaction id. |
externalId | string | No | the external id that can be generated by user for particular transaction while creating the payout. |
Get Specific Transaction From a Mass Payout
Request
curl --silent --location --request POST "https://public-gateway.calypso.finance/api/v1/pub/payout/withdrawal" \
--header 'Key: <your_api_key>' \
--header 'Sign: <your_sign>' \
--header "Content-Type: application/json" \
--data-raw "{
"nonce": 0,
"request": {
"withdrawalId": 0
}
}"
Response
{
"amount": 0,
"clientAddress": "string",
"comment": "string",
"companyName": "string",
"createdDate": "2022-04-04T18:29:52.036Z",
"currency": "BNB",
"externalId": "string",
"hash": "string",
"id": 0,
"networkFee": 0,
"networkFeeCurrency": "BNB",
"networkFeeRatio": 0,
"nonce": 0,
"state": "CANCELED",
"withdrawalErrors": [
{
"errorMessage": "string",
"errorResolved": true,
"id": 0,
"status": "NOT_ENOUGH_FUNDS"
}
],
"withdrawalId": 0
}
This endpoint retrieves specific transaction from a mass payout.
HTTP Request
POST https://public-gateway.calypso.finance/api/v1/pub/payout/withdrawal
Header
Parameter | Type | Mandatory | Description |
---|---|---|---|
Key | STRING | Yes | <your_api_key> |
Sign | STRING | Yes | <your_sign> |
Content-Type | STRING | Yes | must be set to application/json for requests to the Calypso API |
Request Body
Parameter | Type | Mandatory | Description |
---|---|---|---|
nonce | number | Yes | Nonce used in construction of Sign header. |
request | object | Yes | This object contains request details. |
request.withdrawalId | number | Yes | Transaction ID. |
Response Body
parameter | type | mandatory | description |
---|---|---|---|
amount | number | Yes | withdrawal amount. |
clientAddress | string | Yes | recipient's crypto-address. |
comment | string | No | comment for the transaction. |
companyName | string | Yes | company of the user who created the payout. |
createdBy | string | Yes | user who created this transaction. |
createdDate | string | Yes | time of payout creation. |
currency | string | Yes | this is the currency associated with the amount field. [ BNB, BTC, BUSD, BUSD_ETH, DAI, ETH, FRAX, MATIC, TRX, USDC, USDT, USDT_MATIC, USDT_TRX, XDG, USDT_BSC ] |
hash | string | No | transaction hash. |
id | number | Yes | transaction id. |
modifiedBy | string | Yes | user who modified this payout. |
modifiedDate | string | Yes | time of transaction modification. |
networkFee | number | Yes | is a cryptocurrency transaction fee that is charged to users when performing crypto transactions. |
networkFeeCurrency | string | Yes | this is the currency associated with the networkfee field. [ BNB, BTC, ETH, MATIC, TRX, XDG ] |
networkFeeRatio | number | Yes | selected network fee coefficient (see get expected transaction fee). |
nonce | number | No | sequence number of the transaction. |
state | string | Yes | represents status of the transaction. [ DRAFT, IN_PROGRESS, COMPLETED, REPLACED, FAILED ] |
totalAmountInFiats | object | Yes | the total amount of transactions in different fiat currencies. |
withdrawalErrors | array | Yes | this object contains error details. |
withdrawalErrors.errorMessage | string | No | represents human readable error reason of why request is not successful. |
withdrawalErrors.errorResolved | boolean | Yes | flag indicating that the error has been resolved. |
withdrawalErrors.id | number | Yes | id of the withdrawal error that occurred. |
withdrawalErrors.status | string | Yes | error status when withdrawing funds. [ SUCCESS, NO_PERMISSION, NO_BALANCE, NOT_ENOUGH_FUNDS, NOT_ENOUGH_FUNDS _FOR_COMMISSION ] |
withdrawalid | number | No | transaction id. |
externalId | string | No | the external id that can be generated by user for particular transaction while creating the payout. |
Get Expected Transaction Fee
Request
curl --location --request POST 'https://public-gateway.calypso.finance/api/v1/pub/payout/fee' \
--header 'key: <your_api_key>' \
--header 'sign: <your_sign>' \
--header 'Content-Type: application/json' \
--data-raw '{
"nonce": 0,
"request": {
"withdrawalAddress": "string",
"currency": "BTC",
"depositAddress": "string",
"amount": 0
}
}'
Response
{
"maxRatio": 0,
"minRatio": 0,
"transactionFee": 0
}
This endpoint retrieves the expected transaction fee.
HTTP Request
POST https://public-gateway.calypso.finance/api/v1/pub/payout/fee
Header
Parameter | Type | Mandatory | Description |
---|---|---|---|
Key | STRING | Yes | <your_api_key> |
Sign | STRING | Yes | <your_sign> |
Content-Type | STRING | Yes | must be set to application/json for requests to the Calypso API |
Request Body
Parameter | Type | Mandatory | Description |
---|---|---|---|
nonce | NUMBER | Yes | Nonce used in construction of Sign header. |
request | OBJECT | Yes | This object contains request details. |
request.withdrawalAddress | STRING | Yes | Sender's crypto address. |
request.currency | STRING | Yes | This is the currency associated with the amount field. [ BNB, BTC, BUSD, BUSD_ETH, DAI, ETH, FRAX, MATIC, TRX, USDC, USDT, USDT_MATIC, USDT_TRX, XDG, USDT_BSC ] |
request.depositAddress | STRING | Yes | Recipient's crypto-address. |
request.amount | NUMBER | Yes | Transaction amount. |
Response Body
Parameter | Type | Mandatory | Description |
---|---|---|---|
maxRatio | NUMBER | Yes | Represents a max ratio by which the transaction fee can be multiplied in order to precalculate max possible transaction fee. |
minRatio | NUMBER | Yes | Represents a min ratio by which the transaction fee can be multiplied in order to precalculate min possible transaction fee. |
transactionFee | NUMBER | Yes | Represents a medium transaction fee which can be multiplied by ratio in order to precalculate possible transaction fee. |
Wallet API
New Wallet
Request
curl --location --request POST 'https://public-gateway.calypso.finance/api/v1/pub/wallet/create' \
--header 'Key: <your_api_key>' \
--header 'Sign: <your_sign>' \
--header 'Content-Type: application/json' \
--data-raw '{
"nonce": 0,
"request": {
"blockchain": "BITCOIN",
"name": "string"
}
}'
Response
{
"address": "string"
}
This endpoint creates a new hot wallet.
HTTP Request
POST https://public-gateway.calypso.finance/api/v1/pub/wallet/create
Header
Parameter | Type | Mandatory | Description |
---|---|---|---|
Key | STRING | Yes | <your_api_key> |
Sign | STRING | Yes | <your_sign> |
Content-Type | STRING | Yes | must be set to application/json for requests to the Calypso API |
Request Body
parameter | type | mandatory | description |
---|---|---|---|
nonce | number | Yes | nonce used in construction of sign header. |
request | object | Yes | this object contains request details. |
request.blockchain | string | Yes | blockchain where you create wallet [ BITCOIN, ETHEREUM, BINANCE_SMART_CHAIN, TRON, DOGECOIN, POLYGON ] |
request.name | string | No | wallet name |
Response Body
parameter | type | mandatory | description |
---|---|---|---|
address | string | Yes | blockchain address of the wallet |
Currencies and rates API
Get all currencies
Request
curl --location --request POST 'https://public-gateway.calypso.finance/api/v1/pub/currency' \
--header 'Key: <your_api_key>' \
--header 'Sign: <your_sign>' \
--header 'Content-Type: application/json' \
--data-raw '{
"nonce": 0
}'
Response
{
"cryptoCurrencies": [
"BTC"
],
"fiatCurrencies": [
"EUR"
]
}
This endpoint retrieves all available currencies.
HTTP Request
POST https://public-gateway.calypso.finance/api/v1/pub/currency
Header
Parameter | Type | Mandatory | Description |
---|---|---|---|
Key | STRING | Yes | <your_api_key> |
Sign | STRING | Yes | <your_sign> |
Content-Type | STRING | Yes | must be set to application/json for requests to the Calypso API |
Request Body
parameter | type | mandatory | description |
---|---|---|---|
nonce | number | Yes | nonce used in construction of sign header. |
Response Body
parameter | type | mandatory | description |
---|---|---|---|
cryptoCurrencies | array | No | list of available crypto currencies |
cryptoCurrencies.{currencyName} | string | No | ticker of crypto currency |
fiatCurrencies | array | No | list of available fiat currencies |
fiatCurrencies.{currencyName} | string | No | ticker of fiat currency |
Get exchange rates
Request
curl --location --request POST 'https://public-gateway.calypso.finance/api/v1/pub/currency/rate' \
--header 'Key: <your_api_key>' \
--header 'Sign: <your_sign>' \
--header 'Content-Type: application/json' \
--data-raw '{
"nonce": 0,
"request": {
"fromCurrencies": [
"BTC"
],
"toCurrencies": [
"ETH"
]
}
}'
Response
{
"rates": {
"BTC": {
"ETH": {
"rate": 14.901353042856291,
"createdAt": "2022-07-26T09:12:39Z"
}
}
}
}
This endpoint retreaves exchange rates for specified currencies.
HTTP Request
POST https://public-gateway.calypso.finance/api/v1/pub/currency/rate
Header
Parameter | Type | Mandatory | Description |
---|---|---|---|
Key | STRING | Yes | <your_api_key> |
Sign | STRING | Yes | <your_sign> |
Content-Type | STRING | Yes | must be set to application/json for requests to the Calypso API |
Request Body
parameter | type | mandatory | description |
---|---|---|---|
nonce | number | Yes | nonce used in construction of sign header. |
request | object | Yes | this object contains request details. |
request.fromCurrencies | array | Yes | list of source currencies for getting rate |
request.fromCurrencies.{currencyName} | string | Yes | ticker of crypto or fiat currency |
request.toCurrencies | array | Yes | list of destination currency for getting rate |
request.toCurrencies.{currencyName} | string | Yes | ticker of crypto or fiat currency |
Response Body
parameter | type | mandatory | description |
---|---|---|---|
rates | object | Yes | objcet with currency pairs and their rates |
rates.{currencyName} | object | Yes | object with rates for the currency |
rates.{currencyName}.{currencyName} | object | Yes | object with rate data for this currency to currency in parent object |
rates.{currencyName}.{currencyName}.rate | string | Yes | current price of currency pair |
rates.{currencyName}.{currencyName}.createdAt | string | Yes | date relative to which rate is provided |
Recurrent payments API
Status | Description |
---|---|
CREATED | • A new subscription has been created. • The client has not yet subscribed for your product/service. |
PENDING_ACTIVATION | • The client has subscribed for your product/service and gave allowance for funds withdrawal. • The the incoming payment transaction has not yet been mined in the blockchain. |
ACTIVE | • The subscription is active. • The funds for the the billing period have been received on merchant’s wallet. |
PAUSED | • Not enough funds on the client blockchain address to pay for subscription. • he client has cancelled the allowance for funds permission. |
ARCHIVED | Subscription is deleted by merchant (manually) or the system (after the subscription has ended) |
Get All active Subscriptions
Request
curl --location --request POST 'https://public-gateway.calypso.finance/api/v1/pub/recurrent/active' \
--header 'Key: <your_api_key>' \
--header 'Sign: <your_sign>' \
--header 'Content-Type: application/json' \
--data-raw '{
"nonce": 0,
"request": {
"companyId": "3fa85f64-5717-4562-b3fc-2c963f66afa6",
"pageNumber": 0,
"pageSize": 0,
"sort": "ASC",
"properties": "DATE"
}
}'
Response
{
"result": [
{
"id": 0,
"linkId": "3fa85f64-5717-4562-b3fc-2c963f66afa6",
"depositAddress": "string",
"approveHolderAddress": "string",
"withdrawalAddress": "string",
"name": "string",
"description": "string",
"amount": 0,
"currency": "USDT",
"duration": 0,
"periodicity": 0,
"email": "string",
"externalId": "string",
"approveAmount": 0,
"finishedDate": "2022-09-23T11:02:23.415Z",
"state": "CREATED",
"startDate": "2022-09-23T11:02:23.415Z",
"freePeriod": 0,
"nextPaymentDate": "2022-09-23T11:02:23.415Z",
"redirectUrl": "string",
"supportUrl": "string",
"logoUrl": "string",
"cancel": {
"cancelledByMerchant": true,
"cancelledByMerchantReason": "string",
"cancelledByClient": true
},
"pause": {
"pausedByAllowance": true,
"allowance": 0,
"pausedByBalance": true,
"balance": 0
}
}
],
"page": 0,
"size": 0,
"total": 0,
"totalElements": 0
}
This endpoint retrieves active subscriptions.
HTTP Request
POST https://public-gateway.calypso.finance/api/v1/pub/recurrent/active
Header
Parameter | Type | Mandatory | Description |
---|---|---|---|
Key | STRING | Yes | <your_api_key> |
Sign | STRING | Yes | <your_sign> |
Content-Type | STRING | Yes | must be set to application/json for requests to the Calypso API |
Request Body
parameter | type | mandatory | description |
---|---|---|---|
nonce | number | Yes | nonce used in construction of sign header. |
request | object | Yes | this object contains request details. |
request.companyId | string | Yes | specify your companyId |
request.pageNumber | number | Yes | specify the page of results to return. |
request.pageSize | number | Yes | a numeric value indicating the page size. |
request.sort | string | Yes | the direction of this api call which can be asc or desc. [ ASC, DESC ] |
request.properties | array | Yes | the attribute by which sorting is performed. [ CURRENCY, STATE, DATE ] |
Response Body
parameter | type | mandatory | description |
---|---|---|---|
page | number | Yes | result page number. |
result | array | Yes | this object contains response details. |
result.id | number | Yes | subscription id. |
result.linkId | string | Yes | subscription linkId used for creating a subscription link for the client |
result.depositAddress | string | Yes | merchant's wallet address on which the payment will be received |
result.approveHolderAddress | string | Yes | merchant's wallet address from which the token payment transaction will be initiated |
result.withdrawalAddress | string | No | client address from which the payment is being made |
result.name | string | Yes | name of the subscription |
result.description | string | Yes | description of the subscription |
result.amount | number | Yes | subscription payment amount |
result.currency | string | Yes | currency of the subscription [ BUSD_ETH, DAI, FRAX, USDC, USDT, USDT_MATIC, BUSD, USDT_BSC ] |
result.duration | number | Yes | duration of a subscription in days |
result.periodicity | number | Yes | the frequency of debiting money for a subscription in days |
result.email | string | No | email address of the client to receive information on email about subscription activation |
result.externalId | string | No | merchant ID that can be assigned to one subscription or several subscriptions in string format |
result.approveAmount | number | No | the amount on the client wallet for which the approve has been made |
result.finishedDate | string | No | subscription expiration time and date |
result.state | string | Yes | represents the status of the subscription. |
result.startDate | string | No | subscription starting date |
result.freePeriod | number | Yes | subscription trial period in days after which the money will be withdrawn from client address |
result.nextPaymentDate | string | No | next date when the money will be withdrawn from client address |
result.logoUrl | string | No | link to the logo of merchant which will be shown in the subscription page. The logo must be in PNG format. Recommended size 100*24 px |
result.redirectUrl | string | No | link to the web page where client can come back to from subscription page |
result.supportUrl | string | No | link to the merchant support page where client can go to from subscription page |
result.cancel | object | No | information about cancellation of subscription if it happened |
result.cancel.cancelledByMerchant | boolean | No | represents if subscription has been cancelled by merchant |
result.cancel.cancelledByMerchantReason | string | No | reason of cancellation if subscription has been cancelled by merchant |
result.cancel.cancelledByClient | boolean | No | represents if subscription has been cancelled by client |
result.pause | object | No | information about subscription pause state if it happened |
result.pause.pausedByAllowance | boolean | No | represents if subscription has been paused because of allowance |
result.pause.allowance | number | No | the amount of allowed funds on client's address |
result.pause.pausedByBalance | boolean | No | represents if subscription has been paused because of balance |
result.pause.balance | number | No | the balance amount of the client address |
size | number | Yes | a numeric value indicating the page size. |
total | number | Yes | the total number of pages matching the query. |
totalElements | number | Yes | the total number of objects matching the query. |
Get Subscription By ID
Request
curl --location --request POST 'https://public-gateway.calypso.finance/api/v1/pub/recurrent/get' \
--header 'Key: <your_api_key>' \
--header 'Sign: <your_sign>' \
--header 'Content-Type: application/json' \
--data-raw '{
"nonce": 0,
"request": {
"id": 0
}
}'
Response
{
"id": 0,
"linkId": "3fa85f64-5717-4562-b3fc-2c963f66afa6",
"depositAddress": "string",
"approveHolderAddress": "string",
"withdrawalAddress": "string",
"name": "string",
"description": "string",
"amount": 0,
"currency": "USDT",
"duration": 0,
"periodicity": 0,
"email": "string",
"externalId": "string",
"approveAmount": 0,
"finishedDate": "2022-09-23T12:21:04.912Z",
"state": "CREATED",
"startDate": "2022-09-23T12:21:04.912Z",
"freePeriod": 0,
"nextPaymentDate": "2022-09-23T12:21:04.912Z",
"redirectUrl": "string",
"supportUrl": "string",
"logoUrl": "string",
"cancel": {
"cancelledByMerchant": true,
"cancelledByMerchantReason": "string",
"cancelledByClient": true
},
"pause": {
"pausedByAllowance": true,
"allowance": 0,
"pausedByBalance": true,
"balance": 0
}
}
This endpoint retrieves a specific recurrent subscription by id.
HTTP Request
POST https://public-gateway.calypso.finance/api/v1/pub/recurrent/get
Header
Parameter | Type | Mandatory | Description |
---|---|---|---|
Key | STRING | Yes | <your_api_key> |
Sign | STRING | Yes | <your_sign> |
Content-Type | STRING | Yes | must be set to application/json for requests to the Calypso API |
Request Body
parameter | type | mandatory | description |
---|---|---|---|
nonce | number | Yes | nonce used in construction of sign header. |
request | object | Yes | this object contains request details. |
request.id | number | Yes | id of the subscription. |
Response Body
parameter | type | mandatory | description |
---|---|---|---|
result | array | Yes | this object contains response details. |
result.id | number | Yes | subscription id. |
result.linkId | string | Yes | subscription linkId used for creating a subscription link for the client |
result.depositAddress | string | Yes | merchant's wallet address on which the payment will be received |
result.approveHolderAddress | string | Yes | merchant's wallet address from which the token payment transaction will be initiated |
result.withdrawalAddress | string | No | client address from which the payment is being made |
result.name | string | Yes | name of the subscription |
result.description | string | Yes | description of the subscription |
result.amount | number | Yes | subscription payment amount |
result.currency | string | Yes | currency of the subscription [ BUSD_ETH, DAI, FRAX, USDC, USDT, USDT_MATIC, BUSD, USDT_BSC ] |
result.duration | number | Yes | duration of a subscription in days |
result.periodicity | number | Yes | the frequency of debiting money for a subscription in days |
result.email | string | No | email address of the client to receive information on email about subscription activation |
result.externalId | string | No | merchant ID that can be assigned to one subscription or several subscriptions in string format |
result.approveAmount | number | No | the amount on the client wallet for which the approve has been made |
result.finishedDate | string | No | subscription expiration time and date |
result.state | string | Yes | represents the status of the subscription. |
result.startDate | string | No | subscription starting date |
result.freePeriod | number | Yes | subscription trial period in days after which the money will be withdrawn from client address |
result.nextPaymentDate | string | No | next date when the money will be withdrawn from client address |
result.logoUrl | string | No | link to the logo of merchant which will be shown in the subscription page. The logo must be in PNG format. Recommended size 100*24 px |
result.redirectUrl | string | No | link to the web page where client can come back to from subscription page |
result.supportUrl | string | No | link to the merchant support page where client can go to from subscription page |
result.cancel | object | No | information about cancellation of subscription if it happened |
result.cancel.cancelledByMerchant | boolean | No | represents if subscription has been cancelled by merchant |
result.cancel.cancelledByMerchantReason | string | No | reason of cancellation if subscription has been cancelled by merchant |
result.cancel.cancelledByClient | boolean | No | represents if subscription has been cancelled by client |
result.pause | object | No | information about subscription pause state if it happened |
result.pause.pausedByAllowance | boolean | No | represents if subscription has been paused because of allowance |
result.pause.allowance | number | No | the amount of allowed funds on client's address |
result.pause.pausedByBalance | boolean | No | represents if subscription has been paused because of balance |
result.pause.balance | number | No | the balance amount of the client address |
New Subscription
Request
curl --location --request POST 'https://public-gateway.calypso.finance/api/v1/pub/recurrent/create' \
--header 'Key: <your_api_key>' \
--header 'Sign: <your_sign>' \
--header 'Content-Type: application/json' \
--data-raw '{
"nonce": 0,
"request": {
"depositAddress": "string",
"name": "string",
"description": "string",
"amount": 0,
"currency": "USDT",
"duration": 0,
"freePeriod": 0,
"periodicity": 0,
"email": "string",
"externalId": "string",
"redirectUrl": "string",
"supportUrl": "string",
"logoUrl": "string"
}
}'
Response
{
"id": 0,
"linkId": "3fa85f64-5717-4562-b3fc-2c963f66afa6",
"depositAddress": "string",
"approveHolderAddress": "string",
"withdrawalAddress": "string",
"name": "string",
"description": "string",
"amount": 0,
"currency": "USDT",
"duration": 0,
"periodicity": 0,
"email": "string",
"externalId": "string",
"approveAmount": 0,
"finishedDate": "2022-09-23T12:27:54.427Z",
"state": "CREATED",
"startDate": "2022-09-23T12:27:54.427Z",
"freePeriod": 0,
"nextPaymentDate": "2022-09-23T12:27:54.427Z",
"redirectUrl": "string",
"supportUrl": "string",
"logoUrl": "string",
"cancel": {
"cancelledByMerchant": true,
"cancelledByMerchantReason": "string",
"cancelledByClient": true
},
"pause": {
"pausedByAllowance": true,
"allowance": 0,
"pausedByBalance": true,
"balance": 0
}
}
This endpoint creates a new recurrent subscription.
HTTP Request
POST https://public-gateway.calypso.finance/api/v1/pub/recurrent/create
Header
Parameter | Type | Mandatory | Description |
---|---|---|---|
Key | STRING | Yes | <your_api_key> |
Sign | STRING | Yes | <your_sign> |
Content-Type | STRING | Yes | must be set to application/json for requests to the Calypso API |
Request Body
name | type | mandatory | description |
---|---|---|---|
nonce | number | Yes | nonce used in construction of sign header. |
request | object | Yes | this object contains request details. |
request.depositAddress | string | Yes | merchant's wallet address on which the payment will be received |
request.name | string | Yes | name of the subscription |
request.description | string | Yes | description of the subscription |
request.amount | number | Yes | subscription payment amount |
request.currency | string | Yes | currency of the subscription [ BUSD_ETH, DAI, FRAX, USDC, USDT, USDT_MATIC, BUSD, USDT_BSC ] |
request.duration | number | Yes | duration of a subscription in days |
request.freePeriod | number | Yes | subscription trial period in days after which the money will be withdrawn from client address |
request.periodicity | number | Yes | the frequency of debiting money for a subscription in days |
request.email | string | No | email address of the client to receive information on email about subscription activation |
request.externalId | string | No | merchant ID that can be assigned to one subscription or several subscriptions in string format |
request.logoUrl | string | No | link to the logo of merchant which will be shown in the subscription page. The logo must be in PNG format. Recommended size 100*24 px |
request.redirectUrl | string | No | link to the web page where client can come back to from subscription page |
request.supportUrl | string | No | link to the merchant support page where client can go to from subscription page |
Response Body
parameter | type | mandatory | description |
---|---|---|---|
result | array | Yes | this object contains response details. |
result.id | number | Yes | subscription id. |
result.linkId | string | Yes | subscription linkId used for creating a subscription link for the client |
result.depositAddress | string | Yes | merchant's wallet address on which the payment will be received |
result.approveHolderAddress | string | Yes | merchant's wallet address from which the token payment transaction will be initiated |
result.withdrawalAddress | string | No | client address from which the payment is being made |
result.name | string | Yes | name of the subscription |
result.description | string | Yes | description of the subscription |
result.amount | number | Yes | subscription payment amount |
result.currency | string | Yes | currency of the subscription [ BUSD_ETH, DAI, FRAX, USDC, USDT, USDT_MATIC, BUSD, USDT_BSC ] |
result.duration | number | Yes | duration of a subscription in days |
result.periodicity | number | Yes | the frequency of debiting money for a subscription in days |
result.email | string | No | email address of the client to receive information on email about subscription activation |
result.externalId | string | No | merchant ID that can be assigned to one subscription or several subscriptions in string format |
result.approveAmount | number | No | the amount on the client wallet for which the approve has been made |
result.finishedDate | string | No | subscription expiration time and date |
result.state | string | Yes | represents the status of the subscription. |
result.startDate | string | No | subscription starting date |
result.freePeriod | number | Yes | subscription trial period in days after which the money will be withdrawn from client address |
result.nextPaymentDate | string | No | next date when the money will be withdrawn from client address |
result.logoUrl | string | No | link to the logo of merchant which will be shown in the subscription page. The logo must be in PNG format. Recommended size 100*24 px |
result.redirectUrl | string | No | link to the web page where client can come back to from subscription page |
result.supportUrl | string | No | link to the merchant support page where client can go to from subscription page |
result.cancel | object | No | information about cancellation of subscription if it happened |
result.cancel.cancelledByMerchant | boolean | No | represents if subscription has been cancelled by merchant |
result.cancel.cancelledByMerchantReason | string | No | reason of cancellation if subscription has been cancelled by merchant |
result.cancel.cancelledByClient | boolean | No | represents if subscription has been cancelled by client |
result.pause | object | No | information about subscription pause state if it happened |
result.pause.pausedByAllowance | boolean | No | represents if subscription has been paused because of allowance |
result.pause.allowance | number | No | the amount of allowed funds on client's address |
result.pause.pausedByBalance | boolean | No | represents if subscription has been paused because of balance |
result.pause.balance | number | No | the balance amount of the client address |
Get all Subscription payments
Request
curl --location --request POST 'https://public-gateway.calypso.finance/api/v1/pub/recurrent/payment' \
--header 'Key: <your_api_key>' \
--header 'Sign: <your_sign>' \
--header 'Content-Type: application/json' \
--data-raw '{
"nonce": 0,
"request": {
"id": 0,
"companyId": "3fa85f64-5717-4562-b3fc-2c963f66afa6",
"withdrawalAddress": "string",
"email": "string",
"pageNumber": 0,
"pageSize": 0,
"sort": "ASC",
"properties": "DATE"
}
}'
Response
{
"result": [
{
"id": 0,
"recurrentId": 0,
"createdDate": "2022-09-23T12:43:03.235Z",
"state": "NEW",
"withdrawals": [
{
"withdrawalId": 0,
"hash": "string",
"networkFee": 0,
"state": "PENDING"
}
]
}
],
"page": 0,
"size": 0,
"total": 0,
"totalElements": 0
}
This endpoint retrieves a recurrent payments for existing subscription.
HTTP Request
POST https://public-gateway.calypso.finance/api/v1/pub/recurrent/payment
Header
Parameter | Type | Mandatory | Description |
---|---|---|---|
Key | STRING | Yes | <your_api_key> |
Sign | STRING | Yes | <your_sign> |
Content-Type | STRING | Yes | must be set to application/json for requests to the Calypso API |
Request Body
parameter | type | mandatory | description |
---|---|---|---|
nonce | number | Yes | nonce used in construction of sign header. |
request | object | Yes | this object contains request details. |
request.companyId | string | Yes | specify your companyId |
request.pageNumber | number | Yes | specify the page of results to return. |
request.pageSize | number | Yes | a numeric value indicating the page size. |
request.sort | string | Yes | the direction of this api call which can be asc or desc. [ ASC, DESC ] |
request.properties | array | Yes | the attribute by which sorting is performed. [ CURRENCY, STATE, DATE ] |
request.id | string | No | specify id of subscription payment |
request.email | string | No | specify email of your client |
Response Body
parameter | type | mandatory | description |
---|---|---|---|
page | number | Yes | result page number. |
result | array | Yes | this object contains response details. |
result.id | number | Yes | subscription payment id |
result.recurrentId | string | Yes | subscription id |
result.createdDate | string | Yes | subscription starting date |
result.state | string | Yes | represents the status of the subscription payment [ NEW, FAILED, PENDING, COMPLETED ] |
result.withdrawals | object | Yes | information about payment withdrawals |
result.withdrawals.withdrawalId | object | Yes | payment withdrawal id |
result.withdrawals.hash | object | Yes | hash of the withdrawal transaction |
result.withdrawals.networkFee | object | Yes | cryptocurrency transaction fee that is charged to users when performing crypto transactions |
result.withdrawals.state | object | Yes | information about payment withdrawal state [ PENDING, IN_PROGRESS, COMPLETED, REPLACED, FAILED ] |
size | number | Yes | a numeric value indicating the page size. |
total | number | Yes | the total number of pages matching the query. |
totalElements | number | Yes | the total number of objects matching the query. |
Archive Subscription By ID
Request
curl --location --request POST 'https://public-gateway.calypso.finance/api/v1/pub/recurrent/delete' \
--header 'Key: <your_api_key>' \
--header 'Sign: <your_sign>' \
--header 'Content-Type: application/json' \
--data-raw '{
"nonce": 0,
"request": {
"id": 0,
"reason": "string"
}
}'
This endpoint archives a recurrent subscription by id.
HTTP Request
POST https://public-gateway.calypso.finance/api/v1/pub/recurrent/delete
Header
Parameter | Type | Mandatory | Description |
---|---|---|---|
Key | STRING | Yes | <your_api_key> |
Sign | STRING | Yes | <your_sign> |
Content-Type | STRING | Yes | must be set to application/json for requests to the Calypso API |
Request Body
parameter | type | mandatory | description |
---|---|---|---|
nonce | number | Yes | nonce used in construction of sign header. |
request | object | Yes | this object contains request details. |
request.id | number | Yes | id of the subscription. |
request.reason | string | No | the reason for archiving the subscription. |
Change Subscription By ID
Request
curl --location --request POST 'https://public-gateway.calypso.finance/api/v1/pub/recurrent/change' \
--header 'Key: <your_api_key>' \
--header 'Sign: <your_sign>' \
--header 'Content-Type: application/json' \
--data-raw '{
"nonce": 0,
"request": {
"id": 0,
"depositAddress": "string",
"redirectUrl": "string",
"supportUrl": "string",
"logoUrl": "string"
}
}'
Response
{
"id": 0,
"linkId": "3fa85f64-5717-4562-b3fc-2c963f66afa6",
"depositAddress": "string",
"approveHolderAddress": "string",
"withdrawalAddress": "string",
"name": "string",
"description": "string",
"amount": 0,
"currency": "USDT",
"duration": 0,
"periodicity": 0,
"email": "string",
"externalId": "string",
"approveAmount": 0,
"finishedDate": "2022-09-23T12:21:04.912Z",
"state": "CREATED",
"startDate": "2022-09-23T12:21:04.912Z",
"freePeriod": 0,
"nextPaymentDate": "2022-09-23T12:21:04.912Z",
"redirectUrl": "string",
"supportUrl": "string",
"logoUrl": "string",
"cancel": {
"cancelledByMerchant": true,
"cancelledByMerchantReason": "string",
"cancelledByClient": true
},
"pause": {
"pausedByAllowance": true,
"allowance": 0,
"pausedByBalance": true,
"balance": 0
}
}
This endpoint hanges a specific recurrent subscription by id.
HTTP Request
POST https://public-gateway.calypso.finance/api/v1/pub/recurrent/change
Header
Parameter | Type | Mandatory | Description |
---|---|---|---|
Key | STRING | Yes | <your_api_key> |
Sign | STRING | Yes | <your_sign> |
Content-Type | STRING | Yes | must be set to application/json for requests to the Calypso API |
Request Body
parameter | type | mandatory | description |
---|---|---|---|
nonce | number | Yes | nonce used in construction of sign header. |
request | object | Yes | this object contains request details. |
request.id | number | Yes | id of the subscription. |
result.depositAddress | string | Yes | merchant's wallet address on which the payment will be received |
result.logoUrl | string | No | link to the logo of merchant which will be shown in the subscription page. The logo must be in PNG format. Recommended size 100*24 px |
result.redirectUrl | string | No | link to the web page where client can come back to from subscription page |
result.supportUrl | string | No | link to the merchant support page where client can go to from subscription page |
Response Body
parameter | type | mandatory | description |
---|---|---|---|
result | array | Yes | this object contains response details. |
result.id | number | Yes | subscription id. |
result.linkId | string | Yes | subscription linkId used for creating a subscription link for the client |
result.depositAddress | string | Yes | merchant's wallet address on which the payment will be received |
result.approveHolderAddress | string | Yes | merchant's wallet address from which the token payment transaction will be initiated |
result.withdrawalAddress | string | No | client address from which the payment is being made |
result.name | string | Yes | name of the subscription |
result.description | string | Yes | description of the subscription |
result.amount | number | Yes | subscription payment amount |
result.currency | string | Yes | currency of the subscription [ BUSD_ETH, DAI, FRAX, USDC, USDT, USDT_MATIC, BUSD, USDT_BSC ] |
result.duration | number | Yes | duration of a subscription in days |
result.periodicity | number | Yes | the frequency of debiting money for a subscription in days |
result.email | string | No | email address of the client to receive information on email about subscription activation |
result.externalId | string | No | merchant ID that can be assigned to one subscription or several subscriptions in string format |
result.approveAmount | number | No | the amount on the client wallet for which the approve has been made |
result.finishedDate | string | No | subscription expiration time and date |
result.state | string | Yes | represents the status of the subscription. |
result.startDate | string | No | subscription starting date |
result.freePeriod | number | Yes | subscription trial period in days after which the money will be withdrawn from client address |
result.nextPaymentDate | string | No | next date when the money will be withdrawn from client address |
result.logoUrl | string | No | link to the logo of merchant which will be shown in the subscription page. The logo must be in PNG format. Recommended size 100*24 px |
result.redirectUrl | string | No | link to the web page where client can come back to from subscription page |
result.supportUrl | string | No | link to the merchant support page where client can go to from subscription page |
result.cancel | object | No | information about cancellation of subscription if it happened |
result.cancel.cancelledByMerchant | boolean | No | represents if subscription has been cancelled by merchant |
result.cancel.cancelledByMerchantReason | string | No | reason of cancellation if subscription has been cancelled by merchant |
result.cancel.cancelledByClient | boolean | No | represents if subscription has been cancelled by client |
result.pause | object | No | information about subscription pause state if it happened |
result.pause.pausedByAllowance | boolean | No | represents if subscription has been paused because of allowance |
result.pause.allowance | number | No | the amount of allowed funds on client's address |
result.pause.pausedByBalance | boolean | No | represents if subscription has been paused because of balance |
result.pause.balance | number | No | the balance amount of the client address |
Payment widget API
Status | Description |
---|---|
IN_PROGRESS | The payment widget has been created and is active |
COMPLETED | The invoice created from payment widget has been payed |
ARCHIVED | The payment widget has expired and was automatically archived |
Get All Single Fiat payment widgets
Request
curl --location --request POST 'https://public-gateway.calypso.finance/api/v1/pub/payment-widget/single-fiat/all' \
--header 'Key: <your_api_key>' \
--header 'Sign: <your_sign>' \
--header 'Content-Type: application/json' \
--data-raw '{
"nonce": 0,
"request": {
widgetStates": [
"IN_PROGRESS"
],
"pageNumber": 1,
"size": 10
}
}'
Response
{
"result": [
{
"id": "3fa85f64-5717-4562-b3fc-2c963f66afa6",
"cryptoCurrencies": [
"BTC"
],
"widgetType": "SINGLE_FIAT",
"widgetState": "IN_PROGRESS",
"fiatCurrency": "USD",
"fiatAmount": 0,
"description": "string",
"useLiquidity": true,
"upperCommission": true,
"logoUrl": "string",
"returnUrl": "string",
"supportUrl": "string",
"expiration": "2022-10-10T15:09:03.778Z",
"idempotencyKey": "3fa85f64-5717-4562-b3fc-2c963f66afa6",
"externalId": "string",
"cartItems": [
{
"product": "string",
"price": 0,
"currency": "BTC",
"quantity": 0
}
],
"invoices": [
{
"invoiceId": 0,
"cryptoCurrency": "BTC",
"invoiceIdempotencyKey": "3fa85f64-5717-4562-b3fc-2c963f66afa6",
"invoiceExternalId": "string"
}
],
"createdDate": "2022-10-10T15:09:03.778Z"
}
],
"page": 0,
"size": 0,
"total": 0,
"totalElements": 0
}
This endpoint retrieves all Single Fiat payment widgets.
HTTP Request
POST https://public-gateway.calypso.finance/api/v1/pub/payment-widget/single-fiat/all
Header
Parameter | Type | Mandatory | Description |
---|---|---|---|
Key | STRING | Yes | <your_api_key> |
Sign | STRING | Yes | <your_sign> |
Content-Type | STRING | Yes | must be set to application/json for requests to the Calypso API |
Request Body
parameter | type | mandatory | description |
---|---|---|---|
nonce | number | Yes | nonce used in construction of sign header. |
request | object | Yes | this object contains request details. |
request.widgetStates | array | No | specify the status of result to return |
request.pageNumber | number | Yes | specify the page of results to return. |
request.size | number | Yes | a numeric value indicating the page size. |
Response Body
parameter | type | mandatory | description |
---|---|---|---|
result | array | Yes | this object contains response details. |
result.id | string | Yes | payment widget id. |
result.cryptoCurrencies | array | Yes | contains list of crypto currencies of which invoices may be created for this payment widget |
result.widgetType | string | Yes | type of payment widget [SINGLE_FIAT, UNLIMITED_LINKED] |
result.fiatCurrency | string | Yes | fiat currency of the widget [ USD, EUR ] |
result.fiatAmount | number | Yes | total amount in fiat currency for invoice created from this payment widget |
result.description | string | Yes | description of payment widget |
result.useLiquidity | boolean | Yes | defines whether fee for transaction for future invoices will be charged from liquidity wallet of Calypso (true) or from merchant wallet (false) |
result.upperCommission | boolean | Yes | defines whether network transaction fee for transfer from invoice wallet to your wallet will be substracted from transfer amount (false) or not (true). true is by default. |
result.logoUrl | string | No | link to the logo of merchant which will be shown in the payment widget page. The logo must be in PNG format. Recommended size 100*24 px |
result.redirectUrl | string | No | link to the web page where client can come back to from payment widget page |
result.supportUrl | string | No | link to the merchant support page where client can go to from payment widget page |
result.expiration | string | No | represents server timestamp of payment widget expiration moment. |
result.idempotencyKey | string | No | the external id that can be generated by user while creating the payment widget. |
result.externalId | string | No | merchant ID that can be assigned to one or several payment widgets in string format. |
result.cartItems | array | Yes | list of line items. |
result.cartItems.currency | string | Yes | this is the currency associated with the price field. [ BNB, BTC, BUSD, BUSD_ETH, DAI, ETH, EUR, FRAX, KZT, MATIC, RUB, TRX, UAH, USD, USDC, USDT, USDT_MATIC, USDT_TRX, XDG, BTC_LNG, USDT_BSC ] |
result.cartItems.price | number | Yes | price of this unit. |
result.cartItems.product | string | Yes | name of this unit. |
result.cartItems.quantity | number | Yes | line item number of units. |
result.invoices | array | Yes | contains list of invoices created from this payment widget. |
result.invoices.invoiceId | number | Yes | id of invoice created from this payment widget. |
result.invoices.cryptoCurrency | string | Yes | represents the currency of the invoice [ BNB, BTC, BUSD, BUSD_ETH, DAI, ETH, FRAX, MATIC, TRX, USDC, USDT, USDT_MATIC, USDT_TRX, XDG, BTC_LNG, USDT_BSC ] |
result.invoices.invoiceIdempotencyKey | string | Yes | the external id of the invoice |
result.invoices.invoiceExternalId | string | No | merchant ID of the invoice |
result.createdDate | string | Yes | time of payment widget creation |
page | number | Yes | result page number. |
size | number | Yes | a numeric value indicating the page size. |
total | number | Yes | the total number of pages matching the query. |
totalElements | number | Yes | the total number of objects matching the query. |
Get Single Fiat payment widget By ID
Request
curl --location --request POST 'https://public-gateway.calypso.finance/api/v1/pub/payment-widget/single-fiat/find' \
--header 'Key: <your_api_key>' \
--header 'Sign: <your_sign>' \
--header 'Content-Type: application/json' \
--data-raw '{
"nonce": 0,
"request": {
"requestId": "3fa85f64-5717-4562-b3fc-2c963f66afa6"
}
}'
Response
{
"id": "3fa85f64-5717-4562-b3fc-2c963f66afa6",
"cryptoCurrencies": [
"BTC"
],
"widgetType": "SINGLE_FIAT",
"widgetState": "IN_PROGRESS",
"fiatCurrency": "USD",
"fiatAmount": 0,
"description": "string",
"useLiquidity": true,
"upperCommission": true,
"logoUrl": "string",
"returnUrl": "string",
"supportUrl": "string",
"expiration": "2022-10-10T15:40:05.332Z",
"idempotencyKey": "3fa85f64-5717-4562-b3fc-2c963f66afa6",
"externalId": "string",
"cartItems": [
{
"product": "string",
"price": 0,
"currency": "BTC",
"quantity": 0
}
],
"invoices": [
{
"invoiceId": 0,
"cryptoCurrency": "BTC",
"invoiceIdempotencyKey": "3fa85f64-5717-4562-b3fc-2c963f66afa6",
"invoiceExternalId": "string"
}
],
"createdDate": "2022-10-10T15:40:05.332Z"
}
This endpoint retrieves a Single Fiat payment widget by id.
HTTP Request
POST https://public-gateway.calypso.finance/api/v1/pub/payment-widget/single-fiat/find
Header
Parameter | Type | Mandatory | Description |
---|---|---|---|
Key | STRING | Yes | <your_api_key> |
Sign | STRING | Yes | <your_sign> |
Content-Type | STRING | Yes | must be set to application/json for requests to the Calypso API |
Request Body
parameter | type | mandatory | description |
---|---|---|---|
nonce | number | Yes | nonce used in construction of sign header. |
request | object | Yes | this object contains request details. |
request.requestId | string | Yes | id of the payment widget. |
Response Body
parameter | type | mandatory | description |
---|---|---|---|
result | array | Yes | this object contains response details. |
result.id | string | Yes | payment widget id. |
result.cryptoCurrencies | array | Yes | contains list of crypto currencies of which invoices may be created for this payment widget |
result.widgetType | string | Yes | type of payment widget [SINGLE_FIAT, UNLIMITED_LINKED] |
result.fiatCurrency | string | Yes | fiat currency of the widget [ USD, EUR ] |
result.fiatAmount | number | Yes | total amount in fiat currency for invoice created from this payment widget |
result.description | string | Yes | description of payment widget |
result.useLiquidity | boolean | Yes | defines whether fee for transaction for future invoices will be charged from liquidity wallet of Calypso (true) or from merchant wallet (false) |
result.upperCommission | boolean | Yes | defines whether network transaction fee for transfer from invoice wallet to your wallet will be substracted from transfer amount (false) or not (true). true is by default. |
result.logoUrl | string | No | link to the logo of merchant which will be shown in the payment widget page. The logo must be in PNG format. Recommended size 100*24 px |
result.redirectUrl | string | No | link to the web page where client can come back to from payment widget page |
result.supportUrl | string | No | link to the merchant support page where client can go to from payment widget page |
result.expiration | string | No | represents server timestamp of payment widget expiration moment. |
result.idempotencyKey | string | No | the external id that can be generated by user while creating the payment widget. |
result.externalId | string | No | merchant ID that can be assigned to one or several payment widgets in string format. |
result.cartItems | array | Yes | list of line items. |
result.cartItems.currency | string | Yes | this is the currency associated with the price field. [ BNB, BTC, BUSD, BUSD_ETH, DAI, ETH, EUR, FRAX, KZT, MATIC, RUB, TRX, UAH, USD, USDC, USDT, USDT_MATIC, USDT_TRX, XDG, BTC_LNG, USDT_BSC ] |
result.cartItems.price | number | Yes | price of this unit. |
result.cartItems.product | string | Yes | name of this unit. |
result.cartItems.quantity | number | Yes | line item number of units. |
result.invoices | array | Yes | contains list of invoices created from this payment widget. |
result.invoices.invoiceId | number | Yes | id of invoice created from this payment widget. |
result.invoices.cryptoCurrency | string | Yes | represents the currency of the invoice [ BNB, BTC, BUSD, BUSD_ETH, DAI, ETH, FRAX, MATIC, TRX, USDC, USDT, USDT_MATIC, USDT_TRX, XDG, BTC_LNG, USDT_BSC ] |
result.invoices.invoiceIdempotencyKey | string | Yes | the external id of the invoice |
result.invoices.invoiceExternalId | string | No | merchant ID of the invoice |
result.createdDate | string | Yes | time of payment widget creation |
Create new Single Fiat payment widget
Request
curl --location --request POST 'https://public-gateway.calypso.finance/api/v1/pub/payment-widget/single-fiat/create' \
--header 'Key: <your_api_key>' \
--header 'Sign: <your_sign>' \
--header 'Content-Type: application/json' \
--data-raw '{
"nonce": 0,
"request": {
fiatCurrency": "USD",
"fiatAmount": 0,
"description": "string",
"hotWallets": [
{
"cryptoCurrency": "BTC",
"address": "string"
}
],
"useLiquidity": true,
"upperCommission": true,
"logoUrl": "string",
"returnUrl": "string",
"supportUrl": "string",
"expiration": "2022-10-10T15:45:42.495Z",
"idempotencyKey": "3fa85f64-5717-4562-b3fc-2c963f66afa6",
"externalId": "string",
"cartItems": [
{
"product": "string",
"price": 0,
"currency": "BTC",
"quantity": 0
}
]
}
}'
Response
{
"id": "3fa85f64-5717-4562-b3fc-2c963f66afa6",
"cryptoCurrencies": [
"BTC"
],
"widgetType": "SINGLE_FIAT",
"widgetState": "IN_PROGRESS",
"fiatCurrency": "USD",
"fiatAmount": 0,
"description": "string",
"useLiquidity": true,
"upperCommission": true,
"logoUrl": "string",
"returnUrl": "string",
"supportUrl": "string",
"expiration": "2022-10-10T15:45:42.497Z",
"idempotencyKey": "3fa85f64-5717-4562-b3fc-2c963f66afa6",
"externalId": "string",
"cartItems": [
{
"product": "string",
"price": 0,
"currency": "BTC",
"quantity": 0
}
],
"invoices": [
{
"invoiceId": 0,
"cryptoCurrency": "BTC",
"invoiceIdempotencyKey": "3fa85f64-5717-4562-b3fc-2c963f66afa6",
"invoiceExternalId": "string"
}
],
"createdDate": "2022-10-10T15:45:42.497Z"
}
This endpoint creates a new Single Fiat payment widget.
HTTP Request
POST https://public-gateway.calypso.finance/api/v1/pub/payment-widget/single-fiat/create
Header
Parameter | Type | Mandatory | Description |
---|---|---|---|
Key | STRING | Yes | <your_api_key> |
Sign | STRING | Yes | <your_sign> |
Content-Type | STRING | Yes | must be set to application/json for requests to the Calypso API |
Request Body
name | type | mandatory | description |
---|---|---|---|
nonce | number | Yes | nonce used in construction of sign header. |
request | object | Yes | this object contains request details. |
request.fiatCurrency | string | Yes | fiat currency of the widget [ USD, EUR ] |
request.fiatAmount | number | Yes | total amount in fiat currency for invoices created from this payment widget |
request.description | string | Yes | description of payment widget |
request.hotWallets | array | Yes | array of merchant's wallets on which funds from invoices will be transfered to |
request.hotWallets.cryptoCurrency | string | Yes | currency of merchant's wallet [ BNB, BTC, BUSD, BUSD_ETH, DAI, ETH, FRAX, MATIC, TRX, USDC, USDT, USDT_MATIC, USDT_TRX, XDG, BTC_LNG, USDT_BSC ] |
request.hotWallets.address | string | Yes | address of merchant's wallet |
request.useLiquidity | boolean | Yes | defines whether fee for transaction for future invoices will be charged from liquidity wallet of Calypso (true) or from merchant wallet (false) |
request.upperCommission | boolean | Yes | defines whether network transaction fee for transfer from invoice wallet to your wallet will be substracted from transfer amount (false) or not (true). true is by default. |
request.logoUrl | string | No | link to the logo of merchant which will be shown in the payment widget page. The logo must be in PNG format. Recommended size 100*24 px |
request.redirectUrl | string | No | link to the web page where client can come back to from payment widget page |
request.supportUrl | string | No | link to the merchant support page where client can go to from payment widget page |
request.expiration | string | No | represents server timestamp of payment widget expiration moment. |
request.idempotencyKey | string | No | the external id that can be generated by user while creating the payment widget. |
request.externalId | string | No | merchant ID that can be assigned to one or several payment widgets in string format. |
request.cartItems | array | Yes | list of line items. |
request.cartItems.currency | string | Yes | this is the currency associated with the price field. [ BNB, BTC, BUSD, BUSD_ETH, DAI, ETH, EUR, FRAX, KZT, MATIC, RUB, TRX, UAH, USD, USDC, USDT, USDT_MATIC, USDT_TRX, XDG, BTC_LNG, USDT_BSC ] |
request.cartItems.price | number | Yes | price of this unit. |
request.cartItems.product | string | Yes | name of this unit. |
request.cartItems.quantity | number | Yes | line item number of units. |
Response Body
parameter | type | mandatory | description |
---|---|---|---|
result | array | Yes | this object contains response details. |
result.id | string | Yes | payment widget id. |
result.cryptoCurrencies | array | Yes | contains list of crypto currencies of which invoices may be created for this payment widget |
result.widgetType | string | Yes | type of payment widget [SINGLE_FIAT, UNLIMITED_LINKED] |
result.fiatCurrency | string | Yes | fiat currency of the widget [ USD, EUR ] |
result.fiatAmount | number | Yes | total amount in fiat currency for invoice created from this payment widget |
result.description | string | Yes | description of payment widget |
result.useLiquidity | boolean | Yes | defines whether fee for transaction for future invoices will be charged from liquidity wallet of Calypso (true) or from merchant wallet (false) |
result.upperCommission | boolean | Yes | defines whether network transaction fee for transfer from invoice wallet to your wallet will be substracted from transfer amount (false) or not (true). true is by default. |
result.logoUrl | string | No | link to the logo of merchant which will be shown in the payment widget page. The logo must be in PNG format. Recommended size 100*24 px |
result.redirectUrl | string | No | link to the web page where client can come back to from payment widget page |
result.supportUrl | string | No | link to the merchant support page where client can go to from payment widget page |
result.expiration | string | No | represents server timestamp of payment widget expiration moment. |
result.idempotencyKey | string | No | the external id that can be generated by user while creating the payment widget. |
result.externalId | string | No | merchant ID that can be assigned to one or several payment widgets in string format. |
result.cartItems | array | Yes | list of line items. |
result.cartItems.currency | string | Yes | this is the currency associated with the price field. [ BNB, BTC, BUSD, BUSD_ETH, DAI, ETH, EUR, FRAX, KZT, MATIC, RUB, TRX, UAH, USD, USDC, USDT, USDT_MATIC, USDT_TRX, XDG, BTC_LNG, USDT_BSC ] |
result.cartItems.price | number | Yes | price of this unit. |
result.cartItems.product | string | Yes | name of this unit. |
result.cartItems.quantity | number | Yes | line item number of units. |
result.invoices | array | Yes | contains list of invoices created from this payment widget. |
result.invoices.invoiceId | number | Yes | id of invoice created from this payment widget. |
result.invoices.cryptoCurrency | string | Yes | represents the currency of the invoice [ BNB, BTC, BUSD, BUSD_ETH, DAI, ETH, FRAX, MATIC, TRX, USDC, USDT, USDT_MATIC, USDT_TRX, XDG, BTC_LNG, USDT_BSC ] |
result.invoices.invoiceIdempotencyKey | string | Yes | the external id of the invoice |
result.invoices.invoiceExternalId | string | No | merchant ID of the invoice |
result.createdDate | string | Yes | time of payment widget creation |
Get All Unlimited Linked payment widgets
Request
curl --location --request POST 'https://public-gateway.calypso.finance/api/v1/pub/payment-widget/unlimited-linked/all' \
--header 'Key: <your_api_key>' \
--header 'Sign: <your_sign>' \
--header 'Content-Type: application/json' \
--data-raw '{
"nonce": 0,
"request": {
widgetStates": [
"IN_PROGRESS"
],
"pageNumber": 1,
"size": 10
}
}'
Response
{
"result": [
{
"id": "3fa85f64-5717-4562-b3fc-2c963f66afa6",
"cryptoCurrencies": [
"BTC"
],
"description": "string",
"widgetType": "SINGLE_FIAT",
"widgetState": "IN_PROGRESS",
"useLiquidity": true,
"upperCommission": true,
"logoUrl": "string",
"returnUrl": "string",
"supportUrl": "string",
"expiration": "2022-10-10T16:35:58.304Z",
"idempotencyKey": "3fa85f64-5717-4562-b3fc-2c963f66afa6",
"externalId": "string",
"invoices": [
{
"invoiceId": 0,
"cryptoCurrency": "BTC",
"invoiceIdempotencyKey": "3fa85f64-5717-4562-b3fc-2c963f66afa6",
"invoiceExternalId": "string"
}
],
"createdDate": "2022-10-10T16:35:58.304Z"
}
],
"page": 0,
"size": 0,
"total": 0,
"totalElements": 0
}
This endpoint retrieves all Unlimited Linked payment widgets.
HTTP Request
POST https://public-gateway.calypso.finance/api/v1/pub/payment-widget/unlimited-linked/all
Header
Parameter | Type | Mandatory | Description |
---|---|---|---|
Key | STRING | Yes | <your_api_key> |
Sign | STRING | Yes | <your_sign> |
Content-Type | STRING | Yes | must be set to application/json for requests to the Calypso API |
Request Body
parameter | type | mandatory | description |
---|---|---|---|
nonce | number | Yes | nonce used in construction of sign header. |
request | object | Yes | this object contains request details. |
request.widgetStates | array | No | specify the status of result to return |
request.pageNumber | number | Yes | specify the page of results to return. |
request.size | number | Yes | a numeric value indicating the page size. |
Response Body
parameter | type | mandatory | description |
---|---|---|---|
result | array | Yes | this object contains response details. |
result.id | string | Yes | payment widget id. |
result.cryptoCurrencies | array | Yes | contains list of crypto currencies of which invoices may be created for this payment widget |
result.widgetType | string | Yes | type of payment widget [SINGLE_FIAT, UNLIMITED_LINKED] |
result.description | string | Yes | description of payment widget |
result.useLiquidity | boolean | Yes | defines whether fee for transaction for future invoices will be charged from liquidity wallet of Calypso (true) or from merchant wallet (false) |
result.upperCommission | boolean | Yes | defines whether network transaction fee for transfer from invoice wallet to your wallet will be substracted from transfer amount (false) or not (true). true is by default. |
result.logoUrl | string | No | link to the logo of merchant which will be shown in the payment widget page. The logo must be in PNG format. Recommended size 100*24 px |
result.redirectUrl | string | No | link to the web page where client can come back to from payment widget page |
result.supportUrl | string | No | link to the merchant support page where client can go to from payment widget page |
result.expiration | string | No | represents server timestamp of payment widget expiration moment. |
result.idempotencyKey | string | No | the external id that can be generated by user while creating the payment widget. |
result.externalId | string | No | merchant ID that can be assigned to one or several payment widgets in string format. |
result.invoices | array | Yes | contains list of invoices created from this payment widget. |
result.invoices.invoiceId | number | Yes | id of invoice created from this payment widget. |
result.invoices.cryptoCurrency | string | Yes | represents the currency of the invoice [ BNB, BTC, BUSD, BUSD_ETH, DAI, ETH, FRAX, MATIC, TRX, USDC, USDT, USDT_MATIC, USDT_TRX, XDG, BTC_LNG, USDT_BSC ] |
result.invoices.invoiceIdempotencyKey | string | Yes | the external id of the invoice |
result.invoices.invoiceExternalId | string | No | merchant ID of the invoice |
result.createdDate | string | Yes | time of payment widget creation |
page | number | Yes | result page number. |
size | number | Yes | a numeric value indicating the page size. |
total | number | Yes | the total number of pages matching the query. |
totalElements | number | Yes | the total number of objects matching the query. |
Get Unlimited Linked payment widget By ID
Request
curl --location --request POST 'https://public-gateway.calypso.finance/api/v1/pub/payment-widget/unlimited-linked/find' \
--header 'Key: <your_api_key>' \
--header 'Sign: <your_sign>' \
--header 'Content-Type: application/json' \
--data-raw '{
"nonce": 0,
"request": {
"requestId": "3fa85f64-5717-4562-b3fc-2c963f66afa6"
}
}'
Response
{
"id": "3fa85f64-5717-4562-b3fc-2c963f66afa6",
"cryptoCurrencies": [
"BTC"
],
"description": "string",
"widgetType": "SINGLE_FIAT",
"widgetState": "IN_PROGRESS",
"useLiquidity": true,
"upperCommission": true,
"logoUrl": "string",
"returnUrl": "string",
"supportUrl": "string",
"expiration": "2022-10-10T16:39:59.615Z",
"idempotencyKey": "3fa85f64-5717-4562-b3fc-2c963f66afa6",
"externalId": "string",
"invoices": [
{
"invoiceId": 0,
"cryptoCurrency": "BTC",
"invoiceIdempotencyKey": "3fa85f64-5717-4562-b3fc-2c963f66afa6",
"invoiceExternalId": "string"
}
],
"createdDate": "2022-10-10T16:39:59.615Z"
}
This endpoint retrieves an Unlimited Linked payment widget by id.
HTTP Request
POST https://public-gateway.calypso.finance/api/v1/pub/payment-widget/unlimited-linked/find
Header
Parameter | Type | Mandatory | Description |
---|---|---|---|
Key | STRING | Yes | <your_api_key> |
Sign | STRING | Yes | <your_sign> |
Content-Type | STRING | Yes | must be set to application/json for requests to the Calypso API |
Request Body
parameter | type | mandatory | description |
---|---|---|---|
nonce | number | Yes | nonce used in construction of sign header. |
request | object | Yes | this object contains request details. |
request.requestId | string | Yes | id of the payment widget. |
Response Body
parameter | type | mandatory | description |
---|---|---|---|
result | array | Yes | this object contains response details. |
result.id | string | Yes | payment widget id. |
result.cryptoCurrencies | array | Yes | contains list of crypto currencies of which invoices may be created for this payment widget |
result.widgetType | string | Yes | type of payment widget [SINGLE_FIAT, UNLIMITED_LINKED] |
result.description | string | Yes | description of payment widget |
result.useLiquidity | boolean | Yes | defines whether fee for transaction for future invoices will be charged from liquidity wallet of Calypso (true) or from merchant wallet (false) |
result.upperCommission | boolean | Yes | defines whether network transaction fee for transfer from invoice wallet to your wallet will be substracted from transfer amount (false) or not (true). true is by default. |
result.logoUrl | string | No | link to the logo of merchant which will be shown in the payment widget page. The logo must be in PNG format. Recommended size 100*24 px |
result.redirectUrl | string | No | link to the web page where client can come back to from payment widget page |
result.supportUrl | string | No | link to the merchant support page where client can go to from payment widget page |
result.expiration | string | No | represents server timestamp of payment widget expiration moment. |
result.idempotencyKey | string | No | the external id that can be generated by user while creating the payment widget. |
result.externalId | string | No | merchant ID that can be assigned to one or several payment widgets in string format. |
result.invoices | array | Yes | contains list of invoices created from this payment widget. |
result.invoices.invoiceId | number | Yes | id of invoice created from this payment widget. |
result.invoices.cryptoCurrency | string | Yes | represents the currency of the invoice [ BNB, BTC, BUSD, BUSD_ETH, DAI, ETH, FRAX, MATIC, TRX, USDC, USDT, USDT_MATIC, USDT_TRX, XDG, BTC_LNG, USDT_BSC ] |
result.invoices.invoiceIdempotencyKey | string | Yes | the external id of the invoice |
result.invoices.invoiceExternalId | string | No | merchant ID of the invoice |
result.createdDate | string | Yes | time of payment widget creation |
Create new Unlimited Linked payment widget
Request
curl --location --request POST 'https://public-gateway.calypso.finance/api/v1/pub/payment-widget/single-fiat/create' \
--header 'Key: <your_api_key>' \
--header 'Sign: <your_sign>' \
--header 'Content-Type: application/json' \
--data-raw '{
"nonce": 0,
"request": {
"cryptoCurrencies": [
"BTC"
],
"description": "string",
"useLiquidity": true,
"upperCommission": true,
"logoUrl": "string",
"returnUrl": "string",
"supportUrl": "string",
"expiration": "2022-10-10T16:41:16.027Z",
"idempotencyKey": "3fa85f64-5717-4562-b3fc-2c963f66afa6",
"externalId": "string"
}
}'
Response
{
"id": "3fa85f64-5717-4562-b3fc-2c963f66afa6",
"cryptoCurrencies": [
"BTC"
],
"description": "string",
"widgetType": "SINGLE_FIAT",
"widgetState": "IN_PROGRESS",
"useLiquidity": true,
"upperCommission": true,
"logoUrl": "string",
"returnUrl": "string",
"supportUrl": "string",
"expiration": "2022-10-10T16:41:16.073Z",
"idempotencyKey": "3fa85f64-5717-4562-b3fc-2c963f66afa6",
"externalId": "string",
"invoices": [
{
"invoiceId": 0,
"cryptoCurrency": "BTC",
"invoiceIdempotencyKey": "3fa85f64-5717-4562-b3fc-2c963f66afa6",
"invoiceExternalId": "string"
}
],
"createdDate": "2022-10-10T16:41:16.073Z"
}
This endpoint creates a new Unlimited Linked payment widget.
HTTP Request
POST https://public-gateway.calypso.finance/api/v1/pub/payment-widget/unlimited-linked/create
Header
Parameter | Type | Mandatory | Description |
---|---|---|---|
Key | STRING | Yes | <your_api_key> |
Sign | STRING | Yes | <your_sign> |
Content-Type | STRING | Yes | must be set to application/json for requests to the Calypso API |
Request Body
name | type | mandatory | description |
---|---|---|---|
nonce | number | Yes | nonce used in construction of sign header. |
request | object | Yes | this object contains request details. |
request.description | string | Yes | description of payment widget |
request.cryptoCurrencies | array | Yes | currency of merchant's wallets where funds will be withdrawn to [ BNB, BTC, BUSD, BUSD_ETH, DAI, ETH, FRAX, MATIC, TRX, USDC, USDT, USDT_MATIC, USDT_TRX, XDG, BTC_LNG, USDT_BSC ] |
request.useLiquidity | boolean | Yes | defines whether fee for transaction for future invoices will be charged from liquidity wallet of Calypso (true) or from merchant wallet (false) |
request.upperCommission | boolean | Yes | defines whether network transaction fee for transfer from invoice wallet to your wallet will be substracted from transfer amount (false) or not (true). true is by default. |
request.logoUrl | string | No | link to the logo of merchant which will be shown in the payment widget page. The logo must be in PNG format. Recommended size 100*24 px |
request.redirectUrl | string | No | link to the web page where client can come back to from payment widget page |
request.supportUrl | string | No | link to the merchant support page where client can go to from payment widget page |
request.expiration | string | No | represents server timestamp of payment widget expiration moment. |
request.idempotencyKey | string | No | the external id that can be generated by user while creating the payment widget. |
request.externalId | string | No | merchant ID that can be assigned to one or several payment widgets in string format. |
Response Body
parameter | type | mandatory | description |
---|---|---|---|
result | array | Yes | this object contains response details. |
result.id | string | Yes | payment widget id. |
result.cryptoCurrencies | array | Yes | contains list of crypto currencies of which invoices may be created for this payment widget |
result.widgetType | string | Yes | type of payment widget [SINGLE_FIAT, UNLIMITED_LINKED] |
result.fiatCurrency | string | Yes | fiat currency of the widget [ USD, EUR ] |
result.fiatAmount | number | Yes | total amount in fiat currency for invoice created from this payment widget |
result.description | string | Yes | description of payment widget |
result.useLiquidity | boolean | Yes | defines whether fee for transaction for future invoices will be charged from liquidity wallet of Calypso (true) or from merchant wallet (false) |
result.upperCommission | boolean | Yes | defines whether network transaction fee for transfer from invoice wallet to your wallet will be substracted from transfer amount (false) or not (true). true is by default. |
result.logoUrl | string | No | link to the logo of merchant which will be shown in the payment widget page. The logo must be in PNG format. Recommended size 100*24 px |
result.redirectUrl | string | No | link to the web page where client can come back to from payment widget page |
result.supportUrl | string | No | link to the merchant support page where client can go to from payment widget page |
result.expiration | string | No | represents server timestamp of payment widget expiration moment. |
result.idempotencyKey | string | No | the external id that can be generated by user while creating the payment widget. |
result.externalId | string | No | merchant ID that can be assigned to one or several payment widgets in string format. |
result.cartItems | array | Yes | list of line items. |
result.cartItems.currency | string | Yes | this is the currency associated with the price field. [ BNB, BTC, BUSD, BUSD_ETH, DAI, ETH, EUR, FRAX, KZT, MATIC, RUB, TRX, UAH, USD, USDC, USDT, USDT_MATIC, USDT_TRX, XDG, BTC_LNG, USDT_BSC ] |
result.cartItems.price | number | Yes | price of this unit. |
result.cartItems.product | string | Yes | name of this unit. |
result.cartItems.quantity | number | Yes | line item number of units. |
result.invoices | array | Yes | contains list of invoices created from this payment widget. |
result.invoices.invoiceId | number | Yes | id of invoice created from this payment widget. |
result.invoices.cryptoCurrency | string | Yes | represents the currency of the invoice [ BNB, BTC, BUSD, BUSD_ETH, DAI, ETH, FRAX, MATIC, TRX, USDC, USDT, USDT_MATIC, USDT_TRX, XDG, BTC_LNG, USDT_BSC ] |
result.invoices.invoiceIdempotencyKey | string | Yes | the external id of the invoice |
result.invoices.invoiceExternalId | string | No | merchant ID of the invoice |
result.createdDate | string | Yes | time of payment widget creation |
Webhooks
The Webhooks API allows you to subscribe to events happening with your created objects (Invoices or Payouts) in Calypso. Rather than making an API call to check status of invoice or payout during processing, Calypso can send an HTTP request to an endpoint you configure. You can configure subscribed events using the endpoints detailed below.
How it works?
In order to receive notifications you should send a POST request to the create webhook endpoint where you should transmit URL where you want to receive POST requests with event data from Calypso and event types or group of event types for which you need to receive notifications.
Then when one of events for which you have subscription happens, Calypso sends a POST request to the configured URL with data about the event.
You can manage your subscription using the delete webhook endpoint and the change webhook endpoint.
There is the get list of webhook subscriptions endpoint in order to get information about events and URLs you have a subscription.
Retry policy
If the receiving party returned an error when sending the webhook to the configured URL, Calypso will be trying to resend the webhook. The first retry will be occured in 30 seconds. The next retries will be proceeded in Fibonacci sequence: 30 s, 60 s, 90 s, 150 s, 240 s and so on. The last period of retry is 125 430 s (~ 34 hours). The last webhook will try to be resent after 125 430 s and then will be stopped. There are 19 retries in total.
Types of Events
Calypso supports a number of different event types, and you can filter your notification requests depending on types or group of events you send in the request.
There are two ways to subscribe to notifications. You can send values in one of following fields (or in both) using a POST request to the create webhook endpoint:
- notificationServiceTypes - groups of possible event types: [INVOICE, PAYOUT, RECURRENT]. Send values in this field to subscribe to all events of chosen group. See list of events in each group below in the section Events by group.
- notificationEventTypes - event types for which you can receive notifications. Send values in this field to subscribe to particular events. See list of events below in the section Events by group.
Events by group
INVOICE
Event type | Description |
---|---|
INVOICE_CREATE_INVOICE | New single invoice has been created |
INVOICE_CREATE_UNLIMITED_INVOICE | New unlimited invoice has been created |
INVOICE_FUNDS_RECEIVED_FOR_INVOICE | Funds have been received to invoice wallet |
INVOICE_TRANSLATION_TO_WALLET_COMPLETED | Funds have been received from invoice wallet to hot wallet |
INVOICE_PENDING_INTERVENTION | Invoice has changed state to INVOICE_PENDING_INTERVENTION. Either more or less funds was received to the invoice wallet than required |
INVOICE_FAILED | Not enough funds in base currency for token invoice in order to send money from invoice wallet to your wallet |
INVOICE_EXPIRED | Invoice expiration date has expired. |
INVOICE_PAID | Invoice successfully paid. All required amount has been received to invoice wallet. |
INVOICE_MEMPOOL_FOUND | Invoice transaction has been found in mempool but still not confirmed in blockchain. |
PAYOUT
Event type | Description |
---|---|
PAYOUT_CHANGE_STATUS | Payout has changed state to In Progress, Canceled, Failed or Completed |
PAYOUT_CONFIRMED | Payout has changed state to Confirmed |
PAYOUT_SPEEDED_UP | Payout has been speeded up |
PAYOUT_VALIDATION_ERROR | Validation error has been occurred during payout processing |
PAYOUT_WITHDRAWALS_CREATING_VALIDATION_ERROR | Mass payout is failed because of the validation error in it withdrawal(s) |
PAYOUT_ETHEREUM_APPROVAL_VALIDATION_ERROR | Error in mass payout during transaction validation in blockchain (Ethereum only) |
RECURRENT
Event type | Description |
---|---|
RECURRENT_ARCHIVED | Subscription has changed state to Archived |
RECURRENT_CREATED | New recurrent subscription was created |
RECURRENT_CANCELLED | Subscription has been cancelled by the client |
RECURRENT_PAUSED | Subscription has changed state to Paused |
RECURRENT_ACTIVATED | Subscription has changed state to Active |
RECURRENT_NEARING_COMPLETION | Subscription is about to end. The notification occurs in case if 3 days before the end of the subscription period. |
RECURRENT_PAYMENT_CREATED | New subscription payment has been created. |
RECURRENT_PAYMENT_COMPLETED | Subscription payment has changed state to Completed |
RECURRENT_PAYMENT_FAILED | Subscription payment has changed state to Failed |
RECURRENT_PAYMENT_NOT_ENOUGHT_BALANCE | Not enough balance on client address for subscription payment transaction. The notification can be sent in the moment of payment and 3 days before payment. |
RECURRENT_PAYMENT_NOT_ENOUGHT_ALLOWANCE | Not enough allowed funds on client address for subscription payment transaction. The notification can be sent in the moment of payment and 3 days before payment. |
RECURRENT_PAYMENT_TRANSFER_FROM_FAILED | Error occurred during transferFrom message sending |
Webhook payload
Webhook payload example
{
"requestId": "bf9348b7-2c14-46d7-868c-b597852da319",
"id": 1,
"createdDate": "2022-03-15T12:13:05.909616",
"level": "SUCCESS",
"service": "INVOICE",
"eventType": "INVOICE_CREATE_INVOICE",
"data": {
"parentExternalId": 3,
"amount": 0.01,
"currency": "ETH",
"message": "Invoice example",
"createdDate": "2022-03-15T12:13:03.157015",
"type": "INVOICE_CREATE_INVOICE",
"idempotencyKey": "5b0ca8da-6af4-4a1c-9efd-5cbfc19ace09"
}
}
Webhooks deliver the responses to your service in JSON format. The parameters that webhook payload inludes are listed in the table below.
Parameter | Type | Mandatory | Description |
---|---|---|---|
requestId | string | Yes | id of the request that created webhook subscription. |
id | number | Yes | id of the event. |
createdDate | string | Yes | creation date of the event. |
level | string | Yes | level of the notification for the event. [SUCCESS, INFO, WARNING] |
service | string | Yes | group of events which the event belongs to. |
data | object | Yes | set of data depending on the event type. See list of field for each event type below. |
Data object depending on event type
INVOICE_CREATE_INVOICE
Parameter | Type | Description |
---|---|---|
type | string | event type: INVOICE_CREATE_INVOICE |
amount | number | money amount of the created invoice. |
message | string | text of the invoice. |
currency | string | currency of the invoice. [ BNB, BTC, BUSD, BUSD_ETH, DAI, ETH, FRAX, MATIC, TRX, USDC, USDT, USDT_MATIC, USDT_TRX, XDG, BTC_LNG, USDT_BSC ] |
parentExternalId | number | system id of the invoice. |
createdDate | string | date and time of invoice creation |
idempotencyKey | string | the external id that was generated while invoice creating through api. |
externalId | string | merchant ID of invoice |
INVOICE_CREATE_UNLIMITED_INVOICE
Parameter | Type | Description |
---|---|---|
type | string | event type: INVOICE_CREATE_UNLIMITED_INVOICE |
message | string | text of the invoice. |
currency | string | currency of the invoice. [ BNB, BTC, BUSD, BUSD_ETH, DAI, ETH, FRAX, MATIC, TRX, USDC, USDT, USDT_MATIC, USDT_TRX, XDG, BTC_LNG, USDT_BSC ] |
parentExternalId | number | system id of the invoice. |
createdDate | string | date and time of invoice creation |
idempotencyKey | string | the external id that was generated while invoice creating through api. |
externalId | string | merchant ID of invoice |
INVOICE_FUNDS_RECEIVED_FOR_INVOICE
Parameter | Type | Description |
---|---|---|
type | string | event type: INVOICE_FUNDS_RECEIVED_FOR_INVOICE |
amount | number | amount of recieved money to invoice wallet. |
message | string | text of the invoice. |
currency | string | currency of the invoice. [ BNB, BTC, BUSD, BUSD_ETH, DAI, ETH, FRAX, MATIC, TRX, USDC, USDT, USDT_MATIC, USDT_TRX, XDG, BTC_LNG, USDT_BSC ] |
parentExternalId | number | system id of the invoice. |
createdDate | string | date and time of invoice creation. |
senderAddress | string | wallet address from where funds were sent. |
idempotencyKey | string | the external id that was generated while invoice creating through api. |
externalId | string | merchant ID of invoice |
INVOICE_TRANSLATION_TO_WALLET_COMPLETED
Parameter | Type | Description |
---|---|---|
type | string | event type: INVOICE_TRANSLATION_TO_WALLET_COMPLETED |
amount | number | money amount of the invoice. |
realAmount | number | real amount of money received on the merchant wallet. |
message | string | text of the invoice. |
currency | string | currency of the invoice. [ BNB, BTC, BUSD, BUSD_ETH, DAI, ETH, FRAX, MATIC, TRX, USDC, USDT, USDT_MATIC, USDT_TRX, XDG, BTC_LNG, USDT_BSC ] |
parentExternalId | number | system id of the invoice. |
createdDate | string | date and time of invoice creation. |
senderAddress | string | invoice wallet address from where funds were sent. |
walletParameter | string | hot wallet Parameter where funds were sent. |
walletAddress | string | hot wallet address where funds were sent. |
idempotencyKey | string | the external id that was generated while invoice creating through api. |
externalId | string | merchant ID of invoice |
INVOICE_PENDING_INTERVENTION
Parameter | Type | Description |
---|---|---|
type | string | Event type: INVOICE_PENDING_INTERVENTION |
message | string | text of the invoice. |
parentExternalId | number | system id of the invoice. |
idempotencyKey | string | the external id that was generated while invoice creating through api. |
externalId | string | merchant ID of invoice |
INVOICE_FAILED
Parameter | Type | Description |
---|---|---|
parentExternalId | number | system id of the invoice. |
idempotencyKey | string | the external id that was generated while invoice creating through api. |
amount | number | money amount of the invoice. |
currency | string | currency of the invoice. [ BNB, BTC, BUSD, BUSD_ETH, DAI, ETH, FRAX, MATIC, TRX, USDC, USDT, USDT_MATIC, USDT_TRX, XDG, BTC_LNG, USDT_BSC ] |
message | string | description of the invoice. |
createdDate | string | date and time of invoice creation. |
transactionHash | string | hash of the incoming transaction to the invoice wallet. |
notEnoughFundsForTokenFeeAmount | number | amount of money that is unsufficient on your main wallet for transaction fee |
feeCurrency | string | currency of the transaction fee for operation. [ BNB, BTC, ETH, MATIC, TRX, XDG ] |
externalId | string | merchant ID of invoice |
INVOICE_EXPIRED
Parameter | Type | Description |
---|---|---|
type | string | Event type: INVOICE_EXPIRED |
parentExternalId | number | system id of the invoice. |
idempotencyKey | string | the external id that was generated while invoice creating through api. |
amount | number | money amount of the invoice. |
currency | string | currency of the invoice. [ BNB, BTC, BUSD, BUSD_ETH, DAI, ETH, FRAX, MATIC, TRX, USDC, USDT, USDT_MATIC, USDT_TRX, XDG, BTC_LNG, USDT_BSC ] |
message | string | description of the invoice. |
createdDate | string | date and time of invoice creation. |
expirationDate | string | date and time of invoice expiration. |
externalId | string | merchant ID of invoice |
INVOICE_PAID
Parameter | Type | Description |
---|---|---|
amount | number | money amount of the invoice. |
currency | string | currency of the invoice. [ BNB, BTC, BUSD, BUSD_ETH, DAI, ETH, FRAX, MATIC, TRX, USDC, USDT, USDT_MATIC, USDT_TRX, XDG, BTC_LNG, USDT_BSC ] |
description | string | description of the invoice. |
externalId | string | merchant ID of invoice |
fiatAmount | number | amount in fiat currency if it was set in fiat. |
fiatCurrency | string | fiat currency of the invoice if it was set in fiat. [ USDT, EUR ] |
idempotencyKey | string | the external id that was generated while invoice creating through api. |
parentExternalId | number | system id of the invoice. |
payAmount | number | amount to pay for invoice completing. |
realAmount | number | amount of money that clien really paid for the invoice. |
type | string | Event type: INVOICE_PAID. |
INVOICE_MEMPOOL_FOUND
Parameter | Type | Description |
---|---|---|
amount | number | money amount of the invoice. |
currency | string | currency of the invoice. [ BNB, BTC, BUSD, BUSD_ETH, DAI, ETH, FRAX, MATIC, TRX, USDC, USDT, USDT_MATIC, USDT_TRX, XDG, BTC_LNG, USDT_BSC ] |
description | string | description of the invoice. |
externalId | string | merchant ID of invoice |
fiatAmount | number | amount in fiat currency if it was set in fiat. |
fiatCurrency | string | fiat currency of the invoice if it was set in fiat. [ USDT, EUR ] |
idempotencyKey | string | the external id that was generated while invoice creating through api. |
parentExternalId | number | system id of the invoice. |
payAmount | number | amount to pay for invoice completing. |
realAmount | number | amount of money that clien really paid for the invoice. |
type | string | Event type: INVOICE_MEMPOOL_FOUND. |
createdDate | string | date and time of invoice creation. |
transactionHash | string | hash of the incoming transaction to the invoice wallet. |
PAYOUT_CHANGE_STATUS
Parameter | Type | Description |
---|---|---|
hash | string | transaction hash. |
type | string | event type: PAYOUT_CHANGE_STATUS. |
parentExternalId | number | system id of the payout. |
createdDate | string | date and time of payout creation. |
payoutStatus | string | current state of the payout. |
idempotencyKey | string | the external id that was generated while payout creating through api. |
PAYOUT_CONFIRMED
Parameter | Type | Description |
---|---|---|
type | string | event type: PAYOUT_CONFIRMED. |
parentExternalId | number | system id of the payout. |
createdDate | string | date and time of payout creation. |
approved | array | list of users who approved the payout. |
idempotencyKey | string | the external id that was generated while payout creating through api. |
PAYOUT_SPEEDED_UP
Parameter | Type | Description |
---|---|---|
type | string | Event type: PAYOUT_SPEEDED_UP. |
parentExternalId | number | system id of the payout. |
createdDate | string | date and time of payout creation. |
speededUpParameter | string | user who speeded up the payout transaction. |
idempotencyKey | string | the external id that was generated while payout creating through api. |
PAYOUT_VALIDATION_ERROR
Parameter | Type | Description |
---|---|---|
type | string | event type: PAYOUT_VALIDATION_ERROR. |
parentExternalId | number | system id of the payout. |
message | string | validation error message. |
createdDate | string | date and time of payout creation. |
dealWithdrawalId | number | system id of withdrawal where validation error occured. |
validationStatus | string | the reason of validation error. |
idempotencyKey | string | the external id that was generated while payout creating through api. |
PAYOUT_WITHDRAWALS_CREATING_VALIDATION_ERROR
Parameter | Type | Description |
---|---|---|
parentExternalId | number | system id of the payout. |
idempotencyKey | string | the external id that was generated while payout creating through api. |
message | string | validation error message. |
Webhook api
Get List Of Webhook Subscriptions
Request
curl --silent --location --request POST "https://public-gateway.calypso.finance/api/v1/pub/subscription/webhook" \
--header 'Key: <your_api_key>' \
--header 'Sign: <your_sign>' \
--header "Content-Type: application/json" \
--data-raw "{
"nonce": 0
}"
Response
{
"subscriptions": [
{
"notificationEventTypes": [
"PAYOUT"
],
"requestId": "3fa85f64-5717-4562-b3fc-2c963f66afa6",
"url": "string"
}
]
}
This endpoint retrieves list of webhook subscriptions.
HTTP Request
POST https://public-gateway.calypso.finance/api/v1/pub/subscription/webhook
Header
Parameter | Type | Mandatory | Description |
---|---|---|---|
Key | STRING | Yes | <your_api_key> |
Sign | STRING | Yes | <your_sign> |
Content-Type | STRING | Yes | must be set to application/json for requests to the Calypso API |
Request Body
Parameter | Type | Mandatory | Description |
---|---|---|---|
nonce | NUMBER | Yes | Nonce used in construction of Sign header. |
Response Body
Parameter | Type | Mandatory | Description |
---|---|---|---|
subscriptions | array | Yes | array of webhook settings. |
subscriptions.notificationEventTypes | array | Yes | array of event types for webhook subscription. See Event types section for full list of values. |
subscriptions.requestId | string | Yes | id of the request that has created webhook subscription. |
subscriptions.url | string | Yes | web address where request with webhook will be send to. |
Create Webhook
Request
curl --location --request POST 'https://public-gateway.calypso.finance/api/v1/pub/subscription/webhook/create' \
--header 'Key: <your_api_key>' \
--header 'Sign: <your_sign>' \
--header 'Content-Type: application/json' \
--data-raw '{
"nonce": 0,
"request": {
"notificationEventTypes": [
"INVOICE_CREATE_UNLIMITED_INVOICE"
],
"notificationServiceTypes": [
"INVOICE"
],
"requestId": "bf9348b7-2c14-46d7-868c-b597852da319",
"url": "string"
}
}'
Response
{
"notificationEventTypes": [
"INVOICE_CREATE_UNLIMITED_INVOICE"
],
"requestId": "3fa85f64-5717-4562-b3fc-2c963f66afa6",
"url": "string"
}
This endpoint creates a subscription to events.
HTTP Request
POST https://public-gateway.calypso.finance/api/v1/pub/subscription/webhook/create
Header
Parameter | Type | Mandatory | Description |
---|---|---|---|
Key | STRING | Yes | <your_api_key> |
Sign | STRING | Yes | <your_sign> |
Content-Type | STRING | Yes | must be set to application/json for requests to the Calypso API |
Request Body
Parameter | Type | Mandatory | Description |
---|---|---|---|
nonce | number | Yes | nonce used in construction of sign header. |
request | object | Yes | this object contains request details. |
request.notificationEventTypes | array | No | array of event types for webhook subscription. See Event types section for full list of values. |
request.notificationServiceTypes | array | No | array of groups of the events for webhook subscription. If the value is set, a subscription is created for all types of events in this group. [INVOICE, PAYOUT] |
request.requestId | string | Yes | id of the request that has created webhook subscription. |
request.url | string | Yes | web address where request with webhook will be send to. |
Response Body
Parameter | Type | Mandatory | Description |
---|---|---|---|
notificationEventTypes | array | Yes | array of event types for webhook subscription. See Event types section for full list of values. |
requestId | string | Yes | id of the request that has created webhook subscription. |
url | string | Yes | web address where request with webhook will be send to. |
Change Webhook
Request
curl --location --request POST 'https://public-gateway.calypso.finance//api/v1/pub/subscription/webhook/change' \
--header 'Key: <your_api_key>' \
--header 'Sign: <your_sign>' \
--header 'Content-Type: application/json' \
--data-raw '{
"nonce": 0,
"request": {
"notificationEventTypes": [
"INVOICE_CREATE_UNLIMITED_INVOICE"
],
"notificationServiceTypes": [
"INVOICE"
],
"requestId": "bf9348b7-2c14-46d7-868c-b597852da319",
"url": "string"
}
}'
Response
{
"notificationEventTypes": [
"INVOICE_CREATE_UNLIMITED_INVOICE"
],
"requestId": "3fa85f64-5717-4562-b3fc-2c963f66afa6",
"url": "string"
}
This endpoint changes a configuration of subscription.
HTTP Request
POST https://public-gateway.calypso.finance/api/v1/pub/subscription/webhook/change
Header
Parameter | Type | Mandatory | Description |
---|---|---|---|
Key | STRING | Yes | <your_api_key> |
Sign | STRING | Yes | <your_sign> |
Content-Type | STRING | Yes | must be set to application/json for requests to the Calypso API |
Request Body
Parameter | Type | Mandatory | Description |
---|---|---|---|
nonce | number | Yes | nonce used in construction of sign header. |
request | object | Yes | this object contains request details. |
request.notificationEventTypes | array | No | array of event types for webhook subscription. See Event types section for full list of values. |
request.notificationServiceTypes | array | No | array of groups of the events for webhook subscription. If the value is set, a subscription is created for all types of events in this group. [INVOICE, PAYOUT] |
request.requestId | string | Yes | id of the request that has created webhook subscription. |
request.url | string | Yes | web address where request with webhook will be send to. |
Response Body
Parameter | Type | Mandatory | Description |
---|---|---|---|
notificationEventTypes | array | Yes | array of event types for webhook subscription. See Event types section for full list of values. |
requestId | string | Yes | id of the request that has created webhook subscription. |
url | string | Yes | web address where request with webhook will be send to. |
Delete Webhook
Request
curl --location --request DELETE 'https://public-gateway.calypso.finance//api/v1/pub/subscription/webhook' \
--header 'Key: <your_api_key>' \
--header 'Sign: <your_sign>' \
--header 'Content-Type: application/json' \
--data-raw '{
"nonce": 0,
"request": {
"requestId": "3fa85f64-5717-4562-b3fc-2c963f66afa6"
}
}'
This endpoint deletes a subscription to events.
HTTP Request
DELETE https://public-gateway.calypso.finance/api/v1/pub/subscription/webhook
Header
Parameter | Type | Mandatory | Description |
---|---|---|---|
Key | STRING | Yes | <your_api_key> |
Sign | STRING | Yes | <your_sign> |
Content-Type | STRING | Yes | must be set to application/json for requests to the Calypso API |
Request Body
Parameter | Type | Mandatory | Description |
---|---|---|---|
nonce | number | Yes | nonce used in construction of sign header. |
request | object | Yes | this object contains request details. |
request.requestId | string | Yes | id of the request that has created webhook subscription. |
Errors
The format of errorr messages
{
"errorCode": "000",
"message": "Internal server error"
}
The Calypso API uses the following error codes:
errorCode | Message | Comment |
---|---|---|
000 | Internal server error | Error on system side. Please contact the support. |
001 | Bad request | Incorrect input data. |
002 | Invalid api key | Invalid public api key in request. |
003 | Wrong sign | Sign transmitted in request is built incorrectly. |
004 | Wallet with this address {address} does not exist | Error occurs when non-existent wallet address transmitted in request |
006 | Invoice is in incorrect state for operation | |
009 | Fee ratio of currency is not in range of min and max fee ratio | |
010 | Wallet doesn't belong to user company | |
011 | Invalid nonce parameter. Nonce value must be greater than previous one | |
012 | Invalid Payout state | |
014 | Invalid hot wallet currency | |
015 | Currency does not match wallet blockchain | |
016 | IdempotencyKey {idemmpotencyKeyUUID} already exists | In the payout creation request already used uuid for idempotency key is transmitted |
016 | Can not create deal. Validation failed | Validation error in payout creation. One or more request parameters were not validated |
028 | Can not create invoice payment for invoice 134. Allow only for UNLIMITED invoices | Error occures when in the request "create withdrawal from unlimited invoice" invoice of incorrect type is transmitted |
Payment Widget for CMS (Wordpress)
If you are using Content Management System Wordpress to run and maintain your web-application here you may find a manual how you can install and set Payment Widget via Admin Dashboard of Wordpress.
How to install the plugin
Download Payment Widget plugin for Wordpress using this link.
Login to your web-application Wordpress Admin Dashboard:
Go to the Plugins->Add new directory in the main menu:
Press Upload Plugin button, select/drag downloaded earlier .zip archive and press Install Now button:
After you successfully installed the plugin click Activate Plugin button to get access to plugin settings:
The plugin was succesfully installed and activated!
Plugin settings
You can access the Calypso Payment Widget plugin settings using corresponding main menu directory:
Description of settings
- Url - for production environment always use https://ui.calypso.finance/payment value
- Reusable Key - a reusable key with a limited validity period, which is generated by the user via the Public API using the api key.
- Currency - the currency in which the payment is made;
- Ethereum Wallet - the address of the ethereum wallet to which the funds from the invoice payment will be received;
- Bitcoin Wallet - the address of the bitcoin wallet to which the funds from the invoice payment will be received;
- Tron Wallet - the address of the tron wallet to which the funds from the invoice payment will be received;
- USDT Tron Wallet - the address of the tron wallet to which the funds from the invoice payment will be received in USDT;
- Full size - if selected, the full version of the widget will is displayed, if unselected, the mini version of the widget is shown.
How to add plugin on the page
To add plugin in your site’s web page:
Go to the Pages -> All pages directory in the main menu:
Select the page you want to add plugin to and click Edit button:
On the page select the space you want to add button for opening Payment Widget, click the + button, type in Shortcode and click on it to add the element on the page:
In Shortcode element add the following line of code:
[calypso-payment-widget-button description='' amount='']
Description of values:
- amount - the amount for which the payment is made;
- description - description or comment that is displayed in the widget;
Values must not be empty:
To save changes made on the page click Update button at the top-right corner:
Now Pay button is visible for your web-application users: