13 ms·
Stripe CLI
- nickjj 7y agoThis looks really good. It sounds like you won't have to configure tools like ngrok anymore to accept webhooks on a local connection. That's a huge win because with the free version of ngrok your subdomain would change a lot which means having to goto the Stripe dashboard to update it there. It was pretty tedious.
- kauegimenes 7y agoThat's why i switched from ngrok to localtunnel (global npm package) https://www.npmjs.com/package/localtunnel https://www.npmjs.com/package/localtunnel You can just run lt -p 8080 --subdomain whateveryouwant ;)
- benologist 7y agoThis is a free equivalent to ngrok and it only uses SSH - https://serveo.net/ https://serveo.net/ - and it accepts custom subdomains. I spin it up for each project like this with $DOMAIN and $PORT being defined/fixed for each project and the connection kept open permanently using autossh: ssh -R $DOMAIN:80:localhost:$PORT serveo.net There are API endpoints for creating, listing and deleting webhooks in Stripe now too - my test suites and dev instances purge any existing webhooks and create a new one each run. https://stripe.com/docs/api/webhook_endpoints/create https://stripe.com/docs/api/webhook_endpoints/create
- MuffinFlavored 7y agoDo you think there would be demand for `serveo` but instead of running your project locally, you point to a Dockerfile and the entire container + all of its dependencies are ran remotely (with wildcard subdomain SSL included)? I was going to test the waters with https://www.dollardeploys.com/ https://www.dollardeploys.com/ (not functional yet), wasn't sure how to differentiate it between ngrok/serveo.
- benologist 7y agoI think at that point you're really into Heroku's territory rather than ngrok/serveo. Their free dynos might be hard to compete with, you can push a git commit or docker image or automatically deploy upon repo changes: https://devcenter.heroku.com/categories/deploying-with-docker https://devcenter.heroku.com/categories/deploying-with-docke...
- MuffinFlavored 7y agoI 100% agree which is why I decided not to pursue the idea. Thank you very much for taking the time to provide feedback!
- CallMeMarc 7y agoI've started using `serveo.net` to monitor my internet uptime (Raspberry Pi with a simple webserver, [updown.io](https://updown.io https://updown.io) to request it via [serveo.net](https://serveo.net) https://serveo.net)) but they were unavailable/offline for ~4 days within the last 10 days.
- benologist 7y agoCurrently offline due to phishing. Serveo is temporarily disabled due to phishing. Serveo will return in a few days with a few new restrictions to help dissuade abuse. Thanks for your patience!
- CallMeMarc 7y agoThe message is new, usually the website was also down, but this probably explains why.
- zip1234 7y agoYes setting up all that stuff was one of the most painful things about local development working with Stripe webhooks. This is a good solution.
- sumukh1 7y agoI still prefer to setup ngrok because it allows me to view and replay requests. If the stripe cli supported that, then I'd move to use the cli entirely
- nickjj 7y agoYeah that's true, another upside to ngrok is it works for not just Stripe. Sometimes you need to link up with multiple payment gateways and listen for webhooks from 1 of them at a time.
- zehtomer 7y agoOn the listen side, you can run `stripe listen --print-json` which will output the entire object. You can also resend events by doing `stripe events resend <event_id>`. We'll see about documenting both better!
- deforciant 7y agothat's nice! :) I have found that quite often Stripe's UI would just through errors when trying to open some customers, failed payments or subscriptions. Couldn't really pinpoint why it happens, tried different browsers, disabling extensions and so on. Hopefully CLI wil work :)
- rattray 7y agoHmm, that shouldn't happen – mind shooting me an email with an ID or two that failed? rattrayalex at stripe.
- TechTeam12 7y agoI filled a bug task on your github page, but you've got a deadlink for the linux install in your readme. Really excited to get to use these tools. Already integrated with stripe for my projects, but this will allow for more cool testing. Thank you stripe team!
- auchenberg 7y agoKenneth from Stripe here. We just committed a fix. Thanks for the heads up! https://github.com/stripe/stripe-cli/commit/edaa05a505e935a53a96a9ba2290ef09192fcf16 https://github.com/stripe/stripe-cli/commit/edaa05a505e935a5...
- benburleson 7y agoVery impressive. From an engineering standpoint, Stripe knocks it out of the park.
- 18nleung 7y agoHow can I get the multiple terminals view in the blog header image?
- volkk 7y agolooks like just your regular iterm2 split panes?
- chaos_emergent 7y agoalternately, you can use tmux which lets you detach sessions, rotate panes, and configure them in whatever arrangement you'd like! Would highly recommend it :)
- dmlittle 7y agoAlternatively iTerm2 also comes with a native tmux integration. I personally prefer using tmux on my own but have several friends who prefer the iTerm tmux integration (copy-pasting text is definitely easier).
- auchenberg 7y agoKenneth from Stripe here The demo is using https://hyper.is/ https://hyper.is/ with it's standard dark theme and terminal splitting which is built in.
- daliusd 7y agoWow, so I have implemented Stripe integration in my project recently and I was using at least one feature mentioned in this blog. It was breeze to add payments to my project (and I have experience with some other systems that requires days to implement and test properly).
- chadlavi 7y agoThis is a great improvement! Last time I did a stripe integration it was definitely kind of a painful, disjointed experience.
- MuffinFlavored 7y agoReally? It's like... 3 API calls. Create a customer, store a card, create a charge.
- ceejayoz 7y agoThere's quite a bit more complexity in some use cases. Some payments are now asynchronous due to https://en.wikipedia.org/wiki/Strong_customer_authentication https://en.wikipedia.org/wiki/Strong_customer_authentication ; handling failed payments for things like subscriptions takes some effort (and managing webhooks). My experience with Stripe has been great, but payments can still get into the weeds through no fault of Stripe's.
- MuffinFlavored 7y agoI might sound a bit dumb here, but would a cron job that runs daily, finds customers who haven't been billed in 30 days, then tries to bill them and disables their account on failure easier than dealing with webhooks/etc.?
- ceejayoz 7y agoPotentially, but Stripe has a lot of features you might have to duplicate in that case. They automatically re-attempt (including machine learning that tries to do it when the card's least likely to be maxed out). They send email receipts, handle SCA notifications if additional authentication is required...
- twunde 7y agoSome other examples of complex use cases: connected accounts, reconciliation reports, dunning reports, non-traditional ecommerce workflows. From a security perspective, I'd love the ability to enforce 2FA instead of having to audit the users table every month. To be fair I think the number of clients with 50+ connected accounts is fairly low
- knubie 7y agoStripe is by far the best developer experience I’ve had in my career working with third party APIs/services. The attention to detail is just second to none, and documentation is a big part of this.
- pc 7y agoThanks! We still have a lot of work to do. (Making our integration experience simpler -- now that Stripe's functionality has grown so much -- is an area of current focus. If any HN readers happen to have specific suggestions on this front, feel free to email sebas@stripe.com.)
- davedx 7y agoOne thing I loved recently was finding a small error in your nodejs docs. I tweeted you and had a response within an hour or two that it would be fixed. Please keep listening like this, it’s greatly appreciated!
- eganist 7y agoHey, from a security angle, can I express my appreciation for how much your team has worked to make security best practices and shared responsibility extremely clear? https://stripe.com/docs/security https://stripe.com/docs/security Apologies for the hijack, just wanted to say thanks.
- simlevesque 7y agoThe best part is that you guys keep the logs for the last events and webhooks you sent with the request and response... this is such a time saver that I can't figure out why you are the only big players doing it.
- jchw 7y agoHonestly, the only problem I ran into with Stripe ever was administrating subscriptions. IIRC even via the API there were a lot of limitations with what state you could put a subscription in, limiting our ability to seamlessly transition from Recurly to Stripe; we ended up duplicating a lot of the subscription logic in the end. I know subscriptions have been significantly rehauled since then, but this was my only gripe. Stripe was absolutely excellent back when I used it.
- skyraider 7y agoI like the attention to detail this feature reveals - in particular, how if you're in Stripe test mode in browser tab X and type `stripe login`, the cli will open a page in browser tab Y that gives you a test mode webhook secret, without prompting you to select a mode again. Very intuitive.
- SalesDevRep 7y agoGreat stuff, wonder if they used any frameworks like oclif or something as a base. Looks extremely detailed, and wow, how do they always launch with such great docs?! Baffling (in a good way)!
- bckmn 7y agoLooking through the repo's dependencies (https://github.com/stripe/stripe-cli https://github.com/stripe/stripe-cli), it seems they are using the GO CLI framework Cobra (https://github.com/spf13/cobra https://github.com/spf13/cobra).
- yingw787 7y agoWow, this is amazing! I was learning more about ncurses and the various UI libraries built on top of them (e.g. Urwid). From going without Internet for a third of this year and using 1GB of mobile data per month, I've learned there aren't actually that many companies these days trying to serve customers with slow/intermittent Internet or optimize for data load. And that's an opportunity, because those customers are most likely sticky! I read that 3% of Americans still use dial-up internet, which amounted to 9.4 million people in 2016 (https://www.allconnect.com/blog/people-really-still-use-dial-internet-actually-9-4-million https://www.allconnect.com/blog/people-really-still-use-dial...). IIRC this is still better than the Internet connectivity in developing countries. If you got $1 from each of those people every year (less than 10 cents a month), you'd have $9.4m ARR, and it'd be sticky. Sticking to curses enables issuing API requests out to the world without having to build/download/install a GUI/XWindow server, and an entire browser on that GUI, and an entire webpage on that browser, which may drastically improve reach. Optimizing for legacy machines and empathizing with such a customer base is probably a big reason why WhatsApp looked so attractive to Facebook and why Facebook paid such a high premium to have the platform under its product ecosystem. I'm looking forward to seeing how this expands!
- soygul 7y agoExcellent product, fast improvements, best in class API/SDK, and documentation; this was pretty much my summary after extensive research on payment processors. After 2 years of using Stripe, my conclusion is unchanged. Also, an interesting coincidence that I've just released a case study of Stripe's success and recent $35B valuation [YouTube]: https://www.youtube.com/watch?v=nlFAbBvu7hA https://www.youtube.com/watch?v=nlFAbBvu7hA
- on_and_off 7y agoFwiw, we kinda had the opposite experience when trying to get them to fix the a11y of their product. It has been a constant struggle on all platforms to get the stripe widgets to behave correctly. Since payment is not exactly an optional step in a product, this has been very painful.
- ztratar 7y agoCurious which widgets you're talking about?
- on_and_off 7y agothe credit card data input widgets that stripe provides
- zehtomer 7y agoHi all! I'm one of the folks who's been working on this for the past few months. I'm happy to answer some questions about the CLI or how it was built (using Go and websockets for pushing data). If you have any ideas or feedback feel free to email me directly too! tomer@stripe.com -- We'd love to hear how you're using the CLI and what you'd like to see in the future.
- numtel 7y agoSuper minor complaint, but when I suspend/lose connection for a while and it restores, I have to restart the CLI to resume receiving events.
- zehtomer 7y agoWe're looking into improving the disconnect/reconnect flow! Hopefully will have some progress on that soon.
- jkarneges 7y agoDoes Stripe have a public WebSocket API?
- zehtomer 7y agoWe don't, this is using a private API.
- mfbx9da4 7y agoDoes stripe PGP encrypt everything on top of TLS? Question for cli and browser
- gxespino 7y agoEnable charges of more than $1mil please.
- zuck9 7y agoCurious what your use case is.
- SomaticPirate 7y agoAlways interesting to see what CLI library is used. Looks like another feather in the cap of https://github.com/spf13/cobra https://github.com/spf13/cobra. I would love to hear why they chose cobra over something like https://github.com/urfave/cli https://github.com/urfave/cli
- appstorelottery 7y agoI too salute our stripe overlords. The payments api is so easy to use - I was done in a few hours, literally... in php (boo). :-)
- sealthedeal 7y agoLove this! We Strive everyday at Routefusion.co to model our developer experience and attention to detail off of what Stripe has done. They turned credit card payments sexy, not an easy thing to do, but when you have great experiences like this and focus on a the builders of tomorrow I guess it works!
- rsync 7y agoIn the Twilio world, I can do something like this, via the command line and their API: - activate new phone number - send SMS from that number - deactivate number I have not ever done that particular workflow, but I could. Who is the Twilio of payments/fintech wherein I could perform a workflow like this: - generate new CC number in my name - set transaction limit(s) and expiry 10 days from now - (go use that CC in real life) - deactivate the CC or maybe: - disable existing card - reenable existing card I know I could do this if I wrote the API myself and had a big, complicated, sticky relationship with a bank ... but does someone let me do things like this if I am just an end-user (like Twilio does) ?
- mLuby 7y agoSounds like something Privacy.com could do without much trouble, though I don't think they actually have a CLI (yet).
- rsync 7y agoInteresting ... although they do not have a CLI, can you call functions with 'curl', like: curl api.privacy.com CID:blahblah token:blahblah ... action-action-blah-blah ? I don't actually use a Twilio CLI - I call functions with curl from my own scripts ...
- avip 7y agoI don't know this specific site, but it's fairly common to put basic (or less basic) measures against such curl-ing.
- WrtCdEvrydy 7y agoI don't think there's a public API.
- Operyl 7y agoThere seems to be some sort of API, some of which is non-free. https://developer.privacy.com/docs#introduction https://developer.privacy.com/docs#introduction EDIT: It appears I was able to activate the API with my personal account.
- seph-reed 7y agoA lot of people say "mobile first," but I think that's because they're overlooking CLI's. They're by far the fastest way to prototype functionality, and a dream for the QA team.
- gbanfalvi 7y agoNice ad.
- ibrimstone 7y agoyou don't say!
- pavelevst 7y agoI’ve build something similar for our company about 4 years ago (also payment gateway) but made it as general free tool to test webhooks via ws https://waithook.com https://waithook.com
- albatros2ko 7y agoStill waiting for my country to be supported for years now.
- gfrangakis 7y agoIs Stripe's "documentation stack" open-source? I've seen Slate and its derivatives, but honestly nothing really comes close to the full (amazing) dev experience their docs provide.
- ryuukk_ 7y agoC# could have been GO if they focused on AOT compilation when they designed .net core, instead of just recreating .net framework for the sake of rewriting it..