#Nadiya

1 messages ยท Page 1 of 1 (latest)

cedar pondBOT
warped sparrow
#

Hi there!

#

No I would not recommend doing this.

remote seal
#

please enlighten me

warped sparrow
remote seal
#

checkout?

warped sparrow
remote seal
#

thank you so much.

warped sparrow
#

Notice that we don't create a SetupIntent, we reuse the PaymentIntent created by the Subscription.

remote seal
#

yes understood.
so, setupIntent is used to store the card only right?

#

i've seen people doing another api call to do subscription on the result of confirmSetup.

warped sparrow
#

i've seen people doing another api call to do subscription on the result of confirmSetup.
Technically this can work, but it's a bad experience since banks may require 3DS two times in a row (first for the SetupIntent and then for the first payment of the subscription)

remote seal
#

okay, understood. thanks for the link.

#

Have a nice day

warped sparrow
#

Happy to help ๐Ÿ™‚

remote seal
warped sparrow
#

With your approach after you finish the SetupIntent, you will try to pay the first invoice. It means that bank may require 3DS two times in a row.

remote seal
#

any benefits regarding security compared to other?

#

no not the setupIntent method

#

but the checkout and payment Element

#

I mean , designing payment element ourself, instead of using checkout

hearty latch
#

๐Ÿ‘‹ taking over for my colleague. Let me catch up.

#

Checkout offers a low-code solution which might be in most cases the best approach but it doesn't have any extra security/PCI compliance measures that the Payment Element doesn't really have

remote seal
#

I see, got it. thank you for the explanation

hearty latch
#

sure let me know if you need any more help

remote seal
#

sure

mossy oreBOT
#

This thread has been archived. If you need help with anything else please ask in #dev-help or contact Stripe Support: https://support.stripe.com/contact

shut solar
#

@remote seal how can I help?

remote seal
#

when to save the collected payment method as user's default payment method in this use case

#

confirmPayment is stripe api, in which we can't really do anything there

shut solar
shut solar
#

What about what?

remote seal
#

user need to subscribe to a product when clicking the submit button of payment element. , and also if possible want to save card too

shut solar
#

Save the card to where? You can pass a parameter to set it as the default on the subscription, but if you mean on the customer then that's an additional API call

remote seal
#

the article you shared using setupIntent, in that case i need to call another api for subscription after processing cofrimSetup

shut solar
#

As advised by my colleagues, it's not recommended to do a SI and then a subscription

shut solar
#

I know Stripe, but which object? You can 'save' it to both the subscription or the customer

#

If you're creating a Subscription, I'm not sure why you also need a Setup Intent

remote seal
#

oh sorry, customer object.
i would like it to reflect here

remote seal
#

this should be done in webhooks?

shut solar
remote seal
shut solar
#

Yes, it can be done in a webhook handler

remote seal
#

ah okay, that was my question

#

thank you so much

#

something like this?

                      $paymentIntentDetail->customer->id,
                      ['invoice_settings' => ['default_payment_method' => $paymentIntentDetail->payment_method]]
                    );```