#xander-cli-forward
1 messages · Page 1 of 1 (latest)
Hello isxander, we'll be with you shortly! Below are links to other discussions we've had with you in the past week in case you want to review that information. If your question is related to one of these previous discussions, please provide a comprehensive summary of the current state and what you need help with now. We help many users simultaneously, so a summary allows us to resolve your issue as soon as possible.
• isxander, 1 days ago, 56 messages
xander-cli-forward
stripe trigger is a command to trigger a specific Event type by running a list of commands. It's unrelated to the forward part
if you want to forward real Events happening in your account you use stripe listen
I've got a local listener set up, but I'm trying to trigger the events properly using my create checkout session route I've just created. When I use the secret starting with whsec_ that points to my CLI, i get invalid secret, when i use the normal test one, it works, but my local webhook obviously isn't getting triggered
when you use the CLI you have to use the CLI's secret
yes but when I use that secret it complains it's not correct
Stripe.apiKey = theclisecret is correct right?
or should that still be the normal secret
you're misunderstanding it all 😅
that is the API key the sk_test_123 to make API requests, nothing to do with the secret used to sign Events delivered to your webhook endpoint
okay, well that got me a little further, now when I deserialize the event to get the stripe object, the optional always returns null
what does "the optional always returns null" mean?
sorry, the optional returns empty. I'm using kotlin and it converts to null
https://hst.sh/tiheqetome.yaml this is the response i get back, omitted some personal fields as I just used GPay to test
this is event.data.toString()
My guess is that we send you an Event with API version A but the stripe-java library you use supports API version B
They have to match
yeah sorry this can be a bit cryptic at first. Your account has a default API version in the Dashboard, likely set when you created the account.
Events are generated based on that specific API version and sent to your webhook endpoint for you to process
yes I did upgrade this to latest, has the cli not updated yet to this latest 10-16?
If you use stripe-java, you need to check the API version you're using based on the version of the library
okay so if you explicitly upgraded to the latest, are you using the latest stripe-java 24.* or are you on an older one like 23.*?
oh yes, I was on 23.5, upgrading to 24.0
rather than silently failing in stripe-java shouldn't it explictly error
well anyway it's working now, thanks for your help