#ilyeselb
1 messages · Page 1 of 1 (latest)
Sure, can you share an example?
this is our flow
User opens the Stripe Element (Deferred Payment): The user accesses the Stripe Element, which is a pre-built UI component provided by Stripe for collecting payment information.
User selects "Save Card": The user chooses to save their card information for future use.
User fills the Stripe Element form: The user enters their card details, such as card number, expiration date, and CVC, into the Stripe Element form.
User submits the form: The user clicks the submit button to send the payment information to Stripe.
3D Secure authentication: If the user's card requires 3D Secure authentication (a security measure for online card payments), Stripe prompts the user to authenticate the transaction using the authentication method specified by the card issuer.
Create subscription and get client secret: Once the authentication is completed, Stripe creates a subscription for the user and provides a client secret. The client secret is a unique identifier for the subscription and is used to confirm the payment later.
Confirm payment: The user confirms the payment by providing the client secret to Stripe. This step ensures that the user is authorized to complete the purchase.
Subscription is bought: The payment is successfully processed, and the subscription is purchased by the user.
If the user wants to buy another subscription:
Select payment method: The user selects the previously saved card (identified by the payment method ID, e.g., "pm_...")
Create subscription with API: Using the Stripe API, you create a new subscription for the user and set the previously saved card as the default payment method.
So when i use the payment method (3DS) directly on the subscription creation api it fail , i want to know how to make it work
sub_1NQARiGyOBDbEOMCnF95MIOY this is an exemple of incmplete subs
Catching up
Ok, so you created the Subscription using a pm_xxx for test card 4000000000003063
3D Secure authentication must be completed for the payment to be successful. By default, your Radar rules request 3D Secure authentication for this card.
So this seems expected in scenarios where that card is used: every payment needs to be authenticated
how can i authenticate it
You want to use 4000002500003155 instead:
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.
because we want user to save the cards so he can use it again
3155 works better as becuase you saved it on the first subscription, any subsequent payments won't require auth
what if in prod the user save a 3ds card that always need auth , and want to use it again for future payment , how can we make him pay with it (if it need auth)
Then you'll need to bring your customer back on-session and re-confirm the PI with Stripe.js
That way they can complete 3DS/auth if required
do you have a docs for that ? like how can i redirect him to the authentication ?
Not specifically. We have automatic emails you can turn on: https://stripe.com/docs/billing/revenue-recovery/customer-emails#secure-payments
Otherwise you'd probably have a webhook that listens for invoice.payment_failed events and then send an email to the customer that sends them to a page in your app to confirm the payment
okay thanks , i see , and one last thing how can i make the difference between a card that require 3Ds auth and a card that not (if we can do that)
I don't understand what you mean
like how to ake the difference between a payment failed because of card auth and normal payment failure
You'd look at last_payment_error on the PI: https://stripe.com/docs/api/payment_intents/object#payment_intent_object-last_payment_error