#ynspc
1 messages · Page 1 of 1 (latest)
yes, it is safe, the ID itself can't be used without access to your secret keys
One more can you suggest on how to make the payment method default when first card is saved.
depends what you mean by 'default' . You can set https://stripe.com/docs/api/customers/update#update_customer-invoice_settings-default_payment_method though, after the SetupIntent completes.
default in a sense, to make the first added card the default payment of the customer. After that other cards will be optional which then needs to make default manually
yeah but default for what? 🙂
we don't have a concept of a default payment method for one-off payments(you always need to explicitly pass the payment_method ID when creating a PaymentIntent later); for recurring payments using our Subscriptions product, the field I mentioned above is used
Oh great thanks
I can see detach payment method[https://stripe.com/docs/api/payment_methods/detach], is this appropriate api to delete the already added payment method
yep