Copy link
CPAY system components architecture
User component
This is one of the fundamental components of the system. All users are business users. Business is a type of user that is business-oriented, for example, in a retail environment. It is possible to create accounts up to 5, set up its commissions, integrate with a third-party system and create client wallets.
Account component
This is the main component of the system, around which the entire functional model of the system is built. Account is an entity for storing crypto wallets, which also makes it possible to accept payments in cryptocurrency. You can integrate CPAY into any system as a payment method using private and public key, which you can get in account settings.
Currency component
The component that is responsible for the list and functionality of cryptocurrencies in the system and their environment. This is the entry point for wallets replenishment, funds withdrawing, wallets creating, accounts creating, and checkouts creating.
Wallet component
Component responsible for creating and storing cryptocurrency wallets that the system supports. These wallets are linked to accounts created in the system.*
There are two types of wallets in the system: account wallets and client wallets. Account Wallet is a wallet that accepts funds from client wallets. Roughly speaking, this is the wallet of the business owner. You can create a new account wallets or import the existing wallet. Client Wallet is a wallet that is created when a customer pays for a product or service. A business owner can create a client wallet himself and reset it to a client for replenishment. Also, such wallets are generated when paying for a checkout: donation or sale. Each wallet in the system is unique, you cannot create two identical wallets.
Transaction component
A component that allows you to track the movement of funds in wallets. There are five types of transactions in the system:
- Replenishment;
- Withdraw;
- Refund - refunds to the system wallet for providing funds to pay for Miner Fee when the required amount of funds was not on the account's wallet;
The client's wallet, after its replenishment, sends all its funds to the account's wallet, while creating transaction for replenishment. The client wallet replenishment transaction is not created; - Multisend - the ability to send funds simultaneously to n number of wallets;
- Internal Transfer - the ability to transfer virtual funds from one client wallet to another via API.
- External calls - are the calls that you make from your smart contract to another smart contract.
Withdrawal component
A component that allows you to withdraw funds from the CPAY system to another wallet. You can withdraw funds both from the account's wallet and from the client's wallet (through API). In case of withdrawal from the client's wallet, the necessary funds are first sent from the account's wallet to the client's wallet (no transactions are created for this), and then a withdrawal transaction from the client's wallet will be created. You can also make simultaneous withdrawals to n wallets using multisend.
NFT component
A component that allows you to store, deposit into wallets and withdraw NFTs.
Checkout component
A component that allows you to create the checkout: donation, sale, sale token and cart. Donation is a payment without fixed sum. Sale is a payment that has fixed sum. Sale currency allows you to sell your currency. Cart is checkout that has no amount created, only fiat currency, amount is passed in the link as a parameter.You can create a checkout and send it. After clicking on the link, the user creates a charge.
Swap component
A component that allows users to exchange their currency that they have for another.
Recurring billing
Recurring billing is a payment model used when a subscription business charges a customer's crypto wallets for products or services on a regular billing schedule.