#jcnguyen_36895_03919
1 messages ยท Page 1 of 1 (latest)
Yes, but you'd need to handle this yourself. You can make an api request to get the customer's payment methods: https://stripe.com/docs/api/payment_methods/customer_list then use those results to display any of their existing pm's to select
Complete reference documentation for the Stripe API. Includes code snippets and examples for our Python, Java, PHP, Node.js, Go, Ruby, and .NET libraries.
And if they opt to pick a new card, then you can render the payment element to collect new details
I see. I was hoping that when i generated the paymentelement which contains all the price etcs and from there they can chose whether to use existing card or new card via stripe paymentelement
Hi ๐
I'm stepping in as @mint owl needs to go soon
Hi
That feature is not currently available in the payment Element, but as my colleague pointed out, you can handle that yourself using the saved Customer payment methods.
got it. i'm trying not to spend ton of time to rework on UI and backend incase user decided to use existing card, but there's not other option i guess
Let's say I already generate the invoice via subscription and decide to use the selected paymenmethod. All I need to do is set the paymentmethod in the invoice, automatically charging the client.
Yes, if the invioce is configured to charge automatically. You can set the default payment method on the Subscription or even on the Customer object as well
right now when i create a subscriptiong with the PaymentBehavior = "default_incomplete". all i need to set defaultpaymentmethod on the subscription if the user decided to go with selected card?
Correct. The Subscription will be created in an incomplete state and it will transition to active once you add a default payment method, which you can do in an Update call: https://stripe.com/docs/api/subscriptions/update#update_subscription-default_payment_method
thanks
another question is it possible to determine if the subscription is currently set to auto renewal or not?
If we are talking about a regular Subscription (not a Subscription Schedule), they will continue to invoice until they are paused or canceled. You can check the cancel_on property to see if they are set to be canceled at a later date.
is there a different between subscription vs subscription scheduled?
Yes, they are significantly different
and if cancel_on is set on a date meaning not auto renewal?
subscription scheduled is use for migration subscription correct?
No
But let's focus on the Subscription object itself since that is what we are talking about here
If you have a Subscription with cancel_at set to a future date OR cancel_at_period_end then that means the Subscription will cancel at some time in the future.
But if you do not have your subscription set up to cancel they will continue to generate invoices and charge the customer on your defined billing cycle
got it thanks
for subscription scheduled do they have the same concept or different?
What concept specifically? There is a lot that is different about Subscription Schedules and I recommend you start by reading this doc
https://stripe.com/docs/billing/subscriptions/subscription-schedules
We even have a short YouTube video explainer
will do thanks