#lucas-customer-defaultpm
1 messages ยท Page 1 of 1 (latest)
Hi ๐
Where are you trying to set this?
i have no idea about this
That is going to make this hard. What record are you looking at where. you see this?
i need default payment method when subscription start
automatic_payment_methods: {
enabled: true,
}
passing in create-payment-intent api
Are you collecting the Payment Method after you create the Subscription or do yo know it beforehand?
lucas-customer-defaultpm
let me share more information
i have two plans
and subscription will start after device deliverd
and it will take 4-5 days so now payment collect after checkout form i just need to store default payment method for particular customer
How are you going to collect payment method details exactly?
i am calling retrieve-customer api
Sorry I can't explain it to you
in short i just need to store default payment method.
But to explain how to do that, I need to understand what you are doing
i have two plan right now
- month, half year, year.
- device-1, device-2, device-3
device prices based on plan
its working nicely
whenever i tried to update subscription subscription will update on same day.
we need to update subscription in end of the period like
if we select monthly plan with device-1 and after 10 days of subscription started user update his subscription subscriptio will update after remaining days(20 days) & charged after end of the subscription period
Okay but how exactly are you creating the Subscription and how are you collecting card details? Like are you using Checkout? PaymentElement? Something else?
using checkout
Okay so if you use Checkout to collect card details for a Subscription it will set the right default payment method automatically for you
So I don't understand why you said it doesn't. Can you give a concrete example of a Customer id cus_123 for me to look at?
Ah PaymentElement is completely different
Looks like all you did is
1/ Create a Customer
2/ Create a PaymentIntent
3/ Confirm that PaymentIntent
You never created a Subscription. Why are you using a one-time PaymentIntent if you want to do Subscriptions?
subscription will create after device deliverd.
so what can i do ?
why would you create the Subscription after and take a payment upfront? That is not a really common flow
But mostly all you need to do is call https://stripe.com/docs/api/customers/update and set invoice_settings[default_payment_method]
Let me know if that doesn't work!
ok sure brother ๐