-1

I am new to hyperledger and online payment.

One scenario I have in mind is: if A is an online shop, B is a consumer. B orders an item from A's shop and pays with Bitcoin/hyperledger. A ships the item to B once the payment is received.

With hyperledger, the process goes:

B sends A the payment via blockchain;

A is able to query how much money A owns;

But the question is:

How does A know if the transaction was from B?

How does A know how much money was sent by B?

How does A know if the transaction from B is for the specific ordered item?

Thanks,

Community
  • 1
  • 1
dellair
  • 427
  • 4
  • 22

1 Answers1

-1

What you'd usually do in Bitcoin is to create a new payment address that is bound to the specific order. The invoice would include that address with instructions to send the specified amount to that address and the recipient could simply wait for an incoming transaction with an output destined for that address.

At this point you'd know which customer has paid for which order, to check the amount just check the output value field in the transaction and compare it to the invoice.

cdecker
  • 4,515
  • 8
  • 46
  • 75