B2Bitcoin / beBOP

Marvelous p2p bitcoin-based online sales platform
https://be-bop.io
GNU Affero General Public License v3.0
14 stars 3 forks source link

Metabootik PoC : on product sale, send commission to a defined Lightning address #97

Open Tirodem opened 1 year ago

Tirodem commented 1 year ago

Following https://github.com/B2Bitcoin/B2BitcoinBootik/issues/96 Restricted to https://github.com/B2Bitcoin/B2BitcoinBootik/issues/168 whitelisted npubs

Prerequisite

Use cases

Setting referral on a product

Process referral on product sale

Process referral payment on target's side

Tirodem commented 1 year ago

Big question here, I think, is : is it possible to automatically send lightning payment from a request with a rightly setted back-office, or should we include manual validation from the owner of the referred Bootik ? In that case, I shall make it async and change my conditions a bit.

Tirodem commented 1 year ago

Note : for this feature, always consider amounts in SATS, not dependig of the Bootik main currency Note2 : this might force us to stock the 2 amounts when ordering (main currency amount, and SATS real amount if SATS/BTC is 2nd currency)

Tirodem commented 1 year ago

Following talk with Lionel, it seems that we can use lnurl for direct payment from the seller to the referral bootik : https://docs.bitnob.com/docs/pay-lnurl-qr That would make the process easier.

Use case with lnurl :

coyotte508 commented 1 year ago

yes we should be able to send sats directly to bootik with it's lightning paymetn address

Tirodem commented 1 year ago

@coyotte508 I rewrote the US considering that

Tirodem commented 1 year ago

Note : instead of using a lightning payment with a lightning address related to a bootik npub, we can think about associating the lightning address of the bootik with its nostr account and use the "Zaps" feature from Nostr. https://thebitcoinmanual.com/articles/nostr-zaps But it seems to be highly UI related, I think it's better to separate the lightning payment from the nostr notification. @ludomire WDYT ?

ludomire commented 1 year ago

Why not both?

Tirodem commented 1 year ago

We indeeed can associate automatically Bootik's lightning address with its NostR account to allow users to give us Zaps and be whitelisted in Zaps pool. Still we'll do with Lightning payment first as I'm not sure it's pertinent to use Zaps from NostR to do lightning payment instead of a direct Lightning payment. I edit https://github.com/B2Bitcoin/B2BitcoinBootik/issues/167 for that.

coyotte508 commented 1 year ago

214 should be done first

After that, 1 day I guess