Bitcoin Forum
November 06, 2024, 04:30:47 PM *
News: Latest Bitcoin Core release: 28.0 [Torrent]
 
   Home   Help Search Login Register More  
Pages: [1]
  Print  
Author Topic: Blockchain API Payment Processing  (Read 145 times)
TexasGreg (OP)
Newbie
*
Offline Offline

Activity: 6
Merit: 0


View Profile
December 27, 2017, 03:02:28 PM
 #1

This is my first post. I'm adding Bitcoin as a payment option to one of my websites and have some questions about functionality. Since the buyer controls how much they pay, how do you handle underpayments? Since the buyer has the payment address, how do you handle later payments since the buyer would likely only do this if the conversion rate is in his favor? I put a 5-minute timer on my payment page so I could make it where any payments after the 5 minutes would not result in shipment but that would create a headache. Will the API callback occur multiple times for multiple payments to the same address? I would check this out for myself if not for the current high transaction fees.

Thanks in advance.

Greg
Bitfort
Sr. Member
****
Offline Offline

Activity: 952
Merit: 339

invest trade and gamble wisely


View Profile
December 27, 2017, 05:27:24 PM
 #2

Hi and welcome.
I don't have much experience with blockchain API just wanted to let you know you can use some established payment processor like bipay or myceliumgear ... these should take care of similar issues.


BTW for testing purposes you can try using bitcoin testnet (these coins are very same to BTC but you can get them for free)

MY HINTs
◄M► MINING
◄G► GAMBLING
◄E► EXCHANGE

◄E► (KCS) Kucoin-Staking, Auto-Lending, Trading-Bot
◄E► (BNB) Binance-Staking, Savings, 10% RefBack
◄E► (TRX) Poloniex-Staking, Lending, Fee Discount
◄E► (LEO) Bitfinex-Staking, Auto-Lending

◄G► Betfury-Faucet, Dividend Earnings (BFG holders, mine BFG by playing)
◄G► Bitvest -  Faucet, Bankroll Invest
◄G► CryptoGames-Faucet, Lotto
◄G► PrimeDice-Faucet

◄M► Prohashing (Multipool)-Payout in any coin, get 0.50% bonus for 30 days
◄M► MiningRigRentals (Marketplace)-buy hashrate or rent your miners
◄M► Viabtc  (Pool)-payout to Coinex (exchnage) without fees


NeuroticFish
Legendary
*
Offline Offline

Activity: 3850
Merit: 6583


Looking for campaign manager? Contact icopress!


View Profile
December 27, 2017, 05:37:02 PM
 #3

This is my first post. I'm adding Bitcoin as a payment option to one of my websites and have some questions about functionality. Since the buyer controls how much they pay, how do you handle underpayments? Since the buyer has the payment address, how do you handle later payments since the buyer would likely only do this if the conversion rate is in his favor? I put a 5-minute timer on my payment page so I could make it where any payments after the 5 minutes would not result in shipment but that would create a headache. Will the API callback occur multiple times for multiple payments to the same address? I would check this out for myself if not for the current high transaction fees.

Thanks in advance.

Greg

One of the websites I am buying from has a payment processor that accepts Bitcoin.
In order to have the payment automatically processed, I have to make the transfer within 20 minutes and I think that it has to be one transfer with the correct (displayed) amount.
If the tx is relayed within the 20 minutes, "I am good" and when 1 or 3 confirmations passed the seller sends the "payment received" e-mail.

So the 1st check is (afaik) by time and amount and a second check is done to make sure the tx gets confirmed.


You can clearly state that if they send less than the required amount, that is considered a donation. Keep it simple.

███████████████████████
████▐██▄█████████████████
████▐██████▄▄▄███████████
████▐████▄█████▄▄████████
████▐█████▀▀▀▀▀███▄██████
████▐███▀████████████████
████▐█████████▄█████▌████
████▐██▌█████▀██████▌████
████▐██████████▀████▌████
█████▀███▄█████▄███▀█████
███████▀█████████▀███████
██████████▀███▀██████████

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


▄▄████▄▄
▄███▀▀███▄
██████████
▀███▄░▄██▀
▄▄████▄▄░▀█▀▄██▀▄▄████▄▄
▄███▀▀▀████▄▄██▀▄███▀▀███▄
███████▄▄▀▀████▄▄▀▀███████
▀███▄▄███▀░░░▀▀████▄▄▄███▀
▀▀████▀▀████████▀▀████▀▀
mocacinno
Legendary
*
Offline Offline

Activity: 3570
Merit: 5187


https://merel.mobi => buy facemasks with BTC/LTC


View Profile WWW
December 27, 2017, 05:39:15 PM
 #4

5 minutes is a really short time imho. People might need to move funds, sweep paper wallets, search the key for the old ledger HW.1 in order to sign a transaction.
Bitpay waits 15 minutes, i think that's reasonable...

As for you choice of using the blockchain api, i agree to one of the previous posters: why don't you use an established payment provider like bitpay or coinpayments? If you're set on doing things yourself (to have full controll, or because you don't like to pay a fee), i'd suggest running your own node and using json-rpc query's, or using an xpub from an offline electrum wallet to derive new payment addresses for each customer without exposing your private key or xprv on an online server...

█▀▀▀











█▄▄▄
▀▀▀▀▀▀▀▀▀▀▀
e
▄▄▄▄▄▄▄▄▄▄▄
█████████████
████████████▄███
██▐███████▄█████▀
█████████▄████▀
███▐████▄███▀
████▐██████▀
█████▀█████
███████████▄
████████████▄
██▄█████▀█████▄
▄█████████▀█████▀
███████████▀██▀
████▀█████████
▀▀▀▀▀▀▀▀▀▀▀▀▀▀▀▀▀▀▀▀▀
c.h.
▄▄▄▄▄▄▄▄▄▄▄▄▄▄▄▄▄▄▄▄▄
▀▀▀█











▄▄▄█
▄██████▄▄▄
█████████████▄▄
███████████████
███████████████
███████████████
███████████████
███░░█████████
███▌▐█████████
█████████████
███████████▀
██████████▀
████████▀
▀██▀▀
TexasGreg (OP)
Newbie
*
Offline Offline

Activity: 6
Merit: 0


View Profile
December 27, 2017, 08:27:06 PM
 #5

Hi and welcome.
I don't have much experience with blockchain API just wanted to let you know you can use some established payment processor like bipay or myceliumgear ... these should take care of similar issues.


BTW for testing purposes you can try using bitcoin testnet (these coins are very same to BTC but you can get them for free)



I'm trying to avoid the up to 1% fee. I'll check out bitcoin testnet. Thanks
TexasGreg (OP)
Newbie
*
Offline Offline

Activity: 6
Merit: 0


View Profile
December 27, 2017, 08:43:43 PM
 #6

You can clearly state that if they send less than the required amount, that is considered a donation. Keep it simple.

It would be nice if I could get away with this.  Grin
TexasGreg (OP)
Newbie
*
Offline Offline

Activity: 6
Merit: 0


View Profile
December 27, 2017, 09:04:48 PM
 #7

5 minutes is a really short time imho. People might need to move funds, sweep paper wallets, search the key for the old ledger HW.1 in order to sign a transaction.
Bitpay waits 15 minutes, i think that's reasonable...

Ok I'll up the time limit. I was just thinking of the volatility.

As for you choice of using the blockchain api, i agree to one of the previous posters: why don't you use an established payment provider like bitpay or coinpayments? If you're set on doing things yourself (to have full controll, or because you don't like to pay a fee), i'd suggest running your own node and using json-rpc query's, or using an xpub from an offline electrum wallet to derive new payment addresses for each customer without exposing your private key or xprv on an online server...

I tried setting up my own node but go nowhere. I know some PHP and that's about it.
mocacinno
Legendary
*
Offline Offline

Activity: 3570
Merit: 5187


https://merel.mobi => buy facemasks with BTC/LTC


View Profile WWW
December 28, 2017, 01:25:26 AM
 #8

5 minutes is a really short time imho. People might need to move funds, sweep paper wallets, search the key for the old ledger HW.1 in order to sign a transaction.
Bitpay waits 15 minutes, i think that's reasonable...

Ok I'll up the time limit. I was just thinking of the volatility.

As for you choice of using the blockchain api, i agree to one of the previous posters: why don't you use an established payment provider like bitpay or coinpayments? If you're set on doing things yourself (to have full controll, or because you don't like to pay a fee), i'd suggest running your own node and using json-rpc query's, or using an xpub from an offline electrum wallet to derive new payment addresses for each customer without exposing your private key or xprv on an online server...

I tried setting up my own node but go nowhere. I know some PHP and that's about it.

It's doable using php...
Just use easybitcoin:
https://github.com/aceat64/EasyBitcoin-PHP

then build a connection
Code:
require_once('easybitcoin.php');
$bitcoin = new Bitcoin('[your rcp username here]','[your rcp password here]','[bitcoind\'s ip address here]','8332');

then you can just send requests
for example, to decode a raw transaction stored in the variable $raw
Code:
$decoded = decoderaw($raw, $bitcoin)

█▀▀▀











█▄▄▄
▀▀▀▀▀▀▀▀▀▀▀
e
▄▄▄▄▄▄▄▄▄▄▄
█████████████
████████████▄███
██▐███████▄█████▀
█████████▄████▀
███▐████▄███▀
████▐██████▀
█████▀█████
███████████▄
████████████▄
██▄█████▀█████▄
▄█████████▀█████▀
███████████▀██▀
████▀█████████
▀▀▀▀▀▀▀▀▀▀▀▀▀▀▀▀▀▀▀▀▀
c.h.
▄▄▄▄▄▄▄▄▄▄▄▄▄▄▄▄▄▄▄▄▄
▀▀▀█











▄▄▄█
▄██████▄▄▄
█████████████▄▄
███████████████
███████████████
███████████████
███████████████
███░░█████████
███▌▐█████████
█████████████
███████████▀
██████████▀
████████▀
▀██▀▀
TexasGreg (OP)
Newbie
*
Offline Offline

Activity: 6
Merit: 0


View Profile
December 29, 2017, 01:52:17 PM
 #9

5 minutes is a really short time imho. People might need to move funds, sweep paper wallets, search the key for the old ledger HW.1 in order to sign a transaction.
Bitpay waits 15 minutes, i think that's reasonable...

Ok I'll up the time limit. I was just thinking of the volatility.

As for you choice of using the blockchain api, i agree to one of the previous posters: why don't you use an established payment provider like bitpay or coinpayments? If you're set on doing things yourself (to have full controll, or because you don't like to pay a fee), i'd suggest running your own node and using json-rpc query's, or using an xpub from an offline electrum wallet to derive new payment addresses for each customer without exposing your private key or xprv on an online server...

I tried setting up my own node but go nowhere. I know some PHP and that's about it.

It's doable using php...
Just use easybitcoin:
https://github.com/aceat64/EasyBitcoin-PHP

then build a connection
Code:
require_once('easybitcoin.php');
$bitcoin = new Bitcoin('[your rcp username here]','[your rcp password here]','[bitcoind\'s ip address here]','8332');

then you can just send requests
for example, to decode a raw transaction stored in the variable $raw
Code:
$decoded = decoderaw($raw, $bitcoin)

Thanks but that's all still over my head. I'm just about finished integrating the Blockchain API. It's looking good thus far.
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!