user138726: According to another user here I am mistaken about how public keys work. I want a customer to have a wallet to which they have a public address to view funds only and I have another public address to deposit to. How can I derive such a key that can view only but not deposit to the public address? I want to make a crypto gift card I can reload and my customers can verify funds.

user7272: This is how regular wallets work - your public key is used to derive the address to which deposits are made.
However, you can't prevent someone else from depositing to an address once it is shared with them - for instance, you could print the address or put a QR code containing it on your gift card. Once someone receives it, they can look up that address on any blockchain explorer to see the balance.
However, if they can see the address, they can also make a separate deposit to it. There is no way to prevent this.

138726: <p>According to another user here I am mistaken about how public keys work. I want a customer to have a wallet to which they have a public address to view funds only and I have another public address to deposit to. How can I derive such a key that can view only but not deposit to the public address? I want to make a crypto gift card I can reload and my customers can verify funds.</p>
 7272: <p>This is how regular wallets work - your public key is used to derive the address to which deposits are made.</p>
<p>However, you can't prevent someone else from depositing to an address once it is shared with them - for instance, you could print the address or put a QR code containing it on your gift card. Once someone receives it, they can look up that address on any blockchain explorer to see the balance.</p>
<p>However, if they can see the address, they can also make a separate deposit to it. There is no way to prevent this.</p>
