# BTCPay Server Integration for M5StackSats

The M5StackSats is a Bitcoin point of sale terminal project by @BTCSocialist. As the name implies, it builds on the M5Stack: The M5 Faces hardware becomes a PoS terminal, which can be used to sell goods for sats.

The process is straight forward: The merchant enters the amount, which can be denominated in fiat currency. The software integrates with one of many defined backends (like a BTCPay Server instance): It gets the current exchange rate, generates a Lightning invoice and displays its QR code. Then it polls the backend to check the payment status and shows a confirmation.

I found the idea of building a PoS terminal based on cheap hardware very intriguing and ordered a M5 Faces device. Astonishingly, there was no BTCPay Server integration for the M5StackSats project, yet. So I decided to build it as a way of learning a bit more about the new gadget.

It took me a bit of tinkering and familiarizing myself with Arduino and writing C, but it finally worked out. Here’s a short demo of the BTCPayServer integration for the M5StackSats …