#harsha.bharadwaj-payment_intent.cancelled
1 messages · Page 1 of 1 (latest)
You may be able to do this via CLI https://stripe.com/docs/cli/trigger
Or you can create and cancel one yourself via the API
it's a stripe connect event I've to generate
I'm using the test cards mentioned here https://stripe.com/docs/testing
Then you can pass in the --stripe-account argument https://stripe.com/docs/cli/trigger#trigger-stripe_account
but the event generated through cli is different from the auto generated event
the structure is different
How so?
yeah
Where are you seeing the structure as different?
I am still unclear on what is happening here.
So are you having trouble getting the event to be sent or in receiving it?
I would like to generate a test event where from stripe connect for payment_intent.canceled
I've done it for payment_intent.succeeded and payment_intent.failed
by using testing cards
but unable to find any testing card to generate cancelled payment inten t
Thank you for the clarification
The cancelled state is not related to charges failing so there won't be a card for it. https://stripe.com/docs/payments/intents
The cancelled state is something you induce. You can cancel a PaymentIntent in the Dashboard or with the API https://stripe.com/docs/api/payment_intents/cancel
ah okay
It is for you to prevent further charge attempts from that PI
I'm able to generate it with this as per you suggestion stripe trigger --stripe-account acc_XXXXX payment_intent.canceled
but I'm not able to listen to this event in local machine
this is the command I'm using to listen to stripe listen -a http://localhost:8000/stripe-connect
I think you will want to use -c or --forward-connect-to because this is connect https://stripe.com/docs/cli/listen#listen-forward-connect-to
this is the command I'm using stripe listen -c http://localhost:8000/stripe-connect
So are these events showing up at all on your CLI?
Do you have the event ID evt_123 of an event that you generated like this?
this is the error "invalid_request_error"
I'm trying to resend it with the id but throwing an error
yeah
The CLI is giving you invalid_request_error?
Can you paste the full error text here?
{ "error": { "code": "resource_missing", "doc_url": "https://stripe.com/docs/error-codes/resource-missing", "message": "No such notification: 'evt_3JwBRhPaFBJIpqYu0JkkeqTO'", "param": "id", "type": "invalid_request_error" } }
And that was on the stripe trigger --stripe-account acc_XXXXX payment_intent.canceled command?
the error is on stripe events resend evt_3JwBRhPaFBJIpqYu0JkkeqTO
When you do that you will also want to use the --stripe-account argument
this is the errorr I'm getting now
{ "error": { "message": "You are not permitted to configure webhook endpoints on a connected account. Did you mean to create a Connect webhook on your account instead?", "type": "invalid_request_error" } }
Apologies, I do not use the CLI much. Try also using the --account param and pass in the platform's account ID. https://stripe.com/docs/cli/events/resend#events_resend-account
If that doesn't work, send me your full command again and I will make sure I am recreating this properly on my side
Can you restart your listen commend but with --log-level debug and then try sending the event again?