#dragon.frost

1 messages ยท Page 1 of 1 (latest)

static narwhalBOT
deep shell
#

Hi there!

#

Tokens are a very old way to implement Stripe. We strongly recommend to not use this, and instead use PaymentIntent and PaymentMethod.

idle hill
#

Oh thanks. This means the paymentIntent flow replaces the need for token.

deep shell
#

Yes we don't use tokens at all. Instead is PaymentIntents and PaymentMethods.

idle hill
#

Also, previously we were attaching payment methods to an existing stripe customer like this during the subscription flow.

How do I update this according to the new recommendations?

deep shell
#

Can yiou clarify your flow? Do you want to start a new Subscription for a customer that already has a payment method saved, or do you want to start a subscription and also collect a new payment method?

idle hill
#

So, consider a situation where a user had already purchased a subscription from us previously. So they are registered as a stripe user upon purchase. So say in the future they again want to purchase a subscription again but using another card details. How should I update their card information during the subscription purchase?

deep shell
idle hill
#

Doesn't payment_settings: { save_default_payment_method: 'on_subscription' }, when creating subscription save the customer's payment method when creating a subscription?

Also, I was actually wondering if we have to update a customer's card info on after customer makes another purchase with a different card. Since I might want to retrieve the card info in another page.

#

Also since we are in the topic could you please let me know the differences between using default_payment_method and payment_settings: { save_default_payment_method: 'on_subscription' }

deep shell
#

Doesn't payment_settings: { save_default_payment_method: 'on_subscription' }, when creating subscription save the customer's payment method when creating a subscription?
Yes, if you collect a new Payment Method.

#

Also, I was actually wondering if we have to update a customer's card info on after customer makes another purchase with a different card.
What exactly do you want to update on the payment method?

idle hill
#

What exactly do you want to update on the payment method?
Card details for now

deep shell
#

Also since we are in the topic could you please let me know the differences between using default_payment_method and payment_settings: { save_default_payment_method: 'on_subscription' }
This first one is if you already have a PaymentMethod object saved on the customer. The second is if you are collecting a new PaymentMethod and want to save it as the default going foward.

#

Card details for now
What does that mean? If you mean the card numbers, then it's not about updating a card but creating a new one.

idle hill
#

Thank you for the response. One last thing I want to confirm with you.

Lets say if a stripe customer that already has purchased a subscription and they would like to purchase another one should we make a call to create stripe customer everytime we purchase a subscription or check if the customer already exists and if it does, use that customer object on the subsequent flow?

deep shell
#

Yes it better to reuse the same Customer object if you can, this way if they already have a payment method saved you can reuse it for the new Subscription.

#

Otherwise if you create a new customer object you'll have to collect new payment method details.

idle hill
#

Thanks a bunch. You clarified many of my confusions on this.

deep shell
#

Happy to help ๐Ÿ™‚

idle hill
#

I swear this is the last one today ๐Ÿ˜„

is value for default_payment_method is set as :

default_payment_method:
        stripeUser.invoice_settings.default_payment_method
#

is this the correct value to be set here?

deep shell
#

Yes that should work. However note that if the Customer object already has invoice_settings.default_payment_method set, then there's no need to set the subscription.default_payment_method. That's because, by default, the subscription will use the invoice_settings.default_payment_method.

idle hill
#

payment_settings: { save_default_payment_method: 'on_subscription' } on subscription object should do that job right?

deep shell
#

There are two places where you can save a default payment method:

  • On the Customer object (invoice_settings.default_payment_method)
  • On the Subscription object (default_payment_method)
    Only one needs to be set for things to work.
#

payment_settings: { save_default_payment_method: 'on_subscription' } on subscription object should do that job right?
This will save the new payment method as the default on the Subscription (default_payment_method)

static narwhalBOT
idle hill
#

This will save the new payment method as the default on the Subscription (default_payment_method)
Does this mean that it will not be attached to a customer but to a subscription only?

thorny bough
#

it's attached to the Customer object in general, but is only the default payment method for that specific Subscription, other subscriptions that Customer might have would not use it

thorny bough
idle hill
#

So, if I only have one category of subscription on my platform and my only usecases are if the customer wants to update the subscription or update their card that charges for that subscription. I don't think its necessary to worry about default payment method on the customer object. Did I assume this correctly?

thorny bough
#

sounds reasonable

idle hill
#

๐Ÿ™‚ can you please let me know when saving/updating the default payment method of a customer object can be useful?

#

for subscriptions flow

thorny bough
#

if you have multiple subscriptions on the same customer

idle hill
#

but if there is already a default set on subscription object then that takes priority before the customers object right?

thorny bough
#

yes