Windback.
Integrations

Custom Webhook

Send churn events from any payment provider via custom webhooks.

Custom Webhook

If your payment provider isn't directly supported, use the custom webhook endpoint.

Endpoint

POST https://api.windback.dev/api/v1/webhooks/custom/{your_public_key}

Payload Format

{
  "customer_email": "user@example.com",
  "customer_name": "John Doe",
  "provider_subscription_id": "sub_123",
  "provider_customer_id": "cus_456",
  "plan_name": "Pro Monthly",
  "mrr_cents": 4900,
  "currency": "usd",
  "tenure_days": 180,
  "cancel_reason": "too_expensive"
}

Cancel Reasons

Use these standardized cancel reason values for the best AI recovery strategy matching:

ValueAI Strategy
too_expensiveDiscount offer
missing_featuresUnused feature highlight
not_using_enoughValue recap
switching_competitorSocial proof
technical_issuesPain point fix
poor_supportFounder email
dont_need_anymorePause option
otherFeedback request

If no cancel reason is provided or the value doesn't match, the AI defaults to the feedback_request strategy.

Webhook Resilience

Like Stripe and Razorpay webhooks, custom webhooks always return 200 OK — even on errors. This prevents your system from retrying unnecessarily.

ScenarioResponse
Valid event200 OK — event created
Invalid/missing API key200 OK — silently ignored
Subscription expired200 OK — silently skipped
Processing error200 OK — logged, skipped

Example

curl -X POST \
  -H "Content-Type: application/json" \
  -d '{
    "customer_email": "john@example.com",
    "customer_name": "John Doe",
    "provider_subscription_id": "sub_abc123",
    "provider_customer_id": "cus_xyz789",
    "plan_name": "Pro",
    "mrr_cents": 4900,
    "currency": "usd",
    "tenure_days": 90,
    "cancel_reason": "too_expensive"
  }' \
  https://api.windback.dev/api/v1/webhooks/custom/pub_your_key