Get Webhook URLs
curl --request GET \
--url https://api.devkit4ai.com/api/v1/payments/stripe/projects/{project_id}/webhook-urls \
--header 'Authorization: Bearer <token>'import requests
url = "https://api.devkit4ai.com/api/v1/payments/stripe/projects/{project_id}/webhook-urls"
headers = {"Authorization": "Bearer <token>"}
response = requests.get(url, headers=headers)
print(response.text)const options = {method: 'GET', headers: {Authorization: 'Bearer <token>'}};
fetch('https://api.devkit4ai.com/api/v1/payments/stripe/projects/{project_id}/webhook-urls', options)
.then(res => res.json())
.then(res => console.log(res))
.catch(err => console.error(err));<?php
$curl = curl_init();
curl_setopt_array($curl, [
CURLOPT_URL => "https://api.devkit4ai.com/api/v1/payments/stripe/projects/{project_id}/webhook-urls",
CURLOPT_RETURNTRANSFER => true,
CURLOPT_ENCODING => "",
CURLOPT_MAXREDIRS => 10,
CURLOPT_TIMEOUT => 30,
CURLOPT_HTTP_VERSION => CURL_HTTP_VERSION_1_1,
CURLOPT_CUSTOMREQUEST => "GET",
CURLOPT_HTTPHEADER => [
"Authorization: Bearer <token>"
],
]);
$response = curl_exec($curl);
$err = curl_error($curl);
curl_close($curl);
if ($err) {
echo "cURL Error #:" . $err;
} else {
echo $response;
}package main
import (
"fmt"
"net/http"
"io"
)
func main() {
url := "https://api.devkit4ai.com/api/v1/payments/stripe/projects/{project_id}/webhook-urls"
req, _ := http.NewRequest("GET", url, nil)
req.Header.Add("Authorization", "Bearer <token>")
res, _ := http.DefaultClient.Do(req)
defer res.Body.Close()
body, _ := io.ReadAll(res.Body)
fmt.Println(string(body))
}HttpResponse<String> response = Unirest.get("https://api.devkit4ai.com/api/v1/payments/stripe/projects/{project_id}/webhook-urls")
.header("Authorization", "Bearer <token>")
.asString();require 'uri'
require 'net/http'
url = URI("https://api.devkit4ai.com/api/v1/payments/stripe/projects/{project_id}/webhook-urls")
http = Net::HTTP.new(url.host, url.port)
http.use_ssl = true
request = Net::HTTP::Get.new(url)
request["Authorization"] = 'Bearer <token>'
response = http.request(request)
puts response.read_body{
"test_webhook_url": "<string>",
"live_webhook_url": "<string>"
}{
"detail": [
{
"loc": [
"<string>"
],
"msg": "<string>",
"type": "<string>"
}
]
}Stripe Configuration
Get Webhook URLs
Get the webhook endpoint URLs to configure in your Stripe dashboard
GET
/
api
/
v1
/
payments
/
stripe
/
projects
/
{project_id}
/
webhook-urls
Get Webhook URLs
curl --request GET \
--url https://api.devkit4ai.com/api/v1/payments/stripe/projects/{project_id}/webhook-urls \
--header 'Authorization: Bearer <token>'import requests
url = "https://api.devkit4ai.com/api/v1/payments/stripe/projects/{project_id}/webhook-urls"
headers = {"Authorization": "Bearer <token>"}
response = requests.get(url, headers=headers)
print(response.text)const options = {method: 'GET', headers: {Authorization: 'Bearer <token>'}};
fetch('https://api.devkit4ai.com/api/v1/payments/stripe/projects/{project_id}/webhook-urls', options)
.then(res => res.json())
.then(res => console.log(res))
.catch(err => console.error(err));<?php
$curl = curl_init();
curl_setopt_array($curl, [
CURLOPT_URL => "https://api.devkit4ai.com/api/v1/payments/stripe/projects/{project_id}/webhook-urls",
CURLOPT_RETURNTRANSFER => true,
CURLOPT_ENCODING => "",
CURLOPT_MAXREDIRS => 10,
CURLOPT_TIMEOUT => 30,
CURLOPT_HTTP_VERSION => CURL_HTTP_VERSION_1_1,
CURLOPT_CUSTOMREQUEST => "GET",
CURLOPT_HTTPHEADER => [
"Authorization: Bearer <token>"
],
]);
$response = curl_exec($curl);
$err = curl_error($curl);
curl_close($curl);
if ($err) {
echo "cURL Error #:" . $err;
} else {
echo $response;
}package main
import (
"fmt"
"net/http"
"io"
)
func main() {
url := "https://api.devkit4ai.com/api/v1/payments/stripe/projects/{project_id}/webhook-urls"
req, _ := http.NewRequest("GET", url, nil)
req.Header.Add("Authorization", "Bearer <token>")
res, _ := http.DefaultClient.Do(req)
defer res.Body.Close()
body, _ := io.ReadAll(res.Body)
fmt.Println(string(body))
}HttpResponse<String> response = Unirest.get("https://api.devkit4ai.com/api/v1/payments/stripe/projects/{project_id}/webhook-urls")
.header("Authorization", "Bearer <token>")
.asString();require 'uri'
require 'net/http'
url = URI("https://api.devkit4ai.com/api/v1/payments/stripe/projects/{project_id}/webhook-urls")
http = Net::HTTP.new(url.host, url.port)
http.use_ssl = true
request = Net::HTTP::Get.new(url)
request["Authorization"] = 'Bearer <token>'
response = http.request(request)
puts response.read_body{
"test_webhook_url": "<string>",
"live_webhook_url": "<string>"
}{
"detail": [
{
"loc": [
"<string>"
],
"msg": "<string>",
"type": "<string>"
}
]
}Get the webhook endpoint URLs for your project. Use these URLs when configuring webhook endpoints in your Stripe Dashboard for both test and live modes.
Authentication
This endpoint requires developer authentication via OAuth2 Bearer Token. You must own the project.
Path Parameters
string (UUID)
required
The unique identifier of the project
Response
string
Webhook URL for test mode events
string
Webhook URL for live mode events
Example Request
curl "https://api.devkit4ai.com/api/v1/payments/stripe/projects/550e8400-e29b-41d4-a716-446655440000/webhook-urls" \
-H "Authorization: Bearer {developer_jwt}"
Example Response
{
"test_webhook_url": "https://api.devkit4ai.com/api/v1/payments/stripe/webhooks/550e8400-e29b-41d4-a716-446655440000/test",
"live_webhook_url": "https://api.devkit4ai.com/api/v1/payments/stripe/webhooks/550e8400-e29b-41d4-a716-446655440000/live"
}
Configuring Webhooks in Stripe
1
Get Webhook URLs
Call this endpoint to get your project’s webhook URLs.
2
Open Stripe Dashboard
Navigate to Developers > Webhooks in Stripe Dashboard.(((REPLACE_THIS_WITH_IMAGE: stripe-dashboard-webhooks-page.png: Stripe Dashboard webhooks page showing the Add endpoint button)))
3
Create Test Endpoint
Click Add endpoint and paste the
test_webhook_url. Make sure you’re in Test mode.4
Select Events
Select the events to listen for:
checkout.session.completedcustomer.subscription.createdcustomer.subscription.updatedcustomer.subscription.deletedinvoice.paidinvoice.payment_failed
5
Get Signing Secret
After creating the endpoint, click to reveal the Signing secret (starts with
whsec_).6
Save Webhook Secret
Use Update Stripe Config to save the webhook secret.
7
Repeat for Live Mode
Switch to Live mode in Stripe and repeat steps 3-6 with the
live_webhook_url.Required Webhook Events
Configure these events for full functionality:| Event | Purpose |
|---|---|
checkout.session.completed | Track successful checkouts |
customer.subscription.created | New subscription created |
customer.subscription.updated | Subscription plan changed |
customer.subscription.deleted | Subscription cancelled |
invoice.paid | Payment received |
invoice.payment_failed | Payment failed |
Webhook URL Format
https://api.devkit4ai.com/api/v1/payments/stripe/webhooks/{project_id}/{mode}
| Parameter | Description |
|---|---|
project_id | Your project’s UUID |
mode | test or live |
Testing locally? Use Stripe CLI to forward webhooks to your local development server:
stripe listen --forward-to localhost:8000/api/v1/payments/stripe/webhooks/{project_id}/test
Error Responses
| Status | Description |
|---|---|
401 | Unauthorized - Invalid or missing authentication |
403 | Forbidden - You don’t own this project |
404 | Project not found |
Related Pages
Stripe Webhook Handler
How webhooks are processed
Update Stripe Config
Save webhook secrets

