#alextakitani

1 messages · Page 1 of 1 (latest)

summer girderBOT
dawn bone
#

Hi there!

coarse ruin
#

Hi there!

dawn bone
#

How can I help?

coarse ruin
#

So, I have some questions about setup intents. I could create one using Checkout

#

but, I'm a little confused about the flow of things after that.

#

It sets a payment method for a customer, right?

dawn bone
#

You can use Checkout Session in setup mode or directly create a SetupIntent. Once succeeded, you will get back a payment method that you can reuse later for payments.

#

Does that answer your question?

coarse ruin
#

what if the customer already has a payment method attached?

#

what happens?

dawn bone
#

A new payment method will be added to the customer.

coarse ruin
#

Can I check if it already exists and not add it?

dawn bone
#

Sure, check if the customer object has a payment method attached, and if not, create a SetupIntent or a Checkout Session in setup mode. That's completely up to you.

coarse ruin
#

got it

#

so after the payment method is ok with the user

#

if I create a subscription, it will use that payment method?

#

To contextualize, my situation is this: I have a shopping cart. I can have 2 subscriptions and a one time purchase there.

#

I wanted to use Checkout, but it does not work for subscriptions with different billing periods, so I'm trying to go with the setup_mode and creating the subscriptions later

dawn bone
coarse ruin
#

Nice!

dawn bone
#

However if you do:

  1. Create a SetupIntent to collect a payment method
  2. Create one subscription with an immediate payment
  3. Create another subscription with an immediate payment
    Then this is not great, because the bank may ask for 3DS for each of the payments. So three times in a row for the user.
coarse ruin
#

oh

dawn bone
#

Instead I recommend:

  • Create a PaymentIntent with setup_future_usage (in order to save the cade for later) and that contains the amount for the first billing period for both subscription. This way the customer pays only once, and you get maximum only one 3DS challenge.
#
  • And then you create the two subscription, and you add a free trial to them since the user already paid for the first billing period
coarse ruin
#

I can do that using the Checkout?

dawn bone
coarse ruin
#

Got it!

#

Thanks for your help, have a nice one!