Bitcoin Forum
April 19, 2024, 09:33:47 PM *
News: Latest Bitcoin Core release: 26.0 [Torrent]
 
   Home   Help Search Login Register More  
Pages: [1]
  Print  
Author Topic: Bitcoin wallet integration website deposits. Noob question  (Read 255 times)
kcDD (OP)
Newbie
*
Offline Offline

Activity: 3
Merit: 6


View Profile
December 20, 2019, 01:55:51 PM
Merited by LoyceV (2), hugeblack (2), joniboini (2)
 #1

Hi,

I want to integrate bitcoin deposits in to my website. Such that each user has a unique address and their account can be credited with "tokens" after depositing BTC and clearing confirmation.

I would like each users account to transfer BTC automatically to a single hot wallet after it has been received by their unique wallet. OR something to that effect. Currently I know of creating a database, generating a batch of keys using https://www.bitaddress.org/ or something and then using that file to populate user data.

Is there an easier way of doing this? Are there any APIs out there that don't require me to pay merchant fees?

Hope i'm in the right section. And hope someone can assist.

Thanks!
1713562427
Hero Member
*
Offline Offline

Posts: 1713562427

View Profile Personal Message (Offline)

Ignore
1713562427
Reply with quote  #2

1713562427
Report to moderator
No Gods or Kings. Only Bitcoin
Advertised sites are not endorsed by the Bitcoin Forum. They may be unsafe, untrustworthy, or illegal in your jurisdiction.
1713562427
Hero Member
*
Offline Offline

Posts: 1713562427

View Profile Personal Message (Offline)

Ignore
1713562427
Reply with quote  #2

1713562427
Report to moderator
DannyHamilton
Legendary
*
Offline Offline

Activity: 3360
Merit: 4570



View Profile
December 20, 2019, 02:24:32 PM
Merited by Jet Cash (5), LoyceV (4), joniboini (2), ABCbits (1), hugeblack (1), Heisenberg_Hunter (1)
 #2

Hi,

I want to integrate bitcoin deposits in to my website.

Great idea!

Such that each user has a unique address

No.

This is not the best way to handle it.  Users should not be re-using addresses to add additional funds to their account.  Instead, the user should be provided with a New Address for each transaction. You'll want to keep track of all the addresses you've ever given to a user, just in case they do something stupid and send to an address that they've sent to in the past, but your website should provide a new address for each funding transaction.

and their account can be credited with "tokens" after depositing BTC and clearing confirmation.

Correct.  You'll maintain a database of accounts and keep track of what the value is on each account as the users either add, remove, or use funds.

I would like each users account to transfer BTC automatically to a single hot wallet after it has been received by their unique wallet. OR something to that effect.

No.

The addresses that you give to users to fund their accounts should come from the cold wallet. That way, when the users send in the funds, they are already safely secured in the cold wallet.

Hot wallets are risky.  You do not want all your bitcoins sitting in a hot wallet.  You should only have enough bitcoins in a hot wallet for short term use, and only an amount that you can afford to lose. The rest of your bitcoins should be held in a cold wallet.  The hot wallet can be funded from the cold wallet when necessary, BUT you'll want to have a very secure process for adding these funds to the hot wallet, and you'll want to be aware of how much and how often you are funding that hot wallet.  You don't want to be arbitrarily funding a hot wallet that has run low on funds if the reason that it is low on funds is that a hacker has gained access to it.

Currently I know of creating a database, generating a batch of keys using https://www.bitaddress.org/ or something and then using that file to populate user data.

Is there an easier way of doing this?

Rather than pre-generating a "batch of keys", it would probably be better to use deterministic keys.  This way, the single seed for the private keys can be safely stored in the cold wallet, and you can then generate on-the-fly and store in your database as many addresses as you need when you need them.

Are there any APIs out there that don't require me to pay merchant fees?

Yes, but they may not be as easy to use and may require more knowledge of how bitcoin works at a technical level. They'll also probably require you to run your own bitcoin node/server.
kcDD (OP)
Newbie
*
Offline Offline

Activity: 3
Merit: 6


View Profile
December 20, 2019, 03:50:17 PM
 #3

Thanks for the thorough reply and help!

So is there a general guide/documentation for a web developer to follow?

Using a cold wallet is no problem. I'm just unsure how the function of the following works:

1. Deposit to unique (for each transaction) address
2. Received, user credited with "tokens"
3. Deposit automatically transferred from unique cold wallet, to single default cold wallet/storage.

Or is that basically the idea of a deterministic key?

DannyHamilton
Legendary
*
Offline Offline

Activity: 3360
Merit: 4570



View Profile
December 20, 2019, 06:20:55 PM
 #4

Thanks for the thorough reply and help!

So is there a general guide/documentation for a web developer to follow?

Using a cold wallet is no problem. I'm just unsure how the function of the following works:

1. Deposit to unique (for each transaction) address
2. Received, user credited with "tokens"
3. Deposit automatically transferred from unique cold wallet, to single default cold wallet/storage.

Or is that basically the idea of a deterministic key?

The first thing to understand is that a WALLET and a BITCOIN address are NOT the same thing.

A wallet can have MANY addresses.  An address can be tracked by MANY wallets.

There is generally no need (or benefit) to sweep bitcoins from multiple addresses to a single address (or wallet).

Using a deterministic key allows your internet accessible software to ONLY have access to the master public key (xpub), and not have access to private keys at all.  That way if the server is compromised, the attacker can't access any of the bitcoins.  Using the xpub, you can effectively generate an infinite number of bitcoin addresses. So the server can generate a new address whenever a user wants to make a deposit.  It will be up to your software to keep track of which addresses you've presented to which users.  That way, when you see a payment on one of the addresses, you'll know who's account to credit.  Meanwhile, since you've kept the master private key offline at all times, all bitcoins received are secure the moment they arrive.

If you don't intend to allow your users to withdraw or send bitcoins, then you don't need a hot wallet at all.  You can transfer your profits to your own wallet or you exchange account using the private keys generated from the master private key (xpriv).

If you do intend to allow your users to withdraw or send bitcoins, then you'll need a hot wallet that the server can use to send bitcoins on behalf of your users.  You'll want to make sure you understand the common processes for keeping a hot wallet as secure as possible.  Your hot wallet will be funded from the cold wallet as needed, but you'll want strict policies and procedures in place to make sure that you don't keep re-filling a hot wallet that has been compromised.

Here is a good place to get started learning about interfacing with Bitcoin Core:
https://bitcoin.org/en/developer-documentation

HCP
Legendary
*
Offline Offline

Activity: 2086
Merit: 4316

<insert witty quote here>


View Profile
December 21, 2019, 02:37:59 AM
 #5

Using a cold wallet is no problem. I'm just unsure how the function of the following works:

1. Deposit to unique (for each transaction) address
When a user requests a deposit address and there is no current "unused" address assigned to their account in your system's database, you simply generate the next address in the keychain using your Master Public Key. Then, you assign that address to the user's account in your system's database... if they already have an "unused" address assigned, display current "unused" address.


Quote
2. Received, user credited with "tokens"
Monitor your "generated" addresses... once funds are received on an address, check your database to find the appropriate user account that the address is assigned to, then credit that account with "tokens"... and then mark that address as "used", so that when the user next requests a deposit address, your system knows that it needs to generate and assign a new address.


Quote
3. Deposit automatically transferred from unique cold wallet, to single default cold wallet/storage.
If you follow Danny's advice and securely generate an offline deterministic wallet, and use the master public key of that wallet for generating the deposit addresses... then you don't need to transfer anything. All funds will be automatically deposited directly into your cold storage by the users themselves. There is no real need to collate all coins into one address.

█████████████████████████
████▐██▄█████████████████
████▐██████▄▄▄███████████
████▐████▄█████▄▄████████
████▐█████▀▀▀▀▀███▄██████
████▐███▀████████████████
████▐█████████▄█████▌████
████▐██▌█████▀██████▌████
████▐██████████▀████▌████
█████▀███▄█████▄███▀█████
███████▀█████████▀███████
██████████▀███▀██████████
█████████████████████████
.
BC.GAME
▄▄░░░▄▀▀▄████████
▄▄▄
██████████████
█████░░▄▄▄▄████████
▄▄▄▄▄▄▄▄▄██▄██████▄▄▄▄████
▄███▄█▄▄██████████▄████▄████
███████████████████████████▀███
▀████▄██▄██▄░░░░▄████████████
▀▀▀█████▄▄▄███████████▀██
███████████████████▀██
███████████████████▄██
▄███████████████████▄██
█████████████████████▀██
██████████████████████▄
.
..CASINO....SPORTS....RACING..
█░░░░░░█░░░░░░█
▀███▀░░▀███▀░░▀███▀
▀░▀░░░░▀░▀░░░░▀░▀
░░░░░░░░░░░░
▀██████████
░░░░░███░░░░
░░█░░░███▄█░░░
░░██▌░░███░▀░░██▌
░█░██░░███░░░█░██
░█▀▀▀█▌░███░░█▀▀▀█▌
▄█▄░░░██▄███▄█▄░░▄██▄
▄███▄
░░░░▀██▄▀


▄▄████▄▄
▄███▀▀███▄
██████████
▀███▄░▄██▀
▄▄████▄▄░▀█▀▄██▀▄▄████▄▄
▄███▀▀▀████▄▄██▀▄███▀▀███▄
███████▄▄▀▀████▄▄▀▀███████
▀███▄▄███▀░░░▀▀████▄▄▄███▀
▀▀████▀▀████████▀▀████▀▀
nakulrana
Newbie
*
Offline Offline

Activity: 1
Merit: 0


View Profile WWW
December 25, 2019, 04:57:39 AM
 #6

Hi, Thanks for asking this question. Actually, I am also looking for some similar answer. I have a website that provides Smartwatches and I want to include Bitcoin payment method on my website. Can you help me? Here is my website link: https://reviewshop.in
The Cryptovator
Legendary
*
Offline Offline

Activity: 2226
Merit: 2169


Need PR/CMC & CG? TG @The_Cryptovator


View Profile WWW
December 25, 2019, 06:22:45 AM
 #7

Hi, Thanks for asking this question. Actually, I am also looking for some similar answer. I have a website that provides Smartwatches and I want to include Bitcoin payment method on my website. Can you help me? Here is my website link: https://reviewshop.in
Sure, you can receive bitcoin payments for your website. You can consider BTCPay for receive bitcoin and some other coin as well, here is official website, https://btcpayserver.org. It's open source  crypto currency payment processor. You have use your own server or you may use third party server for receive payments, depend on your technical knowledge. You don't need to worry about KYC or fees, so better try to use BTCPay. Also it will allow receive bitcoin through lightning network if you use your own server.

.BEST..CHANGE.███████████████
██
██
██
██
██
██
██
██
██
██
██
██
██
██
██
██
██
██
██
██
██
██
██
██
███████████████
..BUY/ SELL CRYPTO..
kcDD (OP)
Newbie
*
Offline Offline

Activity: 3
Merit: 6


View Profile
January 09, 2020, 01:46:46 AM
 #8

Where would be the place to hire someone to develop the features I specified in the original post?

Most freelance sites they're quoting thousands. From what i've read it wouldn't take someone with some experience longer than a day.
Heisenberg_Hunter
Legendary
*
Offline Offline

Activity: 1583
Merit: 1276


Heisenberg Design Services


View Profile WWW
January 10, 2020, 07:05:25 AM
 #9

Where would be the place to hire someone to develop the features I specified in the original post?
You could post your interest in hiring a developer in Services with adequate and sufficient info on the development and the features you would like to incorporate in your website. Or the other way of contacting a developer who has posted their interest like this would work for you.

I am not really sure how effective that could be, but I guess it would be a good start for you if someone contact you for the same. Beware of scammers trying to contacting you and check their trust score before you deal with someone here.
Pmalek
Legendary
*
Offline Offline

Activity: 2744
Merit: 7069



View Profile
January 10, 2020, 10:15:15 AM
 #10

If you can't find what you are looking for in the Services section you could take a look at some freelancing sites like Upwork.com, fiverr.com or freelancer.com. I am not sure which of these you have checked already. Upwork and fiverr don't support crypto payments, I am not sure how it is on freelancer.com.

You can create your own ad or contact freelancers offering them the task. 

.
.BLACKJACK ♠ FUN.
█████████
██████████████
████████████
█████████████████
████████████████▄▄
░█████████████▀░▀▀
██████████████████
░██████████████
████████████████
░██████████████
████████████
███████████████░██
██████████
CRYPTO CASINO &
SPORTS BETTING
▄▄███████▄▄
▄███████████████▄
███████████████████
█████████████████████
███████████████████████
█████████████████████████
█████████████████████████
█████████████████████████
███████████████████████
█████████████████████
███████████████████
▀███████████████▀
█████████
.
Pages: [1]
  Print  
 
Jump to:  

Powered by MySQL Powered by PHP Powered by SMF 1.1.19 | SMF © 2006-2009, Simple Machines Valid XHTML 1.0! Valid CSS!