Can you put a more specific example.
Normally there are multiple workflows involved; however the common theme is that a reference number ties it together.
For example, in PayPal, if you need to transfer money from your Bank account to the PayPal account, you first have to log into PayPal and enter the details, they will then generate a payment instruction [this has the details of PayPal account and reference number] that you would go and submit to your Bank. The reference number goes back to PayPal and they know the money if from you.
Other way is to have PayPal debit your account directly held at the bank, in this case they already know which PayPal account to credit and hence when the debit is successful, they will credit your account.
Similar scheme of things apply to various Merchants, you specify some mututally agreed reference number that would allow the Merchant to match the payment your make to you.