Overview
ORIGIN Neural sends webhook events for billing changes (via Stripe) and async job completions. Webhooks are HTTP POST requests sent to a URL you configure, containing a JSON payload describing the event.
Stripe Events
Billing webhooks are powered by Stripe. Configure your webhook endpoint in the Stripe dashboard. ORIGIN Neural listens for the following Stripe events:
- checkout.session.completed — Subscription created successfully. Provisions the user's plan.
- customer.subscription.updated — Plan changed (upgrade or downgrade). Updates character limits.
- customer.subscription.deleted — Subscription cancelled. Reverts to free tier.
- invoice.payment_succeeded — Monthly payment processed. Resets character usage.
- invoice.payment_failed — Payment failed. Sends warning email, grace period begins.
Stripe webhook payload
{
"id": "evt_abc123",
"type": "checkout.session.completed",
"data": {
"object": {
"id": "cs_live_abc123",
"customer": "cus_xyz",
"subscription": "sub_abc",
"metadata": {
"plan": "pro",
"user_id": "user_01"
}
}
}
}Webhook Verification
All Stripe webhooks include a signature in the Stripe-Signature header. Always verify this signature before processing the event to prevent spoofing.
Verify webhook signature
import Stripe from 'stripe';
const stripe = new Stripe(process.env.STRIPE_SECRET_KEY);
const endpointSecret = process.env.STRIPE_WEBHOOK_SECRET;
// In your webhook handler
const sig = request.headers['stripe-signature'];
const event = stripe.webhooks.constructEvent(
request.body,
sig,
endpointSecret,
);
switch (event.type) {
case 'checkout.session.completed':
// Provision subscription
break;
case 'customer.subscription.deleted':
// Revert to free tier
break;
}Async Job Webhooks
When you submit an async synthesis job with a webhook_url parameter, ORIGIN Neural sends a POST request to that URL when the job completes.
- Webhook requests use a 10-second timeout. If your endpoint doesn't respond, the request is retried up to 3 times with exponential backoff.
- Failed webhook deliveries are logged and can be retried from the dashboard.
Async job completion webhook
{
"event": "job.completed",
"job_id": "job_abc123",
"status": "completed",
"download_url": "https://originneural.ai/v1/speak/async/job_abc123/download",
"duration_seconds": 32.5,
"characters_used": 4500,
"expires_at": "2026-02-08T12:00:00Z"
}VoiceBreed Purchase Webhooks
When a user purchases a voice from the VoiceBreed marketplace, the voice creator receives a webhook notification.
VoiceBreed purchase event
{
"event": "voicebreed.purchase",
"voice_id": "voice_breed_xyz",
"buyer_id": "user_02",
"price": 4.99,
"royalty": 0.50,
"currency": "usd",
"purchased_at": "2026-02-07T12:00:00Z"
}