#dejwsiu
1 messages ยท Page 1 of 1 (latest)
Are you following a guide currently? If so, which one?
ye, i was using Migration Guide to implement SCA + documentation of method itself, but there are only clues
Can you link the docs and outline which step you're stuck on?
https://stripe.com/docs/api/subscription_items/update
https://stripe.com/docs/billing/migration/strong-customer-authentication
method itself works and it ofcourse updates subscription with classic 4242 test card - but im missing the idea for how / when trigger 3ds auth if needed. what would be my way of doing it:
- triggerring stripe.subscription.update method,
- initialyze loading on frontend
- wait on backend/my API for result event or "payment_intent.requires_action" and then pass link from next_action
problem is that i have actions for my database attached to event invoice.payment_succeeded which just adds/update subscription
so on subscription.update with parameter payment_behavior = 'allow_incomplete', that action makes no sense
cuz it will update user data on my app database, even if 3ds auth didn't passed
so my question would be probably - is there any other event, that for sure confirm that payment went thru and subscription was updated on stripe, so i can trigger action on my app side to updated database
Have you tested this case with a 3DS test card instead of the 4242 card? There are test cards specifically for testing this workflow: https://stripe.com/docs/testing#regulatory-cards
yup
invoice.paid is the most reliable event for when a Subscription payment was successful. Not sure if that answers your question though
will it also appear when on update payment_behavior parrameter is set to 'allow_incomplete' ?
cuz invoice.payment_succeded still appears for me, even if 3ds failed
or maybe other words - is there any guide that presents complete solution? cuz only details i see in docs is "it will help you to handle....". but dont says how :p
and im feeling like im discovering America again :p
3DS isn't technically required to have a successful payment. Usually you would bring your customer back into the payment flow to authenticate their card via whatever you have them use to add their card details.
What payment flow are you testing right now? Why are you using the 4242 card to test 3DS? I don't understand
so back to beggining:
- i have integration based on old Payments API without option to use 3ds auth
- im implementing new solution based on
- new subscriptions - Prebuilt Checkout
- update subscription (changing quantity of existing subscription with volume pricing) - based on Payments Intents API / subscription.update method (Stripe Customer Portal doesnt work for my app, cuz i have 30+ products and its limited to 10)
what i want to achieve for the moment is giving user a chance to go thru 3ds auth during subscription update process
so i'm looking for an event from webhook, which will for sure say me, that if 3ds was needed, invoice was succesfully paid and then trigger action for my own app db. if 3ds / payment failed - process of payment flow should stop
so probably im actually looking for 2 events that will indicate me either of results
and yes, for testing im using 3ds cards. i just gave example with standard 4242 card, to confirm that basic integration works for standard cards
So the 2 flows you're testing are:
(1) 3DS is successful
(2) 3DS is not successful
I'm sorry, it's just really hard to follow your line of thinking with the formatting you've chosen
np. yes, that would probably be this. for the moment i haven't applied any functionality to run 3ds auth, and still rely on invoice.payment_succeed but in my case that make no sense
cuz this event will still happen when on update i will add parameter payment_behaviour: allow_incomplete
invoice will be in status "past due" but it will stil indicate that was paid
So let's talk about scenario (1) first
(1) 3DS is successful
When 3DS is successful, you are immediately collecting payment, yes? And that payment is successful, yes?
for the moment i dont have any code for that scenario. im stuck on implementing failed 3ds scenario
maybe i should stay with payment_behavior: 'error_if_incomplete'
and then wait for events payment_intent.requires_action or invoice.payment_succeeded and trigger with it 3ds or my app payment flow success
That could work in order to just get the thing up and running. You can always go back and try to better understand how the workflow for payment_behavior = 'allow_incomplete' would work