Closed bitcoinbrisbane closed 2 months ago
Some notes https://docs.btcpayserver.org/CustomIntegration/
<script src="https://your.btcpay.url/modal/btcpay.js"></script>
const axiosClient = axios.create({
baseURL: BTCPAY_URL,
timeout: 5000,
responseType: 'json',
headers: {
'Content-Type': 'application/json',
Authorization: BTCPAY_AUTH
}
})
const invoiceCreation = {
price: 12345,
currency: 'USD',
orderId: 'something',
itemDesc: 'item description',
notificationUrl: 'https://webhook.after.checkout.com/goeshere',
redirectURL: 'https://go.here.after.checkout.com'
}
const response = await axiosClient.post('/invoices', invoiceCreation)
const invoiceId = response.data.data.id
After the user POST the registration #6 show the Payment QR code. Poll the blockchain for a payment tx then show a "Green Tick" once the payment is seen in the mempool.
Like BTCPay server...