Bitcoin Forum
January 22, 2026, 11:50:55 AM *
News: Latest Bitcoin Core release: 30.2 [Torrent]
 
   Home   Help Search Login Register More  
Pages: [1]
  Print  
Author Topic: QR encoded transactions that embed a payload and post it onchain?  (Read 47 times)
MadCake (OP)
Newbie
*
Offline Offline

Activity: 1
Merit: 0


View Profile
January 19, 2026, 08:47:39 PM
 #1

I have been banging my head for a couple of days here.

I want to be able to generate a QR code that is recognised widely by bitcoin wallets, representing a transfer with an embedded onchain message.

At the moment I am using OP_RETURN for this. My code looks good but I am hitting a wall, because no QR code I generate is recognized by wallets like Blockstream Green. I have tried using BIP21 with a message field but if I understood correctly, that does not post the data onchain, and it is a hard requirement that the data is posted onchain - this worked with Green, but I have not tried with others.

Then I have been trying PSBT, but apparently I need the user to provide me with their sender address prior to this to build in this format, which is also a no-go, introduces too much friction in the UI.

What other options do I have? I need something that is widely adopted by wallets in the ecosystem.
ABCbits
Legendary
*
Offline Offline

Activity: 3500
Merit: 9603



View Profile
January 20, 2026, 09:40:03 AM
 #2

What other options do I have? I need something that is widely adopted by wallets in the ecosystem.

Probably none, partly because many wallet don't have feature to create OP_RETURN output.

But FWIW, BIP 321 is probably closest thing you're looking for. It has message key[1], but it's very likely it refer to message shown on user device. So what you could use is otherparam, that could be used for your purpose and suggest other wallet to support your key/otherparam.

[1] https://github.com/bitcoin/bips/blob/master/bip-0321.mediawiki#query-keys
[2] https://github.com/bitcoin/bips/blob/master/bip-0321.mediawiki#abnf-grammar

███████████████████████████
███████▄████████████▄██████
████████▄████████▄████████
███▀█████▀▄███▄▀█████▀███
█████▀█▀▄██▀▀▀██▄▀█▀█████
███████▄███████████▄███████
███████████████████████████
███████▀███████████▀███████
████▄██▄▀██▄▄▄██▀▄██▄████
████▄████▄▀███▀▄████▄████
██▄███▀▀█▀██████▀█▀███▄███
██▀█▀████████████████▀█▀███
███████████████████████████
.
.Duelbits PREDICT..
█████████████████████████
█████████████████████████
███████████▀▀░░░░▀▀██████
██████████░░▄████▄░░████
█████████░░████████░░████
█████████░░████████░░████
█████████▄▀██████▀▄████
████████▀▀░░░▀▀▀▀░░▄█████
██████▀░░░░██▄▄▄▄████████
████▀░░░░▄███████████████
█████▄▄█████████████████
█████████████████████████
█████████████████████████
.
.WHERE EVERYTHING IS A MARKET..
█████
██
██







██
██
██████
Will Bitcoin hit $200,000
before January 1st 2027?

    No @1.15         Yes @6.00    
█████
██
██







██
██
██████

  CHECK MORE > 
nc50lc
Legendary
*
Online Online

Activity: 3024
Merit: 8261


Self-proclaimed Genius


View Profile
January 20, 2026, 03:40:19 PM
 #3

Then I have been trying PSBT, but apparently I need the user to provide me with their sender address prior to this to build in this format, which is also a no-go, introduces too much friction in the UI.
Theoretically, with the proper "SIGHASH Flag", the recipient may issue an already created PSBT with the OP_RETURN output and an input that the recipient provided, containing signatures.
Then have the sender combine it with his PSBT that pays the URI.

However, this requires the recipient to shoulder part of the transaction fee and the OP_RETURN output.
And including both PSBT and URI in the same QR Code isn't standardized.

References:

███████████████████████████
███████▄████████████▄██████
████████▄████████▄████████
███▀█████▀▄███▄▀█████▀███
█████▀█▀▄██▀▀▀██▄▀█▀█████
███████▄███████████▄███████
███████████████████████████
███████▀███████████▀███████
████▄██▄▀██▄▄▄██▀▄██▄████
████▄████▄▀███▀▄████▄████
██▄███▀▀█▀██████▀█▀███▄███
██▀█▀████████████████▀█▀███
███████████████████████████
.
.Duelbits PREDICT..
█████████████████████████
█████████████████████████
███████████▀▀░░░░▀▀██████
██████████░░▄████▄░░████
█████████░░████████░░████
█████████░░████████░░████
█████████▄▀██████▀▄████
████████▀▀░░░▀▀▀▀░░▄█████
██████▀░░░░██▄▄▄▄████████
████▀░░░░▄███████████████
█████▄▄█████████████████
█████████████████████████
█████████████████████████
.
.WHERE EVERYTHING IS A MARKET..
█████
██
██







██
██
██████
Will Bitcoin hit $200,000
before January 1st 2027?

    No @1.15         Yes @6.00    
█████
██
██







██
██
██████

  CHECK MORE > 
Donneski
Full Member
***
Offline Offline

Activity: 532
Merit: 155


Contact Hhampuz for campaign


View Profile
January 20, 2026, 03:52:37 PM
 #4

What other options do I have? I need something that is widely adopted by wallets in the ecosystem.
Going by my findings what you want doesn't exist in a wallet-agnostic way

There’s no widely adopted QR standard for embedding arbitrary on-chain data. If there were, it would already be abused which is why most wallets simply won’t construct OP_RETURN transactions from QR input.

BIP21 doesn’t commit data, PSBT adds too much friction and anything else means controlling the signing flow yourself. If wide wallet support matters you’re limited to the small set of QR features wallets deliberately expose.

References

Pages: [1]
  Print  
 
Jump to:  

Powered by MySQL Powered by PHP Powered by SMF 1.1.19 | SMF © 2006-2009, Simple Machines Valid XHTML 1.0! Valid CSS!