#ggmghoul
1 messages · Page 1 of 1 (latest)
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?
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
can i extend that periode ?
No, 24 hours is the max: https://stripe.com/docs/api/checkout/sessions/create#create_checkout_session-expires_at
Complete reference documentation for the Stripe API. Includes code snippets and examples for our Python, Java, PHP, Node.js, Go, Ruby, and .NET libraries.
If you need a longer living URL, I'd recommend looking at Payment Links
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
I'm not sure I understand
if i generate a payment link there is no way to delete it as i saw if i'm not mistaking
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
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
Nope, there's no limit
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
how can i do that ?
cause i will only notice the fail from the webhook after 3days or more
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
there is no way other way via an external link ?
Is it just a one-time payment? Or related to a subscription?
There's no hosted payment page for one-time Payment Intents. If you're using Checkout, I'd recommend implementing a cart abandonment flow for when the original session expires: https://stripe.com/docs/payments/checkout/abandoned-carts
so in case i receive the cancel event i can recover that session ?
Yes, it'd create a new session that would be a clone of the old one (same parameters, etc)
but appearently it won't be the same session id
It won't be no. But why does that matter?
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
Then just update the cs_xxx ID in your database when a new one is created
i'm not using the customer id as a reference
it's not just one simple payement
it's related to insurance stuff xD
I'm confused. The Customer ID won't change between sessions
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
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
that's totally normal i didn't provide enough infos on what's going on
Not sure why you'd need to create a Payment Link separate to all that
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 ?
Not sure, you'd need to test it
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 ?
There's no limit
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
Should be fine, yep!