#smokey_unexpected

1 messages ¡ Page 1 of 1 (latest)

chilly 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/1218270630013829320

📝 Have more to share? Add more details, code, screenshots, videos, etc. below.

pastel oxideBOT
#

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.

warm parrot
#

Can you share the pi_ id?

upper shoal
#
 requires_action = False
            
            sub = stripe.Subscription.create(
                customer=customer_id,
                items=[
                    {
                        'price': price_id
                    }
                ],
                payment_behavior='default_incomplete' if not is_setup else None,
                payment_settings={'save_default_payment_method': 'on_subscription'},
                expand=['latest_invoice.payment_intent', 'pending_setup_intent'],
                collection_method='charge_automatically'
            )

            # If the users stripe account has already been setup prior, check if the payment intent requires action. 3D secure will be required and processed by the client.
            if(is_setup):
                intent = self.get_intent(sub.latest_invoice.payment_intent.id)
                if intent.status == "requires_action":
                    requires_action = True

            return {
                "message" : "Subscription successfully created." if not requires_action else "Subscription successfully created but Requires action.",
                "client_secret": sub.latest_invoice.payment_intent.client_secret,
                "id": sub.id,
                "expires_at" : sub.current_period_end,
                "requires_action": requires_action
            }

Payment intent: pi_3OufnNB8l4UplgS61nbuuKFB

warm parrot
#

Looks like that payment intent did require 3ds and then succeeded

upper shoal
#

But why when it's a none 3ds card: 4242 4242 4242 4242

#

Also, how am I supposed to handle this if it does require 3ds, but then suddenly doesn't?

upper shoal
#

After creating the sub and charging the card automatically, I check if it requires_action. If it does, I send this back to the client. However, right now its saying it requires action to the client, but checking Stripe, it doesn't

warm parrot
#

but checking Stripe, it doesn't what do you mean by this

#

The customer completed 3ds in the payment intent you shared

upper shoal
#

Checking the payment in the dashboard

warm parrot
#

Not sure about the dashboard

#

But the payment you shared required 3ds, the customer completed it, then it succeeded

upper shoal
#

does 3ds not always show a popup saying click to confirm/fail ?

warm parrot
#

Not always no

upper shoal
#

How come the card number 4242 4242 4242 4242 is now triggering 3ds? This hasn't happened before

#

There is 3ds specific cards, no?

warm parrot
#

Is your account in an SCA country?

#

What country is it based in?

upper shoal
#

UK

#

So yeah it's a SCA country

#

Actually, it says:

Though the UK may not be a part of the EEA in the future, they intend to implement or follow SCA regulation.
warm parrot
#

Gotcha this might be expected

#

Will check with a colleague to confirm

#

Do you have a payment intent where 3ds wasn't required with that card?

upper shoal
#

let me check

#

No I do not, I must of nuked my test data

#

unless logs store info even after test data is nuked?

warm parrot
#

No it's gone then

#

Let me ask a colleague

upper shoal
#

OK thanks

#

What I don't understand is the card number 4242 4242 4242 4242 has never required action. I've always used specific 3ds cards for this

warm parrot
#

Looks like it's a radar rule you have configured

#

You request 3ds if card_3d_secure_support == optional

upper shoal
#

I have disabled it, but I'm still encountering the issue

#

also, I nuked my data yesterday when it was working fine - no radar settings were changed

#

in fact, I've not changed my radar settings in around 5 months or so

warm parrot
#

I see the rule enabled in test mode on your account

upper shoal
#

Let me run through the payment process again

warm parrot
#

is that live or test?

upper shoal
#

test

warm parrot
#

i see it disabled in live mode for you

upper shoal
#

I'm in test mode

warm parrot
#

Oh it's the rule that says request 3ds if 3d secure is supported for the card

#

3ds is supported on 4242

#

but not required

#

Hm but that says 0 payments

upper shoal
#

but I still don't understand what has changed in regards to this. Because I haven't changed radar rules. This wasn't happening yesterday

#

I've always used 4242 4242 and it's never done 3ds

#

thats what the 3ds cards are for

warm parrot
#

looking at the logs radar is what requested 3ds for that pi

#

radar rules have the ability to require 3ds for 4242

#

but by default, it doesn't require it

#

we're just not really familiar with the dashboard in here, so the radar view is a bit unfamiliar to me

upper shoal
#

OK let me just disable everything inside radar and do a payment

#

OK that seems to have fixed it, payments are going through without 3ds now

warm parrot
#

yeah it was one of those rules

upper shoal
#

I have one more quesiton whilst i'm here if you don't mind

warm parrot
#

sure

upper shoal
#

Here is the flow:

User signs up and attachs card which is stored in the customer object.
Through their dashboard, they upgrade to a membership.
A membership is created, however required_action is sent, but the customer fails the 3ds.

How can we retry this payment method? Passing the same client ID returns an error that a payment method is required

#

I could cancel the invoice and create a new one, but I'm wondering if there is another way I can retry the payment with the same invoice?

warm parrot
#

Just curious, why do you do it this way (ie create payment method first then subscription)? It is a bit of a pain to do it this way

#

If this is an existing integration I can help you manage

upper shoal
#

Because the customer could be a pay as you go customer

warm parrot
#

Not sure I understand

upper shoal
#

So the customer signs up either as a pay as you go, or a subscription. If pay as you go, their account is charged a fix amount per "task". If a subscription, they simply pay the subscription fee.

#

but they can upgrade/downgrade at any time

warm parrot
#

Yeah so why not do the recommended flow if they choose subscription? Then if they choose pay as you go, collect payment method via setupintent?

#

Is this a new integration you're building?

#

If so, highly recommend using our recommended flows

upper shoal
#

I am following the recommend flow - pay as you go is done via setup Intent. But customers can upgrade their membership after they've chosen payg

warm parrot
#

Ah

#

Ok

#

Using client secret from the payment intent

#

They'll be prompted for 3ds if it's necessary

upper shoal
#

OK I see how to do it now

#

thanks a lot for your help today