#Ender1776 [syndicate]-subscription-pm
1 messages · Page 1 of 1 (latest)
Can you share an example Subscription ID with me? I'm not fully following the sequence of events, but I can see the requests you're making if you share an ID
sub_1MS1KSEw8dry0on1sMM1QHcF
thanks! let me take a look
use case is we show the customer's shipping/billing/email address and payment method, we allow them to update them in our app
but I don't see how to show the payment method that is used for payment on the next invoice
Ahhh I see what you're saying now - you're using payment_settings.save_default_payment_method to save the PM as the default on the Subscription automatically, but you're hitting a weird edge case because you have no way of surfacing that back to the user in a PaymentMethods list view
Ender1776 [syndicate]-subscription-pm
well, yeah, when I list customer's payment, I'm not sure how to show the user what payment method is going to be used on the next invoice\
and there also doesn't seem to be a default payment method flag on the payment method list response
So i'd actually recommend you not use payment_settings.save_default_payment_method and instead do this:
- Create the Subscription + confirm/complete the first payment
- Once payment is complete, take the created PaymentMethod and set it as
invoice_settings.default_payment_methodon the Customer (see https://stripe.com/docs/api/customers/update#update_customer-invoice_settings-default_payment_method)
Setting invoice_settings.default_payment_method will use that as the default PaymentMethod for all Subscriptions and Invoices, and it's something you can easily retrieve on the Customer
Complete reference documentation for the Stripe API. Includes code snippets and examples for our Python, Java, PHP, Node.js, Go, Ruby, and .NET libraries.
perfect, thanks, and then I would need to pull the current subscription to see the default payment method ID (and then pull the payment method details) ?
If you switch to the method I mentioned, you wouldn't need to pull the current subscription at all - you'd have it all from the customer
Just to be really clear - if you set invoice_settings.default_payment_method on the Customer you don't need to set a default on the Subscription itself. When it's time for the subscription to renew it'll check if the Customer has a default PM and use that for payment