A little bit of info for people who find this thread through Google (it’s top result for “middleman stripe” right now…)
The way Stripe works is called “tokenised payment” - their front-end JS collects your card details, sends them directly to Stripe’s servers (so the sensitive card data never hit your servers), and gives your front-end JS a “token”.
You then have to have some JS that sends your token to a piece of server side code that you control, that then makes an authenticated API call to Stripe’s servers, passing the token, to actually activate the charge on the credit card.
The combination of tokenisation + authenticated API makes the process secure and stops you having to handle card data (handling card data puts your business, servers and financial processes in scope for audit under the PCI regulations; you don’t want this)
So, having said all that - you could also look at Trolley. (Disclaimer: I’m the author!)
Trolley is a JS cart designed for static & JAMstack sites and it works great with Middleman (and Jekyll, hugo etc etc). It gives you a Stripe backend-as-a-service, plus some features for managing customers and products over and above what Stripe offers.
All you have to do is register for Trolley (free), connect it to your Stripe account (2 clicks) and paste an HTML tag into your website. No JS or server-side coding required at all, secure, and gives you all the advantages of Stripe as a payment processor.
Trolley’s free til you take a payment, then it’s commission on top - no fixed fees.