Custom bitcoin confirmation process

0

I am implementing a payment module for bitcoins.

I have the following case. I need customers to be able to pay in bitcoins. But for some reasons I cannot use existing solutions like Bitpay.

Therefore I have thought and ended up with the following solution.

  1. We have a private key wallet of HD type, so we can generate child addresses from our master key.
  2. When a user tries to pay in Bitcoins we are generating a new address and display it to the user.
  3. We associate an address with an order id
  4. A daemon running in background is checking pending orders requesting information from Blockchain for a concrete address and checking whether this address received amount equal to an order total sum.
  5. In case there are more than X confirmations we are setting a status of an order to PAID

I wonder whether this is acceptable solutions or maybe there are some better ways to implement custom bitcoin payments ?

I would be great for any suggestions and help.

Thanks

solderingiron

Posted 2018-05-31T18:04:31.587

Reputation: 3

Answers

0

There are existing solutions that handle payment processing for you. You can use BTCPayServer which has an API that is similar to BitPay's API.

Andrew Chow

Posted 2018-05-31T18:04:31.587

Reputation: 50 267

Thank you so much for the answer could you provide any other solutions ? – solderingiron – 2018-06-01T05:33:39.430