#darthvader2.0.
1 messages · Page 1 of 1 (latest)
Hello! We'll be with you shortly. Below are links to other discussions we've had with you in the past week in case you want to review that information. If your question is related to one of these previous discussions, please provide a comprehensive summary of the current state and what you need help with now. We help many users simultaneously, so a summary allows us to resolve your issue as soon as possible.
- darthvader2.0., 5 days ago, 29 messages
Hi
Could you please share some concrete example ? I'm not understanding you sorry
Hey
for example
the billing method is set to customer default payment method, right?
in this case if I'm not mistaking
Yes correct
yes ?
How can I set the subscription to charge the payment used to create the subscription when is created?
my problem is the subscriptions are set to charge the customer default payment method but after creating the subscription and getting the webhook regarding the subscription was paid successfully I have to manually update the customer default payment method with the one used to create that sub?
How can I set the subscription to charge the payment used to create the subscription when is created?
How have you created the Susbcription ?
If you created the Susbcription and set the default payment method at creation:
https://docs.stripe.com/api/subscriptions/create#create_subscription-default_payment_method
Then that one will be considered as default payment method
Yap, but if the pm is not created before the subscription is created how would I know what default_payment_method to add?
Then you can update the Subscription to use that new pm:
https://docs.stripe.com/api/subscriptions/update#update_subscription-default_payment_method
ok, so seems like I have to manually do this using the api
so stripe does not have any kind of flag to make the subscription when is created the payment method used for it as the one to be used to charge the customer for feature invoices regarding that subscription, right?
You can set payment_settings.save_default_payment_method: on_subscription
https://docs.stripe.com/api/subscriptions/create#create_subscription-payment_settings-save_default_payment_method
So the payment used when creating the Subscription will be set as a default one
Did you have the chance to check the official guide for building a Subscription:
https://docs.stripe.com/billing/subscriptions/build-subscriptions?ui=elements
yes, we are using the build-in elements from stripe
ok, will try
I tried yesterday using the this (payment_settings.save_default_payment_method: on_subscription) but saw no difference in the dashboard at least
maybe I've missed something
The payment method is considered as a default one, so the Dashboard information is consistent
What you can do to double check
is to inspect the payment_method id used in each billing cycle
you can use and create Stripe test clock in order to make simulations
when using this (payment_settings.save_default_payment_method: on_subscription) I should see in the stripe dashboard the billing method to be the card just used for creating the subscription, rigth?
I'm not sure about the value populated on the Dashboard, but it should have Charge specific payment method or Charge default payment method
Did you have the chance to inspect using the APIs what Payment Method were used ?
not yet, since initially sow the label in the dashboard did not change so i thought maybe I need to check more if this is supposed to happen
Yeah I guess the label isn't quite clear in the Dashboard
in other projects when I've only used the checkout the label was updated with the pm used to create the sub
Cna you share an example sub_xxx
sub_1OlYwqEDNZeJRgm5OsgMr6wP
Sorry, Im confused. in That example you didn't pass the payment_settings[save_default_payment_method] param: https://dashboard.stripe.com/test/logs/req_dYSIRkCToKovY6
So this seems expcted
let me create one
maybe I've deleted that sub
one sec
does this have the flag passed? sub_1OlqHwEDNZeJRgm5Leu719w7
neah, looks like it's off
wtf
I mean surely you should be able to answer that? You're the one writing the code to initiate the API request. Equally, you can find your API request logs in the Dashboard
But no, it doesn't: https://dashboard.stripe.com/test/logs/req_CqR7fHA1UcvWHz