#andrea-skuola-sepa

1 messages ยท Page 1 of 1 (latest)

cosmic mist
#

it means the payment is processing, it can take multiple days

#

you get they money on your account's standard payout timing after the payment succeeds

kindred crown
#

does Stripe send an endpoint notification if i'm listening on invoices events?

chilly halo
#

Hello ๐Ÿ‘‹
Taking over here
Do you mean a webhook event for SEPA payments?

#

Or is this an unrelated question to your previous ask?

kindred crown
#

yep, i mean when SEPA payment succeed did I receive a webhook event?

#

or are handled like synchronous transactions?

#

for example when the invoice is generated or payed?

chilly halo
kindred crown
#

so if i want to give a service to the customer when he pays with SEPA i need to wait those events?

chilly halo
#

Yup, basically.

kindred crown
#

but why Stripe Checkout confirms the payment succeed even if it is asynchronous and I haven't received the money yet?

#

i tell this because the payment flow goes well and now customers have services but i haven't money yet

chilly halo
kindred crown
#

so can i leave it like this? or sepa payments can even fail asynchronously so i have to handle the case of failure via webhook?

chilly halo
#

They can fail, yes and webhooks would be the way to handle them.

kindred crown
#

so i can do a switch case with this two events:

  • checkout.session.async_payment_succeeded
  • checkout.session.async_payment_failed
    and if it enter in the succeeded payment i can unlock services to users otherwise notice the user that payment is failed
#

is that true?

chilly halo
#

Yup, that sounds reasonable.

kindred crown
#

but if i already listen to another event, like: invoice.payment_succeeded
does the code execute twice? when checkout.session.async_payment_succeeded and invoice.payment_succeeded are triggered
because i listen to invoice.payment_succeeded for handle monthly payments

chilly halo
#

checkout.session.async_payment_succeeded is only fired when a payment is made using Stripe Checkout page.
For monthly renewals, you'd see invoice.payment_succeeded

kindred crown
#

yes, but in both cases an invoice is created

#

so invoice.payment_succeeded event will fire for monthly renewals and for sepa payments when they succeed?

#

basically i want to know if i can just use "invoice.payment_succeeded" to unlock the contents for both montly renewals and SEPA payments

chilly halo
#

You're using SEPA DD for subscriptions correct?

#

I would recommend listening to both events.

I think it's important to always listen to the checkout ones to ensure you get the right state, but you can't "ignore the first invoice.payment_succeeded" so I recommend listening to both and having some backend logic that helps you reconcile the payment

kindred crown
#

i'm using SEPA only for single payments, for monthly subscription i only accept cards

chilly halo
#

ah you said

because i listen to invoice.payment_succeeded for handle monthly payments
so I thought... never mind ๐Ÿ™‚

You'd need to use checkout.session.async_payment_succeeded then

kindred crown
#

yes its true, i'm listening to "invoice.payment_succeeded" for monthly payments but only with cards

#

and for single payments with SEPA

#

when SEPA payment succeed does "invoice.payment_succeeded" event fires?

final chasm
#

Yes, you would get invoice events for SEPA payments as well

#

Small side note, we typically recommend listening to the invoice.paid event over the invoice.payment_succeeded event. The paid event shows all of the same events as the payment_succeeded event as well as out-of-band payments (you marking an invoice as paid outside of Stripe)

#

Out of band payments are a bit of an edge case but it can be worth listening to them

kindred crown
#

question that has nothing to do with it: how do you highlight text here? ๐Ÿ˜†

final chasm
#

Backticks, the ` symbol

#

If you surround a word with it, the words becomes monospace and is highlighted

#
`monospace`
#

And that block is if you surround something with six backticks ```

kindred crown
#

thanks!

#

back to us: I try to explain what I was saying to your colleague

#

on my site I have single payment products and subscription products

#

for products with single payment I also accept the sepa method

#

for those with subscription no

#

for subscription products I have the webhook configured that listens to the event invoice.payment_succeeded

#

i noticed that when a user pays for a single pay product with sepa the money doesn't come to me right away so i want to unlock the content only when the money arrives

#

I have to modify the webhook listening to other events or just the invoice.payment_succeeded

#

that i already listen

#

did u understand?

final chasm
#

Apologies, a bit busy looking in to other questions at the moment. I will be able to look in to this again in a minute

kindred crown
#

ok

final chasm
#

Sorry, server got really busy. I just got caught up. So are you looking for another event to listen to other than the invoice.payment_succeeded event now?

kindred crown
#

nope

final chasm
#

One for when the SEPA funds for the invoice payment actually land?

kindred crown
#

also yeah, or if "invoice.payment_succeeded" is enough for both cases

final chasm
#

Gotcha. Not immediately sure on that and am checking in with my colleagues