3

I have a client that is going to use Stripe Checkout (https://stripe.com/checkout). We are trying to figure out how we can simply record the sale data into Craft. We know of other plugins that use Stripe, but we really want to use Stripe Checkout as it is great for mobile.

  1. How can we write data to an entry after the Stripe sale? We would need basic things like Customer Name, Item(s) purchased, Order Total. The items would all be entries in Craft already.
  2. How can we restrict content viewing based on the items purchased? Basically if you buy Product X which is an entry page of content, how can I secure that entry so only people who have a confirmed purchased can view the template? Since there will be about 10 products, we really can't use User Groups for this. We need the permission to be on the item purchased level.

Any help is greatly appreciated. If we need a custom plugin for this would anyone be interested in making one? Should be pretty simple using the Stripe API I would imagine.

1

My understanding of Stripe Checkout is that it doesn't actually charge the user's card. It simply authorises it, and returns a token which you can then use in a server-side script to capture the payment using the Stripe API.

As such, you'll need a server-side component, in the form of a plugin. Charge might provide a decent starting point for that.

I don't think Charge works with Stripe Checkout as standard, but it's probably worth having a chat with the developer (Joel Bradbury) about the costs of adding this functionality.

1

Disclaimer : I'm the developer of Charge so am obviously biased

Charge uses the Stripe API directly and doesn't support the Stripe Checkout modal method for payments. It is something I've looked into, but haven't had the opportunity to implement.

Stephen's comment is correct - while the front-end form implementation is simplified using Stripe Checkout, a server side component is still required and that's where the majority of the work is.

If you really require Stripe Checkout support it's certainly something that can be added. Get in touch here and we can discuss details/requirements

On the side of updating elements on success, that's a feature that's in the next release of Charge (2.0), which I'm prepping right now.

  • That is great Joel. I will watch for Charge 2.0 as that success updating feature is one we have been looking for. – Bryan Garrant Mar 4 '15 at 13:03

Your Answer

By clicking “Post Your Answer”, you agree to our terms of service, privacy policy and cookie policy

Not the answer you're looking for? Browse other questions tagged or ask your own question.