#Clément-invoice

1 messages · Page 1 of 1 (latest)

dusky laurel
#

👋 happy to help

#

could you please use this thread instead of posting to the main channel?

silent socket
#

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.

dusky laurel
silent socket
#

But I just want to trigger a test event to mock it

#

before restarting a whole scenario

dusky laurel
#

since invoice.upcoming is a temporal event the only way to test it is by using test-clocks unfortunately

silent socket
#

Erf. OK

#

Question there

#

Imagine I have a user trialing

#

for let's say 60 days

dusky laurel
silent socket
#

Will a invoice.upcoming will be trigger for this user

#

(Just the time to take my coffee and I'll be back)

dusky laurel
#

the short answer is yes

#

the long answer is

invoice.upcoming Occurs 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.

silent socket
#

COOOL 😄

#

Thks.

#

Back to my code

dusky laurel
#

let me know if you need any more help

silent socket
#

Hey @dusky laurel I'm afraid I don't get the .upcoming while in trial

dusky laurel
#

did you advance your test clock to after the x days before the end of the trial?

silent socket
#

In my account settings event is scheduled 30 days before renewal

#

I'm listenening to webhook

#

But none is triggered

#

(Subscription is 1year)

lapis burrow
#

Do you have the ID of the subscription that you tried to test this with?

silent socket
#

sub_1L6DuwGEzsk2277G5kONF9gy

#

(Oh and another unrelated topic, Paypal is still not referenced in your stripe node SDK

lapis burrow
#

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?

silent socket
#

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

lapis burrow
#

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?

silent socket
#

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

lapis burrow
#

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

silent socket
#

#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

lapis burrow
#

Was your compiler developed by sailors?

#

And thank you for checking. I'm putting in the request for this now

silent socket
#

I have all my sailing licences 😉