#HasanIkram062

1 messages · Page 1 of 1 (latest)

tidal heartBOT
astral marten
#

👋 happy to help

#

After that i am not receiving any event.
what do you mean by that?

#

which events were you expecting?

primal escarp
#

I just called the command mentioned it ran first time successfully for the same customer. After that when i hit the command it does not send any event to webhook URL.

#

Although showing that Trigger specific webhook events to be sent.

astral marten
#

I'm not sure I follow

#

would you mind sharing some more details?

primal escarp
#

Here is the Stripe CLI screenshot when i hit the mentioned command with my customer id

astral marten
#

I think you have an extra blank space before skip

#

it's --skip not -- skip

primal escarp
#

According to the given command, Stripe should send the invoice.payment_failed event against the customer id (cus_NSMrP8BUsi2mb0). But when i hit it first time, it sent an event but that was for invoice.payment_succeeded.
And after that i tried again to hit the command and i have not received any event.

#

When i remove that space, it is creating new customer and send the event.

astral marten
#

would you mind sharing the event ID?

primal escarp
#

Let me

#

evt_1MhW8qKD0Q9J0AcafzGKlrPF

astral marten
#

ok I'm checking for you please give me a couple of minutes

primal escarp
#

Sure

astral marten
#

stripe trigger invoice.payment_failed --skip customer --override "invoiceitem:customer="cus_NSMrP8BUsi2mb0 --override "invoice:customer"=cus_NSMrP8BUsi2mb0 --override "payment_method:customer"=cus_NSMrP8BUsi2mb0

#

try this please

primal escarp
#

Sure let me

#

Give me a couple of minutes

astral marten
#

sure

primal escarp
#

Can you please verify you have = sign within double quotes on first then later it is out of the double quotes?

#

I have tried it but not receiving any event.

astral marten
#

I tested the one I sent you and it worked normally

primal escarp
#

Let me try again

#

Tried again, but have not received any event onto webhook URL.

astral marten
#

there's a small typo in what I pasted earlier

#

stripe trigger invoice.payment_failed --skip customer --override "invoiceitem:customer"=cus_NSMrP8BUsi2mb0 --override "invoice:customer"=cus_NSMrP8BUsi2mb0 --override "payment_method:customer"=cus_NSMrP8BUsi2mb0

#

could you please retry that one?

primal escarp
#

sure let me

#

I have tried this one as well, but it setting up new customer and sent event: evt_1MhWWdKD0Q9J0AcaKXJR3QjR

astral marten
#

could you try --skip=customer

#

the problem is that you're testing CLI in Powershell if I'm not mistaken, and sometimes different shells behave differently

#

would you mind also checking the Stripe CLI version as well stripe -v?

primal escarp
#

Yes i am trying it on browser Mozilla Windows.

astral marten
#

is this the hosted CLI on the docs page?

#

Ok you're right

#

it doesn't work on the docs CLI

primal escarp
#

Yes right
Moreover, it is not giving version.

astral marten
#

I will try to see internally how this might be fixed

#

would you mind downloading the Stripe CLI and trying it out on your own PC?

primal escarp
#

Not on the docs page but onto Dashboard where i am login

astral marten
#

it's the same one

primal escarp
primal escarp
astral marten
#

the Stripe CLI Shell is a minified version and doesn't support all of the functionalities

astral marten
#

I'm escalating this internally

primal escarp
#

Yes please that it should support fully. What if a user don't want to download and to use it online only?

#

So first i have to download stripe cli and try there

astral marten
#

yes please do

primal escarp
#

Let me try

#

That's great

#

It worked on CLI

astral marten
#

great

primal escarp
#

Just one more thing i need to know:
It is also possible that i can set attempt_count to some integer value like 3?

#

Basically i have a requirement that when an invoice can't be paid due to any reason and when stripe retries it 3rd time and got unsuccessful again, then i should capture this 3rd time invoice.failed_payment event.

swift moon
#

I'd recommend using the --edit flag instead of --override

#

You can then add/change parameters in the fixture as you need

primal escarp
#

Can you please provide the command for it? It would be of great help

swift moon
#

stripe trigger invoice.payment_failed --edit

#

It'll open the fixture in your IDE and you can edit all the fields there

primal escarp
#

Giving error while running your command

swift moon
#

Looks like your defualt IDE (vim) isn't openable for some reason. Nothing related to the CLI

primal escarp
#

What should i do then?

swift moon
#

I'd recommend fixing that, or continue using --override

primal escarp
swift moon
#

Have you tried anything yourself?

primal escarp
#

Yes i already doing. The thing is i could not find anything related to custom commands onto internet. Otherwise i would not bother to come here for support.

swift moon
#
stripe trigger invoice.payment_failed --skip customer --override "invoiceitem:customer"=cus_NSMrP8BUsi2mb0 --override "invoice:customer"=cus_NSMrP8BUsi2mb0 --override 
"invoice:attempt_count"=3 --override 
"payment_method:customer"=cus_NSMrP8BUsi2mb0
#

Maybe that will work?

primal escarp
#

Thanks alot

#

Giving error of parameter known.

swift moon
#

Yeah I guess the attempt_count field cannot be mutated

#

You should just use a test clock to simulate multiple failures if that's what you need

primal escarp
#

Its ok. Thanks