#Clément-invoice
1 messages · Page 1 of 1 (latest)
👋 happy to help
could you please use this thread instead of posting to the main channel?
Sure
So:
Seems that the event is not support by CLI stripe trigger invoice.upcoming
Which returns The event invoice.upcoming is not supported by the Stripe CLI.
have you tried using test clocks? https://stripe.com/docs/billing/testing/test-clocks
But I just want to trigger a test event to mock it
before restarting a whole scenario
since invoice.upcoming is a temporal event the only way to test it is by using test-clocks unfortunately
I hear your frustration but there's no other option
Will a invoice.upcoming will be trigger for this user
(Just the time to take my coffee and I'll be back)
the short answer is yes
the long answer is
invoice.upcomingOccurs X number of days before a subscription is scheduled to create an invoice that is automatically charged—where X is determined by your subscriptions settings. Note: The received Invoice object will not have an invoice ID.
let me know if you need any more help
Hey @dusky laurel I'm afraid I don't get the .upcoming while in trial
did you advance your test clock to after the x days before the end of the trial?
In my account settings event is scheduled 30 days before renewal
I'm listenening to webhook
But none is triggered
(Subscription is 1year)
Do you have the ID of the subscription that you tried to test this with?
sub_1L6DuwGEzsk2277G5kONF9gy
(Oh and another unrelated topic, Paypal is still not referenced in your stripe node SDK
It looks like that test clock is still at 2022-06-20, if you advance it by 11 months does the upcoming event show up?
Oh wait
I usually get the customer.subscription.trial_will_end 3-4 days before the end but here I got it 30 days before (so at the schedule I expected `invoice.upcoming``
OK I think I got it
Nice! Also will check in to that node type issue. Not sure why it would not be there. Is that missing value currently blocking you on something?
Yep b
Docs says it can be referenced as type
But the paypal type is not available in the SDK
Which make my compiler complaining ! "No son of b****, paypal is like hell, we're Stripe motherfcer
What an error message. But yes thank you for clarifying. I can file feedback about this internally
Actually it might be good to check if there is already an issue for this on the stripe-node GitHub. I can check in a moment
#BugBountyChasing
Nope
LOL.
I silenced the error with // @ts-ignore
And now my compiler is complaining "No m*ther*fu*ck**, keep you code, clean ! No ts-ignore
Was your compiler developed by sailors?
And thank you for checking. I'm putting in the request for this now
I have all my sailing licences 😉