#iclasspropayne_webhooks

1 messages ยท Page 1 of 1 (latest)

glad currentBOT
#

๐Ÿ‘‹ 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/1273006456786128999

๐Ÿ“ Have more to share? Add more details, code, screenshots, videos, etc. below.

serene fossil
cedar laurel
#

That's great, I will try that, just a moment!

#

I can't update the version of an existing end-point with this ?

serene fossil
#

No, the update API doesnt' support that.

However, what you can do is create a new webhook endpoint with the same URL.

cedar laurel
#

Does it have to be an API call or can I use the Stripe CLI?

serene fossil
#

You can use the CLI too

cedar laurel
#

Sweet

serene fossil
#

if you create a new endpoint with the same URL then you'd need to update the webhook secret you're using in your code..

cedar laurel
#

Is there an option to tell it that it's for Test Mode?

serene fossil
#

Stripe CLI should default to test mode

cedar laurel
#

excellent

serene fossil
#

unless you're passing --live flag, it should target test mode

cedar laurel
#

and once it's created I should be able to edit it in the dashboard to select additional events?

serene fossil
#

yup

cedar laurel
#

Do I have the order of the args wrong ?

serene fossil
#

hmm that looks correct

#

ah

#

try api-version

cedar laurel
#

stripe webhook_endpoints create requires exactly 0 positional arguments. See stripe webhook_endpoints create --help for supported flags and usage

#

The help text does say "api-version" as well - just not the docs on stripe.com

serene fossil
#

nvm that's just to specify the API version per request

#

that won't work

#

let me try something and get back to you

#

okay this should work

stripe webhook_endpoints create -d "enabled_events[0]"="payment_intent.succeeded" 
--url="https://unifiedpay-testb-dispatch.azurewebsites.net/api/StripeReceiver" 
-d "api_version=2024-06-20"
cedar laurel
#
`stripe webhook_endpoints create` requires exactly 0 positional arguments. See `stripe webhook_endpoints create --help` for supported flags and usage
serene fossil
#

the code I shared above works for me

cedar laurel
#

let me update my Stripe CLI and try again

#

Same error :/

#
stripe version 1.21.2
PS C:\Users\RobPayne> stripe webhook_endpoints create -d "enabled_events[0]"="payment_intent.succeeded" --url="https://unifiedpay-testb-dispatch.azurewebsites.net/api/StripeReceiver" -d "api_version=2024-06-20"
`stripe webhook_endpoints create` requires exactly 0 positional arguments. See `stripe webhook_endpoints create --help` for supported flags and usage
serene fossil
cedar laurel
#

I have to say I'm jealous

serene fossil
#

i wonder if copy pasting is breaking something

#

can you try type it out?

cedar laurel
#

same result

serene fossil
#

can you try restart your console / command prompt? Maybe something is wonky with the environment

cedar laurel
#

same thing

#

I"m going to try cURL?

serene fossil
#

๐Ÿ‘

cedar laurel
#

Ok that appears to have done it! Thank you so much!