#dineshkumar6419

1 messages · Page 1 of 1 (latest)

solemn skiffBOT
visual mesa
#

That option will update the default_payment_method so yes it will override the current default_payment_method

#

Try it in Test mode

hardy harbor
#

sure i will try and come back

#

please provide me example codes?

visual mesa
hardy harbor
#

i asked what

#

if i create a more Subscriptions with below Payment Settings Options, after update the customer default_payment_method , will subsciption's future recurring paments are use this updated customer's default_payment_method or Subscription's default_payment_method?

// Automatically save the payment method to the subscription
// when the first payment is successful.
var paymentSettings = new SubscriptionPaymentSettingsOptions {
SaveDefaultPaymentMethod = "on_subscription",
};

visual mesa
#

The former, this updated payment_method

hardy harbor
#

after the create the subscriptions with above option, i will update custmer default_payment_method , which one is apply future recurring payment?

#

customer's default_payment_method or Subscription's default_payment_method?

visual mesa
#

The Subscription's then. https://stripe.com/docs/api/subscriptions/object#subscription_object-default_payment_method

ID of the default payment method for the subscription. It must belong to the customer associated with the subscription. This takes precedence over default_source. If neither are set, invoices will use the customer’s invoice_settings.default_payment_method or default_source.

hardy harbor
#
  1. in test mode i created subscription sub_1OObSaBUmBAZBIgtvnC9Gtir using this default payment pm_1OObTIBUmBAZBIgtICUrUt3A and customer cus_P5wQFfOOb4eTmS
#
  1. and then i updated this customer cus_P5wQFfOOb4eTmS payment method as pm_1OL3oJBUmBAZBIgtdQFNaLDi
#
  1. question: next recurring payment for this subscription sub_1OObSaBUmBAZBIgtvnC9Gtir will use which payment method? this subscription's default payment method pm_1OObTIBUmBAZBIgtICUrUt3A or this customer's default payment method pm_1OL3oJBUmBAZBIgtdQFNaLDi
visual mesa
#

After 2, you want to check if the Subscription default payment method is still pm_1OObTIBUmBAZBIgtICUrUt3A or not

#

if yes then it will bed used, if it's updated then the updated value will be use

#

You can use Test clock to test

hardy harbor
#

after 2, I checked Subscription sub_1OObSaBUmBAZBIgtvnC9Gtir default payment method is still pm_1OObTIBUmBAZBIgtICUrUt3A

visual mesa
#

So yes it will continued to be used

#

as the Sub's prroperty will take precedence