BOUNTY (30USD): Middleman + Stripe integration 🤑

Hello,

I want to integrate simple Stripe JS checkout (both single product and subscription option) on my site. I am not looking for shopping cart solution, instead, simple single checkout so the moment you press “buy” or “subscribe” button, you are shown Stripe checkout js pop-up, enter CC info and viola!

I couldn’t find on Github any examples of such integration.

P.S. Updated the post to actually offer money for the solution. Can send money using PayPal. Let’s chat.

Help!

You need a server side script also to action the callback tokens

Do you have this infrastructure setup?

This is more complicated than your other request

But again I have done this

Ian

Hey Ian!

Yes, I have both NGINX and PHP installed on my DigitalOcean server. So I am OK if you use PHP script for the backend - will that work for you? Or you prefer Ruby?

Bumping the bounty to 40USD. Still need someone who could come up with simple (no frameworks, just Middleman + some back-end script) solution.

This is actually really straightforward. Happy to help! No need for any server-side scripts.

Hey! Will that work with subscriptions (not just a single, one-time product purchases)? Of course, no need for customer management part since all data can be managed (customers, plans, subscriptions) directly within Stripe dashboard.

Also - this would need to handle failed payment attempts (card declines) callbacks and show relevant info back to the user.

The UI should be achieved with Stripe Elements (https://stripe.com/elements)

Sounds like you already know what you need to do. Just use Stripe checkout or elements.

Are you wanting all of the work done for $40?

That’s correct. I would like someone else to handle it for me.

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.