If you’re interested in making this like a real vending machines for services (beyond requesting files like Sats4Files), I would explore the S in ZKCSP:
They provide a way to pay for services in an atomically trust-minimized way, without either party trusting each other — but it doesn’t work over Lightning yet like Sats4Files.

IACR Cryptology ePrint Archive
Zero-Knowledge Contingent Payments Revisited: Attacks and Payments for Services
Zero Knowledge Contingent Payment (ZKCP) protocols allow fair exchange of sold goods and payments over the Bitcoin network. In this paper we point ...