Scan And Share implementation

Hello,

In our HIMS software we are nearing the completion of our M1 integration but not getting the flow understanding of implementing Scan and share. I also have referred documentaion and youtube video but still I am not getting it.
How will this callback url working ?
On scanning from any phr app how my api would be call ?

Thank You.