#antoine-step
1 messages ยท Page 1 of 1 (latest)
Could you please help me identify the issue.
Also, as i already have many subscriptions, what can i do now to seamlessly get the next payment working for them?
thank you for taking a look
Can you share a subscription ID example?
is it safe to share here?
I suspect that you need to set the either the subscription default_payment_method or customer invoice_settings[default_payment_method] after the PM is set up
Our API now also supports having this set automatically after the first payment succeeds:
https://stripe.com/docs/api/subscriptions/create#create_subscription-payment_settings-save_default_payment_method
Complete reference documentation for the Stripe API. Includes code snippets and examples for our Python, Java, PHP, Node.js, Go, Ruby, and .NET libraries.
but in this case why do i see the message
"This payment successfully set up pm_xxxxxxxx for future off-session payments"
Yes, but you need to set it as the defualt to be used
Yes, subscription ID are safe, nobody can do anything with them without your API key
(Never share your secret key with anyone, even with Stripe)
this is one of the subscriptions with this case
sub_1N8HXzCYBsZmZGQEWtTxv9Rr
the message is very missleading as it says that it is set up for future payments
The payment method is set up for future payments, yes, but you need to tell stripe to use it for those future invoices
So you can either update the subscription to set the default: https://stripe.com/docs/api/subscriptions/update#update_subscription-default_payment_method
Complete reference documentation for the Stripe API. Includes code snippets and examples for our Python, Java, PHP, Node.js, Go, Ruby, and .NET libraries.
Or update the customer to set the default for all invoices: https://stripe.com/docs/api/customers/update#update_customer-invoice_settings-default_payment_method
Complete reference documentation for the Stripe API. Includes code snippets and examples for our Python, Java, PHP, Node.js, Go, Ruby, and .NET libraries.
but i will need to get the payment method Id of every customer to do thhat
Or you can use this new setting and set it to on_subscription for new subscriptions
as i do not want my customers to enter their info again
yes, for the ones that have already been set up but not set as the default, you'll need to update the subscription or customer to that payment method in each case
You shouldn't need to, the PM is already saved
yeah the API reference you sent says that i will need to provide the payment method id to set it as default payment method
this means that in the dashboard i have to go to every customer get their subscription ID and payment method ID
and then use the update API to set the default payment method
right?
is there a way I can do this quicker? through the dashboard for example?
Well no, you'd use the API for both parts
You can either list the customer payment methods:
https://stripe.com/docs/api/payment_methods/customer_list
Complete reference documentation for the Stripe API. Includes code snippets and examples for our Python, Java, PHP, Node.js, Go, Ruby, and .NET libraries.
Or retrieve the payment intent from the first invoice from the subscription and look at the payment method used there
Then set that PM on either the subscription or customer invoice settings
alright and once this is set it will definitely work for the next payments?
Well it will be attempted, nobody can guarantee it will succeed
the card could have insufficient funds, or the bank might ask for authentication again etc
but at least it will not ask for payment method
if the bank asks for authentication again, do i or the customer get a notification?
You need to either handle these cases or let Stripe handle it for you with automatic recovery:
https://stripe.com/docs/billing/revenue-recovery/customer-emails
alright thank you!
and for the new subscriptions
https://stripe.com/docs/api/customers/update#update_customer-invoice_settings-default_payment_method
Complete reference documentation for the Stripe API. Includes code snippets and examples for our Python, Java, PHP, Node.js, Go, Ruby, and .NET libraries.
is this a new addition to the API?
No, this is the relatively new option you should use to set the default automatically on the subscription
The customer invoice settings have existed for several years
alright thank you! I'll reach out if more help was needed!
Sounds good, my pleasure ๐
will this thread remain on the channel so i can see it for reference?