Payment
This section is dedicated to the generation & management of escrow wallet for a collection.
Last updated
This section is dedicated to the generation & management of escrow wallet for a collection.
Last updated
Collections are designed to be extensible, accommodating the setup of an escrow wallet. This flexibility means that not every collection necessarily requires an escrow wallet.
However, for scenarios where business logic mandates the use of a wallet, this section details each service that facilitates escrow management.
An escrow can be initiated as a one-time action for a collection, enabling the collection of funds. These deposits can subsequently undergo validation on-chain to confirm the receipt of funds.
Once the objectives of the collection or business logic are met, the funds can be disbursed to the recipients of the collection.
The following services are available:
To generate an escrow wallet, ICreatePaymentDto is needed.
The authorization jwt token is required for this operation.
coin
The crypto currency which the funds will be deposit.
see IPaymentCoins
collection
Identifier for the collection record for which the escrow wallet is being generated
string
The accepted cryptocurrency for which payment can be made and therefore, escrow wallets can be generated.
usdc
avax
See sample implementation:
Upon success, the IPaymentDataDto is returned.
coin
The cryptocurrency the funds are to be transacted
string
address
The address of the escrow
string
collectionAmount
The amount assigned to collection by the creator
string
collectionAmountCoin
The amount when converted by the rate for the coin
string
expectedFee
The fee to be paid
string
amountToPay
The total sum to be deposited, fee inclusive
string
usdFee
The business fee to be paid to the chainsite owner, based on the initial amount set
string
usdAmount
Amount to be paid inclusive of the business fee set by the chainsite owner
string
feePercentage
The chainsite owner fee, in percentage
number
rate
The exchange rate of the coin
number
chainId
The rpc chain id for the coin
string
When funds are transferred to the escrow wallet, this service is used to validate that the amount for that collection is confirmed.
The authorization jwt token is required for this operation.
The IValidatePaymentDto is required as the payload for this operation.
collection
Identifier for the collection record
string
See sample implementation:
When the objectives of the collection have been met, payment is released to the recipient of the collection.
The authorization jwt token is required for this operation.
IReleasePaymentDto is the payload to execute this service.
collection
Identifier for the collection record
string
amount
The funds to be released to the recipient
number
See sample implementation:
Retrieve active payment methods.
The authorization jwt token is required for this operation.
See sample implementation:
An array of IBlockchainCoinDto is returned, upon success.
name
The appellation for the crypto currency
symbol
The crypto currency ticker name
icon
Active link to the graphic of the crypto currency
contractAddress
The address that locates the deployed contract for the coin
decimal
The number of decimals for the coin
rpcChainId
The identifier for the network on the chain
isToken
Identifier to determine whether the coin is a token or a native coin
active
Identifer to determine whether the rpc is actively in use.
Retrieve the rpc that is currently active.
The authorization jwt token is required for this operation.
See sample implementation:
Upon success, IRPCDto is returned.
rpcName
The name of the RPC
rpcChainId
Identifier for the rpc on-chain
rpcUrls
The remote access link to the rpc
blockExplorerUrls
Link to the explorer to get transaction information, contract address information etc
rpcNativeCurrency
The native crypto currency object information for the RPC
rpcNativeCurrency.name
The name of the native crypto currency
rpcNativeCurrency.symbol
The ticker name for the native crypto currency
rpcNativeCurrency.decimals
The number of decimals for the crypto currency
active
Identifier to determine whether the rpc is active