#mathan
1 messages · Page 1 of 1 (latest)
Hi there!
Can you give a little more context? How is the customer upgrading? Which restriction do you want to add?
customer upgrading his plan via API(from our product) I need to restrict if they did not add their card details?
Well you are are doing the upgrade from the API, you can directly check if the customer has a default payment method attached https://stripe.com/docs/api/customers/object#customer_object-invoice_settings-default_payment_method
Also you could try pending updates, as described here: https://stripe.com/docs/billing/subscriptions/pending-updates
Basically the update will only be applies if the payment succeeds.