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.


1 Answer 1


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.

  • Thank you so much for the answer could you provide any other solutions ? Jun 1, 2018 at 5:33

Your Answer

By clicking “Post Your Answer”, you agree to our terms of service and acknowledge you have read our privacy policy.

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