Skip to main content
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>'
{
  "test_webhook_url": "<string>",
  "live_webhook_url": "<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

project_id
string (UUID)
required
The unique identifier of the project

Response

test_webhook_url
string
Webhook URL for test mode events
live_webhook_url
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.completed
  • customer.subscription.created
  • customer.subscription.updated
  • customer.subscription.deleted
  • invoice.paid
  • invoice.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:
EventPurpose
checkout.session.completedTrack successful checkouts
customer.subscription.createdNew subscription created
customer.subscription.updatedSubscription plan changed
customer.subscription.deletedSubscription cancelled
invoice.paidPayment received
invoice.payment_failedPayment failed

Webhook URL Format

https://api.devkit4ai.com/api/v1/payments/stripe/webhooks/{project_id}/{mode}
ParameterDescription
project_idYour project’s UUID
modetest 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

StatusDescription
401Unauthorized - Invalid or missing authentication
403Forbidden - You don’t own this project
404Project not found

Authorizations

Authorization
string
header
required

The access token received from the authorization server in the OAuth 2.0 flow.

Path Parameters

project_id
string<uuid>
required

Response

Successful Response

Stripe webhook URLs for a project.

test_webhook_url
string
required
live_webhook_url
string
required