New to Moralis.. Features to integrate into my Dapp

Hi all,
Im new to solana and moralis… I’m wondering if Moralis can auto deduct our transaction fees we intend on charging users. Basically, we need to add a percentage of Solana to deduct users wallets. Would the javascript front-end then do the computations to first read the wallet balance to know how much is in users wallets then perform the deduction… or would the smart contract perform those computations? You can message me here or via email or Kiguzo on telegram or discord.

Thanks

you could use this API endpoint to get the balance of a wallet address

about that deduction, I don’t know how it could be done for Solana in particular, you want the user to pay x * 0.8 instead of x for a specific action?

Hi cryptokid, yes thats basically correct

after getting the balance, how do exchanges, sites like paxful charge users transaction fees?

what kind of exchange you want to do?

maybe it is needed a smart contract, or a 2 step transactions and you do the second transaction from your backend

well, it’s not really an exchange. What we need is a way to deduct a percentage from users wallets when they complete transactions.

can you give a more clear example? I’m not sure yet what you mean