#bugkiller.

1 messages · Page 1 of 1 (latest)

molten rampartBOT
carmine river
sharp zinc
#

if user has few cards, how to know which one is default

carmine river
#

You could check the default by retrieving the customer and checking invoice_settings.default_payment_method

sharp zinc
#

once user created subscription with stripe subscription checkout session

#

then can we change subscription in the backend to the differnt pricing (of courese, when user clicks the button in frontend to change, then we need to change it somehow in the backend)

#

I'm asking if we can operate that kind of action ( we have permission? )

carmine river
#

Yeah once a subscription is created you're welcome to update it however you want - but if the change triggers an immediate payment (like if you were to immeidately reset the billing cycle anchor) then it's always possible that future off-session charge fails and you'd need to bring your customer back on-session for them to complete payment

sharp zinc
#

how to create that session for subscription update?

carmine river
#

Checkout Sessions are ONLY for subscription creation - for subscription updates you'd either have to build your own flow, or rely on something else like customer portal to allow customers to update their subscriptions themselves

sharp zinc
#

hmm,

#

but I have my own user interface for it

#

is it possible to use my own ui?

#

like select the plan (to update)

#

because we need to provide same ui to customers (who use paypal, who use stripe for both)

carmine river
sharp zinc
#

but you said it could be failed. and what if user wanted to use different coupon

#

""Checkout Sessions are ONLY for subscription creation - for subscription updates you'd either have to build your own flow, or rely on something else like customer portal to allow customers to update their subscriptions themselves""

#

so want to manage the subscription upgrade/downgrade somehow

carmine river
#

Yeah that's what the second link I sent you is for - you'd use stripe elements to allow your users to confirm their payments client-side so that you can trigger extra actions like authentication/3ds

sharp zinc
#

and it will bring user to the checkout page maybe

sharp zinc
#

can you give me link again for stripe elements

carmine river
#

Really I'd recommend reading that whole page if you can - it walks through how to build an integration with PaymentElement and subscriptions

sharp zinc
#

used checkout popup old api for all the time

#

but now we need to update it because it's not supported 3ds, so some users failed to pay

carmine river
#

Yeah that's why you need the call to confirmPayment - that's what triggers 3ds if it's needed

sharp zinc
#

we can even create subscription with this stripe elements? (instead of creating subscription checkout session and redirect user to it)

carmine river
#

Yup!

sharp zinc
#

hmm, interesting, but this is not popup

#

right?

#

so do you think I can integrate my this ui with stripe elements?

carmine river
#

and yeah, all you'd have to do at the bottom of the page is add the payment element where they can provide their payment details and compelte payment

sharp zinc
#

I have few plans as you can see

#

then should I make

#

this for each plan?

#

I have few plans, but wanted to have 1 button for stripe

#

user select the plan, and click the stripe button

carmine river
sharp zinc
#

hi

#

button must be inside form?

#

or don't need to be inside form?

carmine river
#

Which button? The one to update the amount?

sharp zinc
#

submit button

carmine river
#

I believe you'd want it wihtin your form

sharp zinc
#

I don't want it becuase I'm using vue

#

😐

carmine river
#

I'm not super familiar with vue, but you can look into whether it's possible to move that button outside the form

#

I don't think it's a question that would be specific to stripe