Bitcoin Forum
May 04, 2024, 04:33:51 AM *
News: Latest Bitcoin Core release: 27.0 [Torrent]
 
   Home   Help Search Login Register More  
Pages: [1]
  Print  
Author Topic: How to add custom (USD compare to Bitcoin) Bitcoin Payment on my website?  (Read 158 times)
GratefulBird (OP)
Newbie
*
Offline Offline

Activity: 2
Merit: 4


View Profile
February 28, 2020, 12:07:38 AM
Merited by OgNasty (2), hugeblack (2)
 #1

Hey there,

In my website I want to accept Bitcoin payments, and I want to make an option for the customer to choose how much USD he want to pay and than he will get the Bitcoin amount to pay equal to the USD. After the customer made the payment and paid for it, I want to see exactly how much btc he paid and what the worth of BTC as dollar at the time he paid the BTC. There is some provider for this kind of service?

Thanks,
1714797231
Hero Member
*
Offline Offline

Posts: 1714797231

View Profile Personal Message (Offline)

Ignore
1714797231
Reply with quote  #2

1714797231
Report to moderator
Whoever mines the block which ends up containing your transaction will get its fee.
Advertised sites are not endorsed by the Bitcoin Forum. They may be unsafe, untrustworthy, or illegal in your jurisdiction.
1714797231
Hero Member
*
Offline Offline

Posts: 1714797231

View Profile Personal Message (Offline)

Ignore
1714797231
Reply with quote  #2

1714797231
Report to moderator
hugeblack
Legendary
*
Offline Offline

Activity: 2506
Merit: 3633


Buy/Sell crypto at BestChange


View Profile WWW
February 28, 2020, 12:57:02 AM
Merited by GratefulBird (1)
 #2

There are a lot of options that you can make, depending on your ability to technology:

 - https://btcpayserver.org/: The best way, gives you a lot of options, you better try them.
 - https://coingate.com/bitcoin-pos: It is an excellent alternative and you can withdraw money to your account in addition to many options.
 - https://bitpay.com/: One of the worst options.

Did I understand your point exactly? Many services offer you this feature.

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

Activity: 2
Merit: 4


View Profile
February 28, 2020, 04:16:46 PM
 #3

There are a lot of options that you can make, depending on your ability to technology:

 - https://btcpayserver.org/: The best way, gives you a lot of options, you better try them.
 - https://coingate.com/bitcoin-pos: It is an excellent alternative and you can withdraw money to your account in addition to many options.
 - https://bitpay.com/: One of the worst options.

Did I understand your point exactly? Many services offer you this feature.

Thank you for your answer, but it's not exactly answer my question. I know how to accept bitcoin payment and to use bitcoin gateway. I try to get information of the exact price of bitcoin compare to dollar when my customer made an order. Also, I want the customer to choose how much USD / BTC he want to pay. So if he choose he want to pay me 900$ he will get information of how much Bitcoin he need to send equal to 900$.
PassThePopcorn
Sr. Member
****
Offline Offline

Activity: 465
Merit: 309


View Profile
February 28, 2020, 04:20:27 PM
 #4

There are a lot of options that you can make, depending on your ability to technology:

 - https://btcpayserver.org/: The best way, gives you a lot of options, you better try them.
 - https://coingate.com/bitcoin-pos: It is an excellent alternative and you can withdraw money to your account in addition to many options.
 - https://bitpay.com/: One of the worst options.

Did I understand your point exactly? Many services offer you this feature.

Thank you for your answer, but it's not exactly answer my question. I know how to accept bitcoin payment and to use bitcoin gateway. I try to get information of the exact price of bitcoin compare to dollar when my customer made an order. Also, I want the customer to choose how much USD / BTC he want to pay. So if he choose he want to pay me 900$ he will get information of how much Bitcoin he need to send equal to 900$.
All the links provided do that.

If you want to just make a conversion tool that says x BTC = y USD or vice versa you need to link to an exchange's api to fetch the pricing data, then just multiply or divide depending on what currency gets inputted. But if you want a program that does that plus generates a payment invoice just use btcpayserver. (but again at least 2 of the links provided will do that, I've never heard of coingate but they probably do as well.)

Edit* instead of linking to an exchange you can link to the payment gateway's api and pull data from that.
TryNinja
Legendary
*
Offline Offline

Activity: 2828
Merit: 6975



View Profile WWW
February 28, 2020, 04:20:51 PM
 #5

Thank you for your answer, but it's not exactly answer my question. I know how to accept bitcoin payment and to use bitcoin gateway. I try to get information of the exact price of bitcoin compare to dollar when my customer made an order. Also, I want the customer to choose how much USD / BTC he want to pay. So if he choose he want to pay me 900$ he will get information of how much Bitcoin he need to send equal to 900$.
You can probably do that easily with your the part of your code implementation. It's a very easy logic.

Get the price from a trusted source/exchange, get the amount he wants in USD and divide it by the price ($10 / $8700 = 0.00114 BTC) and generate an invoice from it. When he pays, see how much was paid in BTC and multiply by the current price (0.00114 * 8500 = $9.69). Add this amount to his balance.

.
.HUGE.
▄██████████▄▄
▄█████████████████▄
▄█████████████████████▄
▄███████████████████████▄
▄█████████████████████████▄
███████▌██▌▐██▐██▐████▄███
████▐██▐████▌██▌██▌██▌██
█████▀███▀███▀▐██▐██▐█████

▀█████████████████████████▀

▀███████████████████████▀

▀█████████████████████▀

▀█████████████████▀

▀██████████▀▀
█▀▀▀▀











█▄▄▄▄
▀▀▀▀▀▀▀▀▀▀▀▀▀▀▀▀▀▀▀▀▀▀▀▀▀▀▀▀▀▀▀▀▀▀▀▀▀▀▀▀▀▀▀▀▀▀▀▀▀▀▀▀▀▀▀▀▀▀▀▀▀▀▀▀▀▀▀▀▀▀▀▀▀▀▀▀▀▀▀▀▀▀▀▀▀▀▀▀▀▀▀▀▀▀▀▀▀▀▀▀▀▀▀▀▀▀▀▀▀▀▀▀▀▀▀▀▀▀▀▀▀▀▀▀▀▀▀▀▀▀▀▀▀▀▀▀▀▀▀▀▀▀▀▀▀▀▀▀▀▀▀▀▀▀▀▀▀▀
.
CASINSPORTSBOOK
▄▄▄▄▄▄▄▄▄▄▄▄▄▄▄▄▄▄▄▄▄▄▄▄▄▄▄▄▄▄▄▄▄▄▄▄▄▄▄▄▄▄▄▄▄▄▄▄▄▄▄▄▄▄▄▄▄▄▄▄▄▄▄▄▄▄▄▄▄▄▄▄▄▄▄▄▄▄▄▄▄▄▄▄▄▄▄▄▄▄▄▄▄▄▄▄▄▄▄▄▄▄▄▄▄▄▄▄▄▄▄▄▄▄▄▄▄▄▄▄▄▄▄▄▄▄▄▄▄▄▄▄▄▄▄▄▄▄▄▄▄▄▄▄▄▄▄▄▄▄▄▄▄▄▄▄▄▄
▀▀▀▀█











▄▄▄▄█
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!