Meteorjs and Stripe Checkout Intergration?


#1

is there a example showing Meteorjs and Stripe checkout integration?


#2

Yes, here is…


Check this package.


#3

That’s using an old version of stripe


#4

Checkout this http://themeteorchef.com/recipes/building-a-saas-with-meteor-stripe-part-1/


#5

Here’s what I learned while integrating stripe into an app quite recently.

  1. The client uses Stripe.js and must never send the card info over the wire untokenized (to your server) Stripe.js needs to load from stripe’s server. The issue here is that most meteor packages that use stripe realize that a script tag in the template body won’t be able to process that tag prior to rendering the template., so they tend to put it into a blank html pages head… I used the iron router to waitOn loading my script, so it only loads on the page with the stripe template, not on the whole site, as putting in the head will tend to do… (global)
  2. the server can use Stripe’s npm package fine, with the caveat that you know how to wrap async functions to meteorize them…
  3. Literally everything you want to know further can be obtained in the lovely api docs
    https://stripe.com/docs/api
    Stripe provides a transaction ID as a response to a Charge, you can do things like not capturing that approved charge, and you have 7 days to capture it (approval of purchase?) you can use that transaction ID to capture said Charge, or you can use it after capture to Refund etc…
    I basically made a whole bunch of Methods that wrap stripe api functionality and then I can call them at will…
    oh and the difference with Stripe Checkout is that you haven’t to worry about the tokenized form not returning the card details by default submit… whatever you do, don’t send untokenized card data…

#7

So we’ve started porting Stripe to Meteor in the package https://atmospherejs.com/benjick/stripe-native but it’s not 100% complete yet. Most basic stuff are working. It also includes Stripe.js

Another package which adds the Stripe npm module and Stripe.js is https://atmospherejs.com/benjick/stripe but as you said it must be wrapped with wrapAsync.


#8

Thanks guys, very useful insight, and yes Vectorselector is right, everything is pretty much in the API.

But I still think there should be some more tutorial on the internet about Stripe and Meteor intergration though as it is quite important