#LucidLaw
1 messages ยท Page 1 of 1 (latest)
I'm following this docs by the way
So this is to create a SetupIntent and it should works if you use a suppose-to-succeess card
first time hearing the "suppose-to-succeess"
apologies, I'm new to stripe
๐
basically I need to create a payment using 3D card
and it seems not included on the docs I'm looking at
not sure which part to alter
You don't need to alter anything. our stripe.js will automatically handle if the card requires 3DS
You can test the integration by testing cards here: https://stripe.com/docs/testing#authentication-and-setup
Okay, but its giving me generic error when I'm testing with this card
4000000000003063
--------- response ------------
{
"error": {
"charge": "ch_3MMPoaLlkdPoC87s0E83FsSC",
"code": "card_declined",
"decline_code": "generic_decline",
"doc_url": "https://stripe.com/docs/error-codes/card-declined",
"message": "Your card was declined.",
.
.
.
I'm using CURL by the way
Would you be able to help me @elfin mortar ? ๐ข
https://stripe.com/docs/payments/save-and-reuse?platform=web demonstrates how to use SetupIntent and confirm it client-side. Why are you using curl and confirming server-side
you are passing confirm=true, which means confirming server-side
I see, apologies I was just following the docs without fully understanding it
let me try again
I got it working now, so turns out I need that error response
to get the client_secret
then complete the 3D secure
Yep!
thank you!!!
since I was able to complete the basic payment now, may I ask how can continue with a subscription payment?
Lets say I would like to use the Plan
for our monthly subscriptions
When you use Subscription, you will need the Customer to authorize the first payment, then let our Subscription collect from 2nd times onward
You have 2 choice; Checkout and Payment Elemenet https://stripe.com/docs/billing/subscriptions/build-subscriptions
Checkout is eaiser since it's a Stripe hosted page and you only need to redirect into. But I guess you want Payment Element as you are already implementing it
Yes
Yes are avoiding users to redirect outside the screen
Okay so its not possible for me to use the payment methods? because what we are trying to achieve are the ff.
- Add Card (which is the Payment Methods) to a customer
- Customer can choose default card (Payment Method)
- 1 Click payment (by calling /payment_intents using the selected payment_method)
Ah it should work yes, as long as you used SetupIntent for step 1 Add Card to handle 3DS properly
talking about the 3Ds, does it really always authenticate me?
I'm using same PM with the 3Ds, but it requiring me to authenticate everytime
Yes, how can I do this? Like during add card I want to validate already the 3DS without doing the payment yet. Would it be possible in stripe? I see like it on AWS card management
You simply follow the SetupIntent Doc above. After you have done it, you should have the confirmed SetupIntent and the underlying Payment Method
then you can process to create a Subscription server-side, specifying the default payment method to the Payment Method you collected
Yes I just made it work
by just updating the customer's invoice_settings[default_payment_method]
thank you again for that
Going back to my question, does it really always require me to authenticate the 3D card? Would it be possible to authenticate the 3Ds once?
It's totally depended on the issuer bank. The banks ultimately hold the right to require every single time if they need to.
(They prob don't want to, but they are also subjected to law and regulations on their country etc)
Stripe provides testing cards to simulate such scenarios, but keep in mind that in real world all those scenarios could happen
I see
so I guess I will just leave it as it is for now
.
.
Question about Step 6: Submit payment details to Stripe
.
.
.
I did put a "return_url" where I could get the "setup_intent_client_secret", but would it be possible to receive it via json? I don't want users to redirect other page as we are using modal for this part.
.
.
I did try
redirect: "if_required"
.
.
but I'm getting code
:
"url_invalid"
What if you don't pass in return_url at all?
let metry
I'm getting same error
url_invalid
In docs, it also says "By default, stripe.confirmSetup will always redirect to your return_url"
Hmm okie
Sorry I think SetupIntent requires a return_url by default. You can configure a simplest page you own and just display "Congratz" or something
https://stripe.com/docs/payments/3d-secure#manual-three-ds Here are the guide for manually manipulate the 3DS flow. You can use an iframe to display 3DS, but then after that the iframe itself should be back to somewhere, which is the return_url you set
Okay thank you for this
I will check it
Going back go to my issue about return_url, does this mean I don't have any choice but to really use a return_url?
My problem is we are using a modal for this, and I need everything to be in 1 place. ๐ญ
Just configure a simple page for it as I said. You can still keep a modal by following the Doc article above