#edgar_3ds-question

1 messages ยท Page 1 of 1 (latest)

near flumeBOT
#

๐Ÿ‘‹ 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/1229810745143857205

๐Ÿ“ Have more to share? Add more details, code, screenshots, videos, etc. below.

forest oreBOT
#

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.

icy axle
#

Hi ๐Ÿ‘‹ what test card did you use to test your flow?

sage cypress
#

Sorry I accidentally specified the wrong top related id. This is the correct 1229780727508504617

icy axle
#

Sorry, that isn't a Stripe object ID, nor an ID of a request made to the Stripe API.

sage cypress
#

3155

#

You and I have spoken recently

icy axle
#

Sorry, it's been a busy morning. Can you share the ID of an object from your testing where you saw that behavior?

sage cypress
#

sub_1P6DA9KGtF9GaoEAfXtJ7N8K

icy axle
#

That Payment Method doesn't look like it went through a Setup Intent, but maybe I've overlooked it.

It looks like the Payment Method was created directly here:
https://dashboard.stripe.com/test/logs/req_fl7soP2JmWBdZP
Did you run it through a Setup Intent after that, and can you share the ID of that intent if so?

sage cypress
#

I created a new subscription.
sub_1P6DwgKGtF9GaoEAGdlRBZj6
seti_1P6DwfKGtF9GaoEAmjB0tpl7

icy axle
#

Thank you, taking a closer look

sage cypress
#

Ok

forest oreBOT
icy axle
#

Hm, I see what you're saying. That Setup Intent was created and completed, though just barely, before the Subscription was created. Something that seems a little off, is that you were able to confirm that Setup Intent server-side without the customer needing to complete a 3DS challenge at that point.

runic oxide
#

๐Ÿ‘‹ taking over and trying to make sense of the convo. Why would confirming a SetupIntent server-side be a bad thing @icy axle ? Like 3DS is not required for everything all the time

icy axle
#

It's for the 3155 test card, so it should require authentication if it wasn't set up previously, right?

runic oxide
#

Ah gotcha that's the part I was missing. Going to take over and figure it out you're all set!

#

edgar_3ds-question

sage cypress
#

I can create a payment intent on this card and 3ds will not be requested as I did before. I want the same behaviour to happen when I make subscriptions.

runic oxide
#

4000002500003155

This card requires authentication for off-session payments unless you set it up for future payments. After you set it up, off-session payments no longer require authentication.

So as long as you properly set up the card and do 3DS on session client-side, then future off session payments will work.

so now can you share some end to end code about your test so I can help you debug what you're doing wrong?

sage cypress
#

First, I create a setup intent

$si = $this->stripe->setupIntents->create([
'customer' => $user->customer->stripe_id,
'payment_method' => 'pm_1P6CQbKGtF9GaoEA7Gv6o60Z',
'confirm' => true,
'usage' => 'off_session',
'return_url' => 'http://localhost',
]);

then I create a subscription

$sub = $this->stripe->subscriptions->create([
'customer' => $user->customer->stripe_id,
'items' => [
['price' => $priceId]
]
]);

runic oxide
#

Okay but that's only a small part of your code really. Like where is the PaymentMethod coming from? Was is attached to the Customer first? What is your overall flow?

#

Can you try a brand new customer end to end? I want to see all the requests you make but it's tough on a Customer you used a lot already

sage cypress
#

I'll do it now.

runic oxide
#

thanks, give me the Customer id once you're done and I'll try to understand the order of requests

sage cypress
#

I'll create a new customer cus_Pw6v52pX4zjsyR

runic oxide
#

are you doing this on a completely different Stripe account?

sage cypress
#

I added card card_1P6EjgAp3opAT5B0vSFXF7vT

runic oxide
#

this is a Legacy Card card_123. What's going on? That looks like a completely different account and integration pattern from earlier

sage cypress
#

Yeah, it's a different account. Because it was quicker for me to create everything from the app. The difference is that last time I created the card from the dashboard.

#

$paymentMethod = $this->client->customers->createSource(
$customer->id,
['source' => $source]
);

so the card is created, the source is handed to me by the client.

runic oxide
#

Okay I think there's a ton of confusing data here, it's going to be really hard to help without focusing on your real and exact integration path. You're using deprecated APIs already when you use the Create Card API https://docs.stripe.com/api/cards/create, using the Dashboard is not relevant to what you would do in production

#

It's really tough for me to help you without grasping what your end goal is. But if you are doing that createSource you are using an integration that was deprecated many years ago at this point so it's not completely surprising that the SetupIntent doesn't work

#

Ultimately, you really shouldn't be doing a SetupIntent at all in that world.

#

Like your whole integration is quite sub-optimal alread. But if you want to do the least amount of changes you would mostly create the Subscription and then look at pending_setup_intent if any and confirm it client-side if so

sage cypress
#

What a new path. Do we need to use only stripe.js?

runic oxide
#

Not really, but you're using APIs that are 5+ years old and not really using a newer integration. Sorry it's tough to help as you shared almost no details about your existing integration right now

sage cypress
#

I used this resource https://docs.stripe.com/api. I didn't realise it was old information. Could you share a more recent version with me and maybe I won't have any more questions. Or next time we'll have a more substantive conversation?

runic oxide
#

Ah so you built a brand new integration? It's not a multi-years old integration you were trying to change?

sage cypress
#

I don't quite understand the question?

#

But it's not the integration of many years ago

runic oxide
sage cypress
#

I didn't use this api

runic oxide
#

the API works, but it's a bad idea to use it for a new integration

sage cypress
runic oxide
#

of course not, just the specific API method you were referencing

sage cypress
#

Thank you very much. I'll look into it.

runic oxide
#

sure thing!