Stripe webhook setup - Step-by-step

It’s literally the first thing in the Stripe API docs (at the very top of the page):

Perfect. I have now made my ‘GET’ URL

https://api.stripe.com/v1/subscriptions/sub_`[my Stripe-Account ID]`

You don’t put your account ID there… you need to put the ID of the subscription you want to retrieve.

As for the rest… there’s a lot wrong here…

Firstly, I’m not sure you want to be including the private key the URL (it might work that way I’m not sure) - but I use Private key in Header as the Authentication type for Stripe.

In any case, you need to include the ‘live’ API key (your live Stripe Secret Key, NOT public key), preceded by the word Bearer, then a space, where it says ‘Key Value’, and your Development key (i.e. your test secret key) where it says Development Key Value. e.g. Bearer sk_live_******************** & Bearer sk_test_********************

The Key name needs to be Authorization

You don’t need any headers in you actual Get Subscription call, just set up the URL with a dynamic value for the Subscription ID (use to make it dynamic)

Also, it’s probably not a good idea to post your Stripe API keys here in the forum (certainly not your secret keys - even test ones), nor your Stripe account ID, for security reasons - so I’d delete those from your post if I were you.

1 Like