#andrea-skuola-sepa
1 messages ยท Page 1 of 1 (latest)
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
any questions : https://support.stripe.com/?contact=true
does Stripe send an endpoint notification if i'm listening on invoices events?
Hello ๐
Taking over here
Do you mean a webhook event for SEPA payments?
Or is this an unrelated question to your previous ask?
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?
I believe you'd receive a payment_intent.succeeded on completed payment
https://stripe.com/docs/api/events/types#event_types-payment_intent.succeeded
If you are using Stripe Checkout, you'd receive checkout.session.async_payment_succeeded
https://stripe.com/docs/api/events/types#event_types-checkout.session.async_payment_succeeded
so if i want to give a service to the customer when he pays with SEPA i need to wait those events?
Yup, basically.
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
Async payment methods such as SEPA Direct Debit are different compared to card payments. The delay here is from banks processing the payments.
Checkout confirms that the attempt to pay the amount was successful. Whether you'd receive the money or not, is async.
https://stripe.com/docs/payments/payment-methods#payment-notification
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?
They can fail, yes and webhooks would be the way to handle them.
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?
Yup, that sounds reasonable.
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
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
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
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
i'm using SEPA only for single payments, for monthly subscription i only accept cards
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
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?
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
question that has nothing to do with it: how do you highlight text here? ๐
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 ```
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?
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
ok
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?
nope
One for when the SEPA funds for the invoice payment actually land?
also yeah, or if "invoice.payment_succeeded" is enough for both cases
Gotcha. Not immediately sure on that and am checking in with my colleagues