#Ivan - Stripe CLI

1 messages · Page 1 of 1 (latest)

rough grotto
#

Hi 👋

#

Let's keep the discussion in this thread.

#

but is not working

celest flower
#

hi

#

this steps dont work

#

i tried this

rough grotto
#

Do you have Docker installed?

#

Is there a reason you are using Docker?

celest flower
#

yes

#

because it supose to be easy

#

but this steps from stripDocs is not working

rough grotto
#

Docker is another layer of complexity so it makes the implementation less easy than otherwise

#

But it has some potential advantages as well.

#

What is the output you get when you run the first command?

celest flower
#

(stripevenv) D:\stripe\stripevenv>docker run --rm -it stripe/stripe-cli:latest
The official command-line tool to interact with Stripe.

Before using the CLI, you'll need to login:

$ stripe login

#

so, i tried to run "stripe login"

#

and that happens

#

(stripevenv) D:\stripe>stripe
'stripe' não é reconhecido como um comando interno
ou externo, um programa operável ou um arquivo em lotes.

#

does not reconize the command

rough grotto
#

But that command is not running inside the container (which is where the stripe command exists).

#

This is an example of the Docker approach adding complexity

celest flower
#

how can i login before run??

#

and to run I need to login?

#

is not logical.

rough grotto
#

I think the problem is that you are using Docker containers to house the runtime of the Stripe CLI without understanding how the container itself operates

celest flower
celest flower
#

but thank you

#

even the windows instructions does not working

rough grotto
#

Did you download the latest Stripe CLI for windows and install it using the .exe file?

celest flower
#

yes

rough grotto
#

And you cannot run stripe login?

celest flower
#

i run

#

i do not understand the instructions

rough grotto
#

The pairing code? and then press enter to open a web browser?

celest flower
#

I did that

#

know seems to be working

#

but, is not going to my endpoint at django

rough grotto
#

You mean it's not connecting to your webhook endpoint? What is it that you are trying to achieve?

#

It looks like you are triggering events.

#

In order to send those events to a django application running locally you need to also have a PowerShell (or other terminal application) running stripe listen

#

The stripe listen command is what forwards events to your local machine

#

I have a local Django application that handles the webhooks from my test integration. I use Stripe Listen to forward my Stripe webhook events like so: stripe listen --forward-to localhost:8000/webhook/. Where my Django app is running on port 8000 and my webhook listener function is at the /webhook/ endpoint.

celest flower
#

Yes, I am trying to run the exemple first

#

the result of stripe listen:

#

but that part of code, does not run

#

but every ting seems to be working

rough grotto
#

When you run stripe listen are you forwarding to port 4242

#

?

celest flower
#

this worked:

rough grotto
#

And does your Django dev server show a request hits the server?

celest flower
#

No

rough grotto
#

Okay what is the context of the Flask app you are running?

celest flower
rough grotto
#

That's a lot of pictures of terminals but it doesn't really help. What code are you running in your Flask app?

glossy cipher
#

@celest flower right now there isn't much to help you unfortunately. Have you been able to hit your own endpoint yourself first with curl or Postman?

celest flower
#

the main error is that

glossy cipher
#

Sure but let's ignore Stripe and the CLI for a minute. Does this work if you hit your server yourself with curl or Postman?

celest flower
#

yes