#ggmghoul
1 messages · Page 1 of 1 (latest)
is there a way to retreive the product or the price from the webhook request ?
i'm sorry internet problems
payment_intent.succeeded for instance
i want to retreive the price so i can create a paymentlink with that price to be precise
Payment Intents don't have products or prices, unless they are linked to a Checkout Session or a Subscription.
I am not sure I totally get your flow. You want to create a new payment link after the payment was successfully completed?
no i want to create a payment link after the payment fails
can you explain in more detail an example of how this would work? How do you integrate today, which APIs are you using?
okay sure thing
i have a payment of type sepa_mandate
when this payement fails for some reason
there's no such thing, do you mean sepa_debit?
yes sepa_debit
so when the payment fails i want to create a payement link for the customer to pay with card
although i can only create a payement link from the api with the price id
i'm wondering if i can retreive that id when receiving a request from the webhook
you might be able! how do you do the SEPA payment, what APIs are you using for that?
i create a payment intent
then there is no Price object.
exactly
so you'd have to for example look at the amount of the PaymentIntent you created and create some Price that matches that, and use that with the PaymentLink
okay ! is it the only option ?
there are lots of other options. If you just want to accept a card payment you can do that in many ways. Like instead of creating a PaymentLink you could contact the user and send them to your site, and create a PaymentIntent there for cards. Or you could attempt to charge a saved card that customer might already have. It's hard to say as there are lots of options and it really depends on context like what you have already and what experience you're looking for
well my path is as i mentionned earlier in case the payement fails i need to generate a payment link so i can send it in an email
btw how long would it take to receive a response from a sepa_debit payintent
cause as far as i noticed it takes always about 3 days whether if it's a fail or success in production mode
https://stripe.com/docs/payments/sepa-debit
it can take up to 14 business days to receive notification on the success or failure of a payment after you initiate a debit from the customer’s account, though the average is five business days.
seems that my thinking was fine cause i tried to bloc the user instantly if the payment intent fails but i found that the status is always processing until further notice which is 3 days later