#lalit-default
1 messages · Page 1 of 1 (latest)
hi! you can't really. Can you exlain what you mean by a default? There's not really such a concept in our API.
-for one time payments, there's no such thing — we don't have a default, you tell us what card to charge by passing it to the payment_method field when creating a PaymentIntent.
-for subscriptions, can use either https://stripe.com/docs/api/subscriptions/create#create_subscription-default_payment_method or set https://stripe.com/docs/api/customers/update#update_customer-invoice_settings-default_payment_method
there's not really any Stripe-provided frontend component/input for those concepts, it's something you might present as an option in your own UI and connect up the code you need to then set a default in your backend. Depends a lot on what you're building.
in this window we have checkbox "use as default payment method, so i am refering this link https://stripe.com/docs/payments/save-and-reuse?platform=web#customize-appearance,but i need this checkbox also
Thank you for that clarification, I'm looking into that.
Thank you for your patience. That checkbox is unique to our Customer Portal flow. If you wanted something similar then you will need to add a custom checkbox to your form and then add the necessary code to have that trigger an update of a customer's default payment method.
ok, thank you
Any time!