#dineshkumar6419
1 messages · Page 1 of 1 (latest)
That option will update the default_payment_method so yes it will override the current default_payment_method
Try it in Test mode
I only have the API Reference to offer https://stripe.com/docs/api/subscriptions/create#create_subscription-payment_settings. Try the IDE autocompletion with methods from the SDKs 🙂
Complete reference documentation for the Stripe API. Includes code snippets and examples for our Python, Java, PHP, Node.js, Go, Ruby, and .NET libraries.
sorry i am not clear this
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",
};
The former, this updated payment_method
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?
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.
Complete reference documentation for the Stripe API. Includes code snippets and examples for our Python, Java, PHP, Node.js, Go, Ruby, and .NET libraries.
- in test mode i created subscription sub_1OObSaBUmBAZBIgtvnC9Gtir using this default payment pm_1OObTIBUmBAZBIgtICUrUt3A and customer cus_P5wQFfOOb4eTmS
- and then i updated this customer cus_P5wQFfOOb4eTmS payment method as pm_1OL3oJBUmBAZBIgtdQFNaLDi
- 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
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
after 2, I checked Subscription sub_1OObSaBUmBAZBIgtvnC9Gtir default payment method is still pm_1OObTIBUmBAZBIgtICUrUt3A