API Reference
Better Data supports two directions of webhook traffic:
Outbound webhook configuration is in active development. Contact support@betterdata.co for early access.
For product and integration settings where the UI is available:
Workspace-scoped configuration typically requires organization administrator permissions in your workspace.
POST /webhooks/stripeStatus: live
Handles Stripe subscription and invoice lifecycle for billing, plan feature access, and audit logging.
Verification: requests must include a valid stripe-signature header; otherwise 400.
Handled events (representative)
| Event | Effect |
| --- | --- |
| customer.subscription.created | Org billing record; plan feature access activated |
| customer.subscription.updated | Plan changes, capability snapshot recomputed |
| customer.subscription.deleted | Downgrade, capabilities revoked |
| invoice.paid | Payment confirmed, audit log |
| invoice.payment_failed | Failure recorded, ops alert |
Endpoint URL:
1https://api.betterdata.co/webhooks/stripeSet STRIPE_WEBHOOK_SECRET to your Stripe signing secret.
Canonical billing webhook path is /webhooks/stripe on the api.betterdata.co deployment — not /api/webhooks/stripe.
A separate stub route may respond at /api/webhooks/stripe with 501 Not Implemented. Stripe production endpoints must target /webhooks/stripe only.
Additional Stripe-specific reference may also use tag-level routes in OpenAPI; treat the URL above as the source of truth for billing webhooks.
Status: route may exist but handler work is in progress. In current platform builds, POST /api/webhooks/square can respond with 501 Not Implemented (stub) while SquareWebhookHandler and related models are completed — confirm behavior in your environment before going live.
Implementation detail: when additional provider-specific inbound routes ship on api.betterdata.co, they should be listed here from the same operational source of truth (do not assume parity with the Square stub).
| Planned event families (doc-level) | Intended effect | | --- | --- | | Product lifecycle | Catalog alignment when the handler is complete | | Inventory updates | Stock level alignment when the handler is complete |
Contact support@betterdata.co for timelines beyond the stub response or early integration.
Shopify / Square (catalog sync) — same class of events for catalog and levels when inbound routes are enabled.
Better Data will send outbound notifications when key domain events occur.
Planned event coverage
| Category | Events |
| --- | --- |
| Loop transitions | Any loop state change (procurement, orders, returns, quality) |
| Import | import.completed, import.partial, import.failed |
| Allocation | order.allocation_failed, order.allocation_succeeded |
| Demand | demand_signal.spike_detected, demand_signal.stockout_risk |
| Billing | subscription.updated, loop_commitment.threshold_reached |
Configuration (expected): webhook endpoints at apps.betterdata.co/settings/webhooks with HMAC verification, retries with backoff, and per-event delivery logs. Outbound webhooks are in active development — contact support@betterdata.co for early access.
Commerce Gateway merchants may configure a webhookUrl for federation events; delivery is not fully implemented yet.
Inbound webhooks are verified before processing.
stripe-signature HMAC verification with your signing secretx-betterdata-signature header (or equivalent) as implementations shipNever expose webhook secrets in client-side code or public repositories.
