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
The unique identifier of the project
Response
Webhook URL for test mode events
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
Get Webhook URLs
Call this endpoint to get your project’s webhook URLs.
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)))
Create Test Endpoint
Click Add endpoint and paste the test_webhook_url. Make sure you’re in Test mode .
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
Get Signing Secret
After creating the endpoint, click to reveal the Signing secret (starts with whsec_).
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.completedTrack successful checkouts customer.subscription.createdNew subscription created customer.subscription.updatedSubscription plan changed customer.subscription.deletedSubscription cancelled invoice.paidPayment received invoice.payment_failedPayment failed
https://api.devkit4ai.com/api/v1/payments/stripe/webhooks/{project_id}/{mode}
Parameter Description 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
Status Description 401Unauthorized - Invalid or missing authentication 403Forbidden - You don’t own this project 404Project not found
Related Pages
Stripe Webhook Handler How webhooks are processed
Update Stripe Config Save webhook secrets
The access token received from the authorization server in the OAuth 2.0 flow.
Stripe webhook URLs for a project.