<p>Submitting transaction ID is not a safe way to verify payments. As you know bitcoin transactions are public and anyone can get see all TXIds. Same reason why even the donor bitcoin address is not a good method to verify. Someone else can see that address on blockexplorer and claim himself to be donor.</p>

<p>I can suggest few options:</p>

<ul>
<li>Ask the donor to sign a message proving ownership of the source address in TX. Most wallet have this functionality</li>
<li>Ask the participant to submit his xpub (extended public key) instead of address. When donor wants to donate, generate a unique address from this xpub for each attempt. This way you are sure, this donor paid to that address</li>
</ul>

CC BY-SA 3.0
2017-11-27T17:41:48.247Z
2017-11-27T17:41:48.247Z
dark knight
<p>I am working on a donation based community website (using PHP) where participants register for an account to participate. Each account carries the participant's bitcoin address. A participant makes a commitment to donate say $10 and is paired with another participant (recipient). The donor confirms payment by pasting his/her Transaction hash id on his dashboard to confirm payments. I currently use Blockchain.info API to read the transaction details and check the inputs and outputs of the transaction to ensure that they contain both donor and recipient BTC addresses and the expected amount. 
My problem is that most wallet providers generate new BTC address after each transaction making it difficult for my code to confirm transaction as the address will not match if new ones are generated.</p>

<p>How do I confirm transactions for dynamic BTC addresses using PHP OR how would you handle this use case?</p>

<p>Thanks</p>

<php>
Dynamic Transaction Hash Confirmation
Uwascan Emovon
# Dynamic Transaction Hash Confirmation

(Asked by: username_0 on 2017-11-27)

I am working on a donation based community website (using PHP) where participants register for an account to participate. Each account carries the participant's bitcoin address. A participant makes a commitment to donate say $10 and is paired with another participant (recipient). The donor confirms payment by pasting his/her Transaction hash id on his dashboard to confirm payments. I currently use Blockchain.info API to read the transaction details and check the inputs and outputs of the transaction to ensure that they contain both donor and recipient BTC addresses and the expected amount.
My problem is that most wallet providers generate new BTC address after each transaction making it difficult for my code to confirm transaction as the address will not match if new ones are generated.

How do I confirm transactions for dynamic BTC addresses using PHP OR how would you handle this use case?

Thanks

**Tags:** php


---

## 1 answers

### Answer by username_1 on 2017-11-27. Score: 1

Submitting transaction ID is not a safe way to verify payments. As you know bitcoin transactions are public and anyone can get see all TXIds. Same reason why even the donor bitcoin address is not a good method to verify. Someone else can see that address on blockexplorer and claim himself to be donor.

I can suggest few options:

* Ask the donor to sign a message proving ownership of the source address in TX. Most wallet have this functionality
* Ask the participant to submit his xpub (extended public key) instead of address. When donor wants to donate, generate a unique address from this xpub for each attempt. This way you are sure, this donor paid to that address


---

