#lil_payment-3ds
1 messages ยท Page 1 of 1 (latest)
๐ Welcome to your new thread!
โฒ๏ธ We'll be here soon! Typically we respond in a few minutes, but sometimes we might take a bit longer if the server is busy or if you have a particularly tricky question.
โฑ๏ธ We close idle threads, which makes them read-only. Once a thread is closed it won't be reopened, but you can always start a new thread if you have another question.
๐ This thread will always be available, even after it's closed. You can find it again using Discord's search, or you can save this link: https://discord.com/channels/841573134531821608/1275502544717746240
๐ Have more to share? Add more details, code, screenshots, videos, etc. below.
Below are links to other discussions we've had with you in the past week in case you want to review that information. If your question is related to one of these previous discussions, please provide a comprehensive summary of the current state and what you need help with now. We help many users simultaneously, so a summary allows us to resolve your issue as soon as possible.
- lil-nasty_best-practices, 1 hour ago, 19 messages
- lil-nasty_best-practices, 17 hours ago, 27 messages
- lil-nasty_best-practices, 1 day ago, 16 messages
@candid finch it depends a lot on how you have integrated in the first place. But if you use Checkout or one of our UI elements such as CardElement or PaymentElement then it all automatically happens.
The easiest way to know is to try in Test mode as the developer and use our test card numbers: https://stripe.com/docs/testing#regulatory-cards
lil_payment-3ds
Ah, I see... we use the payment element, so I suppose it could happen. I'll test with them and see what happens
Thank you
sure thing!
On a subscription renewal payment what's the procedure for giving the user the ability to authenticate the 3ds card payment?
Usually you would setup the payment method for future payments, so that the customer doesn't have to reauthenticate for each renewal: https://docs.stripe.com/payments/save-and-reuse
When a user signs up for a trial subscription we use a setup intent, and when we get an update for payment_method.attached we set it as the default payment method for the customer, is there some flag to pass when setting it as the default that says we want it to be for future payments?
Is there anyway to do this on a standard payment_intent that is the initial payment for a subscription as well?
A Setup Intent will automatically flag the Payement Method as one you can use for future payments
Is there anyway to do this on a standard payment_intent that is the initial payment for a subscription as well?
Yes, you can use thesetup_future_usageparameter on the Payment Intent: https://docs.stripe.com/api/payment_intents/create#create_payment_intent-setup_future_usage
Complete reference documentation for the Stripe API. Includes code snippets and examples for our Python, Java, PHP, Node.js, Go, Ruby, and .NET libraries.
We set setup_future_usage as off_session shouldn't that work?
It should, yes
Unfortunately it seems to not be handling it properly then
One sec and I can send the invoice id
in_1PpvetF0GkWPNQzKAJoo00tC
Here's the payment intent on the invoice that we get back when we retrieve invoices and expand the payment_intent
What did you do to set this up? I see that it's tied to a Subscription, but I don't see the request where you set it up for future usage. Do you have a request ID?
Here's how you can find a request ID: https://support.stripe.com/questions/finding-the-id-for-an-api-request
Find help and support for Stripe. Our support site provides answers on all types of situations, including account information, charges and refunds, and subscriptions information. Get your questions answered and find international support for Stripe.
For Subscriptions I would recommend looking at this guide to get started: https://docs.stripe.com/billing/subscriptions/build-subscriptions
req_2CU5IUEbOougIi
Looks like setup_future_usage actually wasn't passed
Although I don't see an option for that when creating a subscription
Note this subscription didn't go through the trial flow, so they didn't go via setup_intent, but rather by creating a subscription and then paying in the ui with the client_secret from the payment_intent
You would want to use Setup Intents for Subscriptions, since the initial payment is going to be created by the Subscription already. So, if you create a payment Intent before creating a Subscription, you'd essentially be double-charging the customer. Not sure if that addresses your question though
Just to clarify we have 2 flows possible
- Trial subscription
- We use setup_intent
- Non-trial subscription
- We create a subscription and use the payment_intent it creates to collect the first payment
In trial flow once the payment_method is attached we recognize that the user is trying to initiate a trial subscription so we set the payment method as the user's default method and create the trial subscription.
In the non-trial flow we create the subscription, then return the client secret, once the user pays we get the payment_method.attached event and append it as the default payment method to the customer object
Is it possible when creating a subscription in the non-trial mode to specify that whatever payment method is attached will end up being used off_session? I feel like that would be the default because pretty much all future payments will be off_session
In the non-trial flow: are you using the Payment Element to charge the Payment Intent that's created by the Subscription?
Correct
We are
I went through the 3ds flow and clicked the option to authenticate the 3ds payment when it was shown
First payment succeeded, but then the renewal payment is saying requires_action
Which test card did you use?
Oh, I think I used always auth... that would explain it, right?
Yup, that would do it. You'd want to use "Authenticate unless set up": 4000002500003155
But if a user was to enter a card that had that setting (always authenticate) on a subscription we would have to prompt them to authenticate on all subsequent renewals, right?
I didn't see any detail in the payment_intent that had a link or anything to do that, so I do wonder how we handle it
The authenticate unless setup worked as expected btw
That basically doesn't exist. I've never heard of a card that always required authentication. That being said, it is possible for the bank to require 3DS again later on, so you would want to setup a webhook endpoint that listens for Subscription events and can detect if a Subscription's payment method needs authentication again (this should be very uncommon)
Maybe I'll just leave it unhandled for now, but what would the flow look like for the re-auth?
We get a webhook saying they need to re-auth, then what? How do I prompt the user to re-auth?
You get a webhook that says authentication is required and then you prompt the customer to reenter the payment flow and reauthenticate their card.
This is incredibly uncommon though, so mostly you'll never see that happen and if you do, you can just send them back to the payment form to add their Payment Method again
Ok, got it. Would it suffice to open a payment element with the client_secret from the requires_action payment_intent?
Yes, exactly
Sure thing! Happy to help
Unrelated, but is it possible to set a subscription schedule to release after it applies a phase's updates?
Sort of. A Subscription Schedule's phases will only accept Unix timestamps, so you would have to create some automated system that detects when the update occurs and subsequently update the Subscription Schedule with a new phase that starts immediately after the update
So it's possible, but will require a lot of custom code to implement
Just to give some context, I only do this for downgrades so we don't have to refund/run a balance with users and it only ever has one extra phase to switch the subscription tier at the end of the current period.
Would it be possible to set the end_date of the phase to like 1 minute after it starts and then have the end behavior be release, in which case the subscription schedule would update to the new level, then release 1 minute later
Or would that undo the change of the subscription tier?
I don't see any reason why you couldn't have a short phase like that, unless an Invoice is going to be drafted and left in open for 1 hour (which Stripe does by default on Subscription renewals). In that case though, you could just manually finalize and pay the invoice immediately before updating the phase.
I would highly recommend testing this with Test Clocks though, as there may be some default behavior I'm not thinking of
Fair enough, jw if it's a possible way to handle it! Thanks again
Sure thing!