Skip to main content

CPAY system components architecture

User component

This is one of the fundamental components of the system. It is the connecting link with other components. Its main goal is to provide access to the creation of a merchant.

  • It is used in two variants:
    • Individual;
    • Business.

Individual is a type of user who operates only with the merchant's wallets, can accept, send payments, add new merchant wallets, create checkouts and swap currency. This user has only one merchant.*

Business is a type of user that is business-oriented, for example, in a retail environment. It is possible to create merchants up to 5, set up its commissions, integrate with a third-party system and create client wallets.

Merchant component

This is the main component of the system, around which the entire functional model of the system is built. Merchant 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 merchant 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, merchants creating, and checkouts creating.

Wallet component

Component responsible for creating and storing cryptocurrency wallets that the system supports. These wallets are linked to merchants created in the system.*

There are two types of wallets in the system: merchant wallets and client wallets. Merchant 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 merchant 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 merchant's wallet;
    The client's wallet, after its replenishment, sends all its funds to the merchant'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 merchant'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 merchant'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.