Difficulties Getting Strip Demo Working

71 views
Skip to first unread message

Jason Horowitz

unread,
May 14, 2021, 7:44:56 PM5/14/21
to Kill Bill users mailing-list
Hi,
I'm not able to get the Strip demo working locally.

I'm following the "KillBill + Stripe DIY Tutorial" step-by-step:
- I'm able to get the Dockerized Kill Bill + Kauai container running
- Using Kauai I'm got the tenant "Bob" configured in exactly the way described
- I have a Stripe account
- I'm able to download the ruby sources and dependencies
- when I run the command that ends with "ruby app.rb" - I get the following error:

<internal:/usr/local/Cellar/ruby/3.0.1/lib/ruby/3.0.0/rubygems/core_ext/kernel_require.rb>:85:in `require': cannot load such file -- killbill_client (LoadError)

from <internal:/usr/local/Cellar/ruby/3.0.1/lib/ruby/3.0.0/rubygems/core_ext/kernel_require.rb>:85:in `require'

from app.rb:2:in `<main>'

Can anyone say what my issue is?

Thanks very much in advance,
Jason

Pierre-Alexandre Meyer

unread,
May 17, 2021, 3:07:09 AM5/17/21
to Jason Horowitz, Kill Bill users mailing-list
Hi Jason,

It looks like some of the Ruby dependencies required for the demo app weren't installed.

Try running `bundle install' before `ruby app.rb'.

Hope this helps,


--
You received this message because you are subscribed to the Google Groups "Kill Bill users mailing-list" group.
To unsubscribe from this group and stop receiving emails from it, send an email to killbilling-us...@googlegroups.com.
To view this discussion on the web visit https://groups.google.com/d/msgid/killbilling-users/ac8416fc-16c9-408a-94c1-c80cb3e728f0n%40googlegroups.com.


--
Pierre

Pierre-Alexandre Meyer

unread,
May 18, 2021, 8:52:22 AM5/18/21
to Jason Horowitz, Kill Bill users mailing-list
Hi Jason,

Could you try running `bundle exec ruby app.rb` instead of `ruby app.rb`?

Regarding a Docker option, that's a great idea. I'm tracking it here: https://github.com/killbill/killbill-stripe-demo/issues/5

Kind regards,

On Mon, May 17, 2021 at 5:48 PM Jason Horowitz <ja...@scribal.io> wrote:
Hi Pierre-Alexandre,
Thank you for your response. I ran 'bundle install' and still get the same error message -

jasonhorowitz@Jasons-MacBook-Pro killbill-stripe-demo % bundle install                                                                                    (git)-[master]-

Using bundler 2.2.17

Using killbill-client 3.2.0

Using rack 1.6.13

Using rack-protection 1.5.5

Using tilt 2.0.10

Using sinatra 1.4.8

Bundle complete! 2 Gemfile dependencies, 6 gems now installed.

Bundled gems are installed into `./vendor/bundle`

(base) jasonhorowitz@Jasons-MacBook-Pro killbill-stripe-demo % KB_URL='http://172.20.0.3:8080' PUBLISHABLE_KEY=pk_test_51IqnA0Eo7AG2MTY7uX3XPE2IHACG6CsmkwJfJnMPVDUu32mHpuPlRLnmLXXdozZeozxYKHJHPOjzqel9I57nCIo9004Pn8ohMg ruby app.rb

<internal:/usr/local/Cellar/ruby/3.0.1/lib/ruby/3.0.0/rubygems/core_ext/kernel_require.rb>:85:in `require': cannot load such file -- killbill_client (LoadError)

from <internal:/usr/local/Cellar/ruby/3.0.1/lib/ruby/3.0.0/rubygems/core_ext/kernel_require.rb>:85:in `require'

from app.rb:2:in `<main>'


I ran the 'bundle install' command in the same directory <killbill-stripe-demo> as the app.rb file. Is that relevant?

Any thoughts about offering the Stripe demo as a docker image? My problem probably has to do with my specific environment.
Thanks again,
Jason


--
Pierre

Jason Horowitz

unread,
May 18, 2021, 2:15:24 PM5/18/21
to Pierre-Alexandre Meyer, Kill Bill users mailing-list
Pierre,
Thank you for making an issue out of the dockerized version. I may try to get one running myself as a next step in troubleshooting.

I did try running `bundle exec ruby app.rb` and still got a failure (below).

(base) jasonhorowitz@Jasons-MacBook-Pro killbill-stripe-demo % !!                                                                                                              (git)-[master]-

KB_URL='172.20.0.3:8080' PUBLISHABLE_KEY=pk_test_51IqnA0Eo7AG2MTY7uX3XPE2IHACG6CsmkwJfJnMPVDUu32mHpuPlRLnmLXXdozZeozxYKHJHPOjzqel9I57nCIo9004Pn8ohMg bundle exec ruby app.rb 

app.rb:2:in `require': cannot load such file -- killbill-client (LoadError)

from app.rb:2:in `<main>'

Pierre-Alexandre Meyer

unread,
May 19, 2021, 8:45:19 AM5/19/21
to Jason Horowitz, Kill Bill users mailing-list
Hi Jason,

This is quite strange. It looks like there is something going on with your setup, but I'm not sure what.

Taking a step back, what are you trying to do? The demo is only a small website front-end in Ruby to show how the integration works. You could simply do the integration with stripe.js/Elements yourself, in your stack of choice (ReactJS, etc.).

Hope this helps,
--
Pierre

Jason Horowitz

unread,
May 19, 2021, 10:16:30 PM5/19/21
to Pierre-Alexandre Meyer, Kill Bill users mailing-list
Hi Pierre,
Testing the end-to-end integration is exactly what I wanted to do: to see how the subscription flows between the front-end, stripe and the kb/Kaui interface.

Some things I am trying to understand on behalf of our customers:
- what does killbill do that can't be done directly in Stripe (I presume Stripe has increased it's subscription billing features over the years);
- what does the subscription xml file look like after you create a few subscriptions
- is it possible to create sophisticated usage-based subscriptions using the front-end (I'm guessing "no" - that we would have to create the front-end interface for this on our own).
And there are probably other valuable insights I would derive from using the system hands-on.

You're right, I could write the integration in flask, but that's not what I do (it would be time-consuming). Is it possible to accomplish the same thing from the CLI using curl or something similar?

I really appreciate that you took the time to read and answer my earlier questions. Thank you.
Regards,
Jason

Pierre-Alexandre Meyer

unread,
May 20, 2021, 7:12:34 AM5/20/21
to Jason Horowitz, Kill Bill users mailing-list
Hi Jason,

Replies inline.

On Thu, May 20, 2021 at 3:16 AM Jason Horowitz <ja...@scribal.io> wrote:
Some things I am trying to understand on behalf of our customers

Who are your customers? Are you thinking of reselling Kill Bill?
 
- what does killbill do that can't be done directly in Stripe (I presume Stripe has increased it's subscription billing features over the years);

Kill Bill does support all of the features offered by Stripe Subscriptions, but offers much more. This is a vast topic, too long to get into on this mailing-list, but https://docs.killbill.io/latest/userguide_subscription.html is a good start to understand some of the advanced subscriptions features.

If you want a couple of concrete talking points:
  • No vendor lock-in: you own your subscription data (vs having the data in the cloud owned by Stripe).
  • Ability to switch or use multiple payment vendors. The Stripe demo shows how Kill Bill can manage subscriptions while delegating the payments to Stripe (it doesn't use Stripe Subscriptions, but Stripe payments), but the same would work if you were to additionally deploy the Braintree plugin for instance (credit card payment would go to Stripe, PayPal payments to Braintree, while the subscriptions and related APIs stay the same from your app point of view).
- what does the subscription xml file look like after you create a few subscriptions

There is no subscription XML file. I suspect you are referring to the catalog XML, which is one of the ways to configure the catalog (products, plans, etc.) in Kill Bill.
 
- is it possible to create sophisticated usage-based subscriptions using the front-end (I'm guessing "no" - that we would have to create the front-end interface for this on our own).

I think the answer is "it depends" :-) 
 
And there are probably other valuable insights I would derive from using the system hands-on.

We offer a self-service sandbox if you want to play with it: https://cloud.killbill.io/ (it's not integrated with Stripe for payments but I don't think it matters for your evaluation). 

You're right, I could write the integration in flask, but that's not what I do (it would be time-consuming). Is it possible to accomplish the same thing from the CLI using curl or something similar?

Sure, we offer many APIs that you can use with curl:  https://killbill.github.io/slate/

The community has also contributed a CLI written in Go: https://github.com/killbill/kbcli/tree/master/kbcmd

Hope this helps!

--
Pierre

Reshma Bidikar

unread,
Jul 13, 2021, 6:37:46 AM7/13/21
to Kill Bill users mailing-list
Hello,

The docker image for the stripe demo is now available and can be run as explained in the updated Stripe tutorial.

Regards,
Reshma
Reply all
Reply to author
Forward
0 new messages