#ggmghoul

1 messages · Page 1 of 1 (latest)

tacit flickerBOT
idle plume
#

When a Payment Intent is cancelled, either manually by you or if, for example, an auth/hold expires. Do you have a specific example I can look at?

viscid axle
#

pi_3MPMCxHrKMzhnGvg1bTp9oD8

#

for example the one with this id

idle plume
#

Sure, so this Payment Intent was created by the associated Checkout Session. The session expired (after 24 hours, the default) so the associated PI is cancelled too

viscid axle
#

can i extend that periode ?

idle plume
#

If you need a longer living URL, I'd recommend looking at Payment Links

viscid axle
#

yes i already used that in an earlier version

#

but the problem is that i can't delete that link i can only disable it

#

but the checkout session link isn't stored so no need to delete it or make any action

idle plume
#

I'm not sure I understand

viscid axle
#

if i generate a payment link there is no way to delete it as i saw if i'm not mistaking

idle plume
#

Correct, but you can disable them

#

Not sure why that matters though. You can't extend a Checkout Session to expire beyond 24 hours, so if you require longer for some reason you'll need to workaround that limitation

viscid axle
#

okay

#

it doesn't matter if i have too much payment links sotred in stripe ?

#

in my case i want to send to a client an external link to pay in case his payment intent failed

#

with sepa_debit

idle plume
#

Well, you should really just bring them back on-session and re-confirm the same existing Payment Intent

#

Rather than creating a new Payment Intent, via Checkout/Payment Link

viscid axle
#

how can i do that ?

#

cause i will only notice the fail from the webhook after 3days or more

idle plume
#

You'd bring them on-session somehow (maybe via an email you send from your webhook), to a page in your integration that initialises the Payment Element using the existing Payment Intent client_secret

viscid axle
#

there is no way other way via an external link ?

idle plume
#

Is it just a one-time payment? Or related to a subscription?

viscid axle
#

both

#

for the subscription i'm alrady using the invoice url

idle plume
viscid axle
#

so in case i receive the cancel event i can recover that session ?

idle plume
#

Yes, it'd create a new session that would be a clone of the old one (same parameters, etc)

viscid axle
#

but appearently it won't be the same session id

idle plume
#

It won't be no. But why does that matter?

viscid axle
#

i'm using it for data manipulation in the database xD

#

it's kinda complicated

#

i think i'm going back to using the payment link xD

idle plume
#

Then just update the cs_xxx ID in your database when a new one is created

viscid axle
#

i'm not using the customer id as a reference

#

it's not just one simple payement

#

it's related to insurance stuff xD

idle plume
#

I'm confused. The Customer ID won't change between sessions

viscid axle
#

yes in this case of the session that would work smoothly

#

but i figured that i would make another endpoint to trigger session expired

#

better work with the payment link since it doesn't matter how many payment links i have

#

i thought that would be a problem

#

that way the link is always active and i'll disable it once the payment is made

idle plume
#

I think I'm just generally confused with what you're trying to do

#

You have a failed/incomplete Checkout payment and want to re-capture it after session expiry. That's exactly what the abandonment feature is for

viscid axle
#

that's totally normal i didn't provide enough infos on what's going on

idle plume
#

Not sure why you'd need to create a Payment Link separate to all that

viscid axle
#

because the structure of the project doesn't contain the customer id as prop to treat payment cases

#

and i'm not allowed to change that immeditely

#

plus if use that i will need to catch the event of the session expiring to send another mail

#

and when the second recovered link expires would it recover another one ?

idle plume
viscid axle
#

well logically since it's the same thing it would trigger the session expired when expiring and so on i guess

#

only if the procedure of recovery is as same as the first creation of course

#

one more thing since we're still in the thread

#

what is the maximum of prices i can have under a product ?

idle plume
#

There's no limit

viscid axle
#

nice

#

cause each time i generate either the checkout session or payment link i need a price

#

i'm putting them under the same product

idle plume
#

Should be fine, yep!