#RiderFx3-authentication

1 messages · Page 1 of 1 (latest)

merry radish
#

Starting up a thread for you

hazy narwhal
#

Hello

#

Lot of customers get a payment decline before I can create the payment intent

#

When I try to attach the source to the customer I get this error : card_error_authentication_required

merry radish
#

Did you build your integration in a way that allows a customer to provide authentication?

hazy narwhal
#

But I can't trying to authenticate before creating payment intent ....

merry radish
#

To clarify - using sources is a really old integration path, and so if you're building a net new integration I wouldn't expect you to be using Sources

#

Is this an older integration that has suddenly started breaking? Or is this a new integration?

hazy narwhal
#

Yep this is my worflow :

  • Get Stripe token
  • Retrieve or Create user
  • Attach the source to the customer
  • Create Payment Intent
  • Confirm payment or go to 3DS validation
  • Confirm or Fail
#

You here ?

merry radish
#

Sorry I'm talking to multiple folks at once

#

and again, is this a new integration, or an old one?

#

Is there a reason you haven't fully moved over to Payment Intents + Payment Methods?

hazy narwhal
#

Yes it is an old integration and the client don't want to pay for update but since this year we have errors we didn't have last year

#

I actually use Stripe.js with Card Element is this a problem ?.

merry radish
#

No, that's not a problem - give me a few minutes while I think through a solution for you

hazy narwhal
#

Everything works great except for some client who get their card decline for no reason

#

The problem is that the card is declined BEFORE trying the Payment intent

merry radish
#

Gotcha - I'd recommend fully moving to Payment Methods, but in the mean time if you want to guarantee no authentication is needed for attaching a source I think you can pass 'validate: false' when you attach it to the customer

hazy narwhal
#

This tips is not writed in the API Docs

merry radish
#

Yes, it's undocumented

hazy narwhal
#

On this endpoint right ?

#

When I update the customer by passing the source

#

And just to know, if I want to use payment method, Stripe.js will prompt the authentication popup BEFORE I can charge the payment on server-side ?

merry radish
#

Yes, that's where you'd use validate: false

#

and if you were to fully move over to payment methods you wouldn't even create a payment method separately - it would be created for you when the payment intent is confirmed and can be automatically attached to the customer

hazy narwhal
#
public function updateCustomer( $customer_id, $source ){
        $datas = [
            'source' => $source,
            'validate' => 'false'
        ];
        $url = 'https://api.stripe.com/v1/customers/'.$customer_id;
        
        return $this->curl( $url, $datas );
    }

OK I had to write like this

merry radish
#

👍

hazy narwhal
#

The only problem is I can't reproduce the card_error_authentication_required error

#

Is there any way to reproduce it for testing ?

merry radish
#

No, I don't believe there's a way to reliably reproduce it for testing

hazy narwhal
#

How can I be sure that the argument validate: false have any effect ?

merry radish
#

There isn't a good way - this is just a workaround. That's why the better solution is really just to upgrade your integration to properly use Payment Methods

hazy narwhal
#

The problem with Payment Method is that I have a lot of custom logic server-side before validate payment

merry radish
#

You should still be able to find a solution that works with Payment Methods though

hazy narwhal
#

Okay thanks I will work on that