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.
|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.