0

I'm really new to crypto but I've been a dev for a long time now in App and Web Development. I have an app where I'd like to accept payments In ADA. My question is if there's a Cardano API to transfer ADA from one wallet to another using a backend server?

What I'd Like To Do: I'd like the user to click a button on my app and when that happens it'll transfer ADA from their wallet to mine. My NodeJS server would handle all requests.

What I've Tried: I've looked at cardano-wallet but I think it's for only making transactions that are made on your server?(sorry if this isn't correct). Is there a service where they can take the address of one wallet and send to another wallet that wasn't made on your server? Or is that what the new smart contract roll outs are for? Thanks

New contributor
A4_TS is a new contributor to this site. Take care in asking for clarification, commenting, and answering. Check out our Code of Conduct.
1
  • The way to go is to use a wallet that can connect to your app/website. So far there's only this one: github.com/Berry-Pool/nami-wallet but Yoroi should follow soon (I hope).
    – eddex
    2 days ago
0

You would never sign a transaction on your server on behalf of your users. Otherwise, this means they gave you access to their entire wallet. Which I believe many would/should not accept.

As a business, you would like to expose public addresses to your customers. Ideally, you would derive your private key for a new public address every time you have a new transaction. Remember, the private key is what gives you access to manage funds transferred to these addresses and you should keep it private.

After that, you need to receive the txs. On your side, you just need to wait and check the chain, through cardano-node or some other service (graphql, db-sync, etc).

You can facilitate this process integrating with the user's wallet for creating and signing the transaction. For instance, for Yoroi, you may try to integrate through their Service worker API and maybe Daedalus can accept some native deep links (not sure). More support coming soon for sure.

New contributor
Lucas Tourinho is a new contributor to this site. Take care in asking for clarification, commenting, and answering. Check out our Code of Conduct.

Your Answer

A4_TS is a new contributor. Be nice, and check out our Code of Conduct.

By clicking “Post Your Answer”, you agree to our terms of service, privacy policy and cookie policy

Not the answer you're looking for? Browse other questions tagged or ask your own question.