#ivaylos-accounts-multiple
1 messages · Page 1 of 1 (latest)
Hi 👋
No that isn't possible. You could create two separate endpoints and have them listen to different events as a way of separating these webhooks but a Checkout Session completing will still generate a payment_intent.payment_succeeded event
OK thanks that means that I need to query Stripe about payment status from my Server application based on PaymentIntent ID?
Not necessarily. What you are trying to achieve?
Well currently we are using Ogone/Ingenico DIrectLInk payment solution and I am researching a possible migration to Stripe. As use case we have payments that get challenged to complete 3dsv2, Ogone returns the challenge page to our backend we send it to the WebAPp to get rendered for the user to pass the challenge. After that user gets redirected to success/decline page based on challenge outcome but the status of the payment remains 'challenged' in our backend. We have configured webhook In Ingenico whrere they send us updates regarding payment status so we update it in our backend but it's domain is location dependant based on where the original request to make the payment comes from. and the webhook endpoint is static across our locations
https:{{location}}.mydomain.com/stripe_webhook
Oh Okay, so Stripe would fire 2 webhooks in that case.
payment_intent.requires_action- https://stripe.com/docs/api/events/types#event_types-payment_intent.requires_action this tells you 3DS was requiredpayment_intent.succeeded- https://stripe.com/docs/api/events/types#event_types-payment_intent.succeeded tells you the payment went through
You can update your back-end based on each of these. One thing to be aware of, we do not guarantee the order of our webhook delivery so you would need to include some logic that checks the current status of the Payment Intent in your system.
The Payment Intent is a state machine and so transitions in status follow very specific flows. We discuss this here: https://stripe.com/docs/payments/paymentintents/lifecycle
OK so
For example I have to configure new webhook URL for each location where our service operates and subscribe each Hosted endpoints to https://stripe.com/docs/api/events/types#event_types-payment_intent.succeeded and https://stripe.com/docs/api/events/types#event_types-payment_intent.requires_action, and only act on events for PaymentIntents IDs sent from the specific location? Example - PaymentIntent is made from Germany, it us succesfull both London and Germany receive the https://stripe.com/docs/api/events/types#event_types-payment_intent.succeeded, but in London I ignore it and update it in my backend in Germany?
For that kind of isolation we recommend creating separate Stripe Accounts and using separate API keys to keep all payments & webhooks separated by account
Many thanks for the advise
I could see major problems occurring with scaling, since as you added more regions all your endpoints would be receiving events for all other regions and need to ignore most of them
I see. They I understand it, to get payment statuses we either poll by from each location individually or setup individual Stripe account with own webhook for each location.
Can we have multiple Stripe accounts with the same email?
Yes you can