#abdu77ah_api
1 messages ¡ Page 1 of 1 (latest)
đ Welcome to your new thread!
â˛ď¸ We'll be here soon! Typically we respond in a few minutes, but sometimes we might take a bit longer if the server is busy or if you have a particularly tricky question.
âąď¸ We close idle threads, which makes them read-only. Once a thread is closed it won't be reopened, but you can always start a new thread if you have another question.
đ This thread will always be available, even after it's closed. You can find it again using Discord's search, or you can save this link: https://discord.com/channels/841573134531821608/1309156917905719406
đ Have more to share? Add more details, code, screenshots, videos, etc. below.
hi there!
having a look
if you look at the request you shared, you'll see you didn't set the trial_end parameter: https://dashboard.stripe.com/test/logs/req_wfB95pfHqM2Plc
can you share the code you used to try to end the trial?
can you share the command you used?
i think it's a API Explorer problem
I typed now in trial_end and pressed Run
It's called API Explorer I think
the line of code at the very bottom is just updating the subscription without setting any parameter. let me try to reproduce in workbench...
seems like it is not working when you type now
yep I managed to reproduce. it works with timestamp, but not "now".
I'll report that to the team, thanks for flagging!
in the meantime, you should be able to use the Stripe API, Stripe CLI, or the Stripe Dashboard itself to udpate the Subscription.
sure, you can ask it here
There's a feature I need to implement. When customer a has signed up in our app on trial (without payment method) he/she can end a trial early by adding payment method, pay the subscription fee and then move to Active from Trailing. But I couldn't find a straight forward way to do this with Stripe. Can you help me design this flow from both client-side and server-side perspective?. Currently I am thinking of this workaround. User clicks a button and our backend (BE) will create a billing portal url where he/she can add payment detail. Then BE will wait for some event from Stripe (I couldn't find an event of "Payment details added") in order to call subscription update API with "trail_end"="now". Then stripe will automatically charge user's payment creds.
I also tried creating a Checkout Session but when customer pays. A new subscription is created instead of moving existing subscription to "active" which is not good I guess.
(I couldn't find an event of "Payment details added")
I recommend testing this in test mode to see the events triggered. but you should receive apayment_method.attachedevent
yes what you shared is an option.
I also tried creating a Checkout Session but when customer pays. A new subscription is created instead of moving existing subscription to "active" which is not good I guess.
that can't work, Checkout Session can only create a new Subscription, not edit an existing one. However you could use Checkout Session insetupmode instead of the Customer Portal to collect the Payment Method if needed.
What's the difference between using Checkout Session in setup mode and Billing portal way as both are collecting users' payment detail?
it's a different UI, but the end result is the same.