#LucidLaw

1 messages ยท Page 1 of 1 (latest)

rotund fernBOT
celest panther
#

I'm following this docs by the way

elfin mortar
#

So this is to create a SetupIntent and it should works if you use a suppose-to-succeess card

celest panther
#

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

elfin mortar
#

You don't need to alter anything. our stripe.js will automatically handle if the card requires 3DS

celest panther
#

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 ? ๐Ÿ˜ข

elfin mortar
#

you are passing confirm=true, which means confirming server-side

celest panther
#

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

elfin mortar
#

Yep!

celest panther
#

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

elfin mortar
#

When you use Subscription, you will need the Customer to authorize the first payment, then let our Subscription collect from 2nd times onward

#

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

celest panther
#

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.

  1. Add Card (which is the Payment Methods) to a customer
  2. Customer can choose default card (Payment Method)
  3. 1 Click payment (by calling /payment_intents using the selected payment_method)
elfin mortar
#

Ah it should work yes, as long as you used SetupIntent for step 1 Add Card to handle 3DS properly

celest panther
#

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

celest panther
elfin mortar
#

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

celest panther
#

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?

elfin mortar
#

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

celest panther
#

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"

elfin mortar
#

What if you don't pass in return_url at all?

celest panther
#

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"

elfin mortar
#

Hmm okie

celest panther
#

Any idea? I'm stuck on this issue now

#

Hoepfully there should be a way

elfin mortar
#

Sorry I think SetupIntent requires a return_url by default. You can configure a simplest page you own and just display "Congratz" or something

celest panther
#

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. ๐Ÿ˜ญ

elfin mortar
#

Just configure a simple page for it as I said. You can still keep a modal by following the Doc article above

celest panther
#

Okay I will try it

#

Thank you so much for your help @elfin mortar