I'm trying to create a transaction and send it to the blockchain.

The goal is to get an address from which the money comes and an address to which the money will go, send the transaction to the network, wait for the wallet owner from which the money comes to approve the transaction in his wallet and finally get the transaction address.

I can not understand how to do this without asking the wallet owner from whom the money was sent the private key.

I would appreciate your help, Thanks!

  • Are you creating a custodial wallet service? What is the role of what you are creating? Jul 10, 2022 at 15:29
  • 1
    I still don't understand. Why wouldn't the customer do the whole job in Electrum, Exodus etc. Why would they want to involve a 3rd-party web-page? Is this multisig escrow PSBT or something else? Jul 10, 2022 at 16:01
  • 2
    Well what you're asking for is fundamentally impossible. You need the user's wallet to produce the signatures in the transaction inputs. Without those, the transaction is incomplete, invalid, and the network won't relay such transactions. Jul 10, 2022 at 16:27
  • 2
    The Bitcoin network does not relay transactions that aren't valid. You'll need to communicate with the user out of band, using protocols like PSBT, to construct the transaction. Jul 10, 2022 at 16:45
  • 1
    When your wallet observes any payment to the given address it will be able to calculate the TxHash. Jul 12, 2022 at 9:54

1 Answer 1


The process described in the question is not the way normal transactions are created and processed in Bitcoin.

You can request payment by, for example, showing the customer a barcode (QR-code) that contains the address you want to be paid and the amount. Alternatively you just show them the address and amount in plain text. As a developer web-page on payment processing implies, the customer creates the whole transaction themselves without any assistance. They might typically use a wallet app to scan the barcode and press "send".

When your wallet observes any payment to the given address, including unconfirmed payments, it will, as part of verification, calculate the TxHash (Transaction-ID, a hash of transaction data).

There is provision for more complex forms of transaction. For example multisignature transactions and partially signed bitcoin transactions (PSBT). There is also Lightning, Liquid etc. However, it isn't clear from the information provided that any of these are relevant to you.

See Bitcoin URL scheme

Your Answer

By clicking “Post Your Answer”, you agree to our terms of service and acknowledge you have read our privacy policy.

Not the answer you're looking for? Browse other questions tagged or ask your own question.