#samiya_unexpected
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/1463103986746921124
๐ Have more to share? Add more details, code, screenshots, videos, etc. below.
hey there - no event triggers on the second day of a trial period for a subscription
are you trying to manually create a pre-auth for a payment, separate to the subscription? the customer will be billed as part of the subscription when the trial ends, so it's not clear to me how the pre-auth is intended to fit into this
I want to create preauth exactly like this but on the 2nd day of trial
can you confirm what the purpose of this pre-auth is?
for example, do you just want to validate that the customer's card can be charged, or do you want to capture the pre-auth (i.e. take an additional payment, outside the subscription)
to answer your question more directly, there's no event that Stripe fires on the second day of a subscription, so you'd need to control the timing of this pre-auth manually on your side (rather than creating it in response to an action on Stripe's side)
I want to hold the payment amount till the trial ends
Is there a way I can create preauth on day 2
ok cool - you'd need to manage the timing of this yourself, since Stripe doesn't send any event on day 2
Can you suggest how that can be done
The usual approach would be something like: when the subscription/trial starts (via customer.subscription.created), store the start time and schedule your own job to run 2 days later; also listen for subscription updates/cancellations to reschedule or cancel the job.
So you'd get the customer.subscription.created event, and compute the target timestamp (i.e. target_time = subscription.trial_start + 2 days)