#tsahnar-auth-capture-expiry

1 messages · Page 1 of 1 (latest)

trim horizon
#

Good question. Looking in to it. Do you have an ID of a PaymentIntent (pi_123) that expired like that?

cursive shard
#

I dont have - but I know that they should be expired after 7 days

#

and when manually cancelling it the cancel reason is null

#

e.g. this one pi_3JwQN1DI8A3U6F9i1f0PJpI7

trim horizon
#

It sounds like it will be automatic in your case

cursive shard
#

Automatic is always returned as null?

#

what are the automatic available reason should we expect?

#

can we set the cancel reason when we cancel it via the API?

trim horizon
#

cancelation_reason should be automatic if it is from an authorization expiring

cursive shard
#

so when the expiration of auth happened we should expect to recieve the event with the "automatic" cancel reason?

trim horizon
#

And yes, I believe so but have not been able to test that theory

#

I would check yourself now if you can

cursive shard
#

can you take a look at this payment intent? pi_3JwQN1DI8A3U6F9i1f0PJpI7

#

I cancelled it manually and the capture method is manual

trim horizon
#

Look at what about it?

cursive shard
#

You wrote above that when the expiration happened it should be sent as manual

#

or I didnt understand you

#

where can I see in the docs the "automatic" cancel reason?

#

We just want to know when the event from stripe hits are backend for cancelled payment intent that it was because of the expiration

trim horizon
#

Right. You are setting the capture_method to manual so it will be manual when it expires

#

capture_method: "manual",

cursive shard
#

ok so its not related to my question

#

But when Stripe cancells the intent because of expiration

#

what should be the expected reason?

trim horizon
#

Oh I see where I got confused on your terms

#

Stripe will not cancel PaymentIntents for failing to charge

#

You mean like 3DS auth right?

cursive shard
#

NO

#

I am talking about auth that expired after 7 days

#

Stripe cancells the payment intent

trim horizon
#

Holding funds and capturing them later?

cursive shard
#

yes

trim horizon
#

That is what I have been talking about, manual capture

cursive shard
#

yes

#

but what if no manual capture was made after 7 days

#

we will recieve the payment_intent.canceled event

#

what would be the cancellation reason if at all

#

we would like to catch the event and know that it was stripe that cancelled the intent because 7 days has passed

trim horizon
#

Reason for cancellation of this PaymentIntent, either user-provided (duplicate, fraudulent, requested_by_customer, or abandoned) or generated by Stripe internally (failed_invoice, void_invoice, or automatic).

#

automatic

#

As far as I can see. Unfortunately I don't have canceled PIs like this so I can't test that state for seven days

cursive shard
#

Can you verify it with your R&D?

#

I also dont see it in the docs - so its confusing to us

trim horizon
#

Yes that is how these will expire

#

It turns out I did have some test manual captures that did expire

#

A quick python snippet if you are interested payment_intents = stripe.PaymentIntent.list(limit=100) manual_expired = [ payment_intent for payment_intent in payment_intents.auto_paging_iter() if payment_intent.capture_method == 'manual' and payment_intent.status == 'canceled' and payment_intent.cancellation_reason == 'automatic' ] print(manual_expired)

cursive shard
#

Can you add it to your docs? because this does not exist as a valid reason that can be returned in the cancellation_reason field

#

thank you for your check!

#

Oh I do see it in the docs

#

Thanks you !

trim horizon
#

What do you mean?

#

That is in the doc I sent you

cursive shard
#

yeah sorry

#

I missed it

#

sorry!

trim horizon
#

No worries! Happy we are on the same page

cursive shard
#

Thank you very much

trim horizon
#

Of course. Any further questions on this at the moment?

cursive shard
#

No thanks

trim horizon
#

No worries, just checking