btcpayserver / btcpayserver-doc

BTCPay Server Official Documentation
https://docs.btcpayserver.org
374 stars 251 forks source link

Improve Greenfield API example with Node.js (JavaScript) #1404

Open spacekestrel opened 1 month ago

spacekestrel commented 1 month ago

I could not find the information I was looking for on the "Greenfield API example with Node.js (JavaScript)" page (/Development/GreenFieldExample-NodeJS/).

info about payouts

ndeet commented 1 month ago

Hey, what are you looking for. The examples cover some most used cases. Also you would not create a payout but a pull payment for refunds and that example is covered. If you want to create payouts nevertheless you can look at the api docs here or if you want to create a transaction you can look here.

spacekestrel commented 1 month ago

Hey, what are you looking for. The examples cover some most used cases. Also you would not create a payout but a pull payment for refunds and that example is covered. If you want to create payouts nevertheless you can look at the api docs here or if you want to create a transaction you can look here.

well, basically in my app users should be able to request payout, based on amount of money they have in app's wallet. And withdrawal should be automated. is it pull payment or payout?

ndeet commented 1 month ago

You create a pull payment and the api will return you a link, you can give this link to your users where they can enter their on-chain or LN invoice to redeem the funds. The payout processor (if configured) can then automatically do the payout.