Marcolino922's avatar

Stripe CLI

Hi, I downloaded the Stripe CLI package for Windows but once I start the .exe file it opens the window but immediately after it closes automatically.

I don't understand the problem, how can I proceed? Do I need to install Stripe CLI to set URLs (localhost) on endpoints?

0 likes
12 replies
bait-dept's avatar

When using stripe for windows I believe that you need to execute the file from the terminal using the params that you want.

in terminal run:

./stripe.exe command
Snapey's avatar

if its windows .exe then you should open a CMD window and run it from there. You will then see its feedback.

martinbean's avatar

@marcolino922 Stripe CLI. CLI. Command line interface. You use it from a command prompt; you don’t open it as if it were a desktop program.

Marcolino922's avatar

Ok, perfect, all ok, thanks everyone.

Being a beginner, I would like to better understand the usefulness of CLI since it is required from the first step to install Stripe.

What is it useful for? I was advised to set up the various webhooks to manage payments that fail, but how do I proceed?

To those who want to help me, I ask you to explain me as simplified as possible, thank you very much.

martinbean's avatar

You don’t “install” Stripe. Stripe is a web service. You interact with it using APIs.

You’d use the Stripe CLI to capture webhooks in a local environment, where your project running locally isn’t publicly-accessible on the Internet, so Stripe won’t be able to delivery webhooks to your local application. But the CLI will create a tunnel so your application’s webhook listeners can receive webhook events and respond accordingly.

Marcolino922's avatar

Sorry, I didn't mean that, I'm Italian: D

Anyway, I logged in via "stripe login" but I don't understand how to handle declined payments.

I explain my problem of why I have come this far, in my application to create a new subscription I try a card that will be rejected (4000 0000 0000 0341), so the subscription will be in the "incomplete" state.

Subsequently, the page is opened to reconfirm the data, by inserting now a valid card (4242 4242 4242 4242) the payment is successful, but the subscription remains in the "incomplete" state.

Here, how do I solve this?

Marcolino922's avatar

Ok, I managed to do everything.

Just one question, let's assume that a customer's subscription must automatically renew, but his card has no available funds and is therefore rejected, what happens?

martinbean's avatar

The same as any other subscription site: if the site can‘t take the funds then the subscription is cancelled.

Marcolino922's avatar

It gets canceled immediately, right? Or is it renewed momentarily by automatically making X attempts and then subsequently canceled?

Thank you

martinbean's avatar

It gets canceled immediately, right?

@marcolino922 No.

It sounds like it would probably worthwhile for you to spend a bit more time reading Stripe’s documentation. Their docs are good and they cover things like the subscription lifecycle.

Marcolino922's avatar

It is not an attack on you, but rather I thank you for your help, but I spend more than 16 hours a day but it becomes twice as difficult when any guide or tutorial that is not in your native language, when it becomes difficult to search and find something.

I repeat, it is not an attack on you but indeed I thank you, but I wanted to clarify this. Anyway, I'll see the guides better, thanks.

martinbean's avatar

Stripe will attempt the payment up to three times I think it is. The subscription will still be active in this time, but go into a “past due” state. If Stripe can’t take the payment after the third attempt, then the subscription will be cancelled due to non-payment.

This does rely on your webhook handler being set up properly, though. As the subscription is cancelled on Stripe’s side, and it will send a message to your application. Your application should then mark the subscription as cancelled in your database as well.

Please or to participate in this conversation.