Marfusios / strike-btcpayserver-plugin

Strike plugin for BTCPayServer
MIT License
10 stars 3 forks source link

Paid lightning invoice does not deposit to the cash account #3

Closed sbddesign closed 6 days ago

sbddesign commented 1 month ago

Thanks for the great plugin! I noticed something interesting when using this. Having worked with the Strike API previously, I have been able to fetch lightning invoices that deposit directly into the cash account as USD. However, when using this plugin, it appears to deposit into the bitcoin account and then immediately sell this.

This seems like it complicates the accounting with "sale events" and also runs the risk of creating taxable events if the price varies between receipt and sale.

Is there a way this plugin could deposit directly to the cash account instead of looping through the bitcoin account first?

Marfusios commented 1 month ago

@sbddesign You are right. We had to use this "invoice+exchange" approach because Strike API was designed in a FIAT-centric way (with very short-lived quotes that give you a guaranteed FIAT price for 1-2 minutes). This doesn't play well with BtcPayServer because they do the calculations from/to FIAT on their own.

But I have good news! I'm in the middle of integrating a brand-new API - receive requests. It should give us exactly what we need, creating LN invoices that will be converted to FIAT upon receival, without triggering tax events.

Marfusios commented 1 month ago

The new version 1.3.2 was released. Let me know if everything works as expected on your side. Don't forget to regenerate API keys with the new scopes.

image

sbddesign commented 2 weeks ago

@Marfusios Ah, sorry I missed this message earlier. Yes, I should have time to run the update this upcoming week and test it out. Looking forward to trying it. Thank you!

sbddesign commented 6 days ago

@Marfusios It works perfectly, thank you!