Alright, after some thinking, I finally understood how will I use the callback. Blockchain's API will only send a callback iffif there has been a transaction
. What you need to track here is, that the amount the user sends should be equal to what you've requested.
Let's take a scenario.
1). I sell an online product worth $5 and use blockchain's payment receiving API to receive the money.:
2).The user sends an amount less than $5 (suppose $0.05), we then get a callback and assume that the transaction was successful. However, the user paid less amount that he requested. Therefore, we need to keep track of the amount and verify it with the original amount. If both the amount matches, then only you should proceed further.
I sell an online product worth $5 and use blockchain’s payment receiving API to receive the money.
The user sends an amount less than $5 (suppose $0.05), we then get a callback and assume that the transaction was successful. However, the user paid less amount that he requested. Therefore, we need to keep track of the amount and verify it with the original amount. If both the amount matches, then only you should proceed further.