We’re experiencing critical billing errors because the Subscription API webhook fires two identical renewal events for the same contract within minutes of each other. This causes our billing system to generate duplicate invoices, creating significant reconciliation issues.
Here’s the duplicate payload we receive:
{
"eventId": "evt_12345",
"contractId": "CNT-2025-001",
"eventType": "subscription_renewed"
}
Both webhooks have the same eventId and contractId but arrive 3-5 minutes apart. The webhook idempotency design seems flawed - shouldn’t the eventId prevent duplicate processing? Our event payload design doesn’t include enough metadata to detect duplicates reliably, and the contract renewal workflow appears to be triggering the webhook multiple times. How do we ensure webhook idempotency for subscription events?