Subscription management API callbacks not triggered on renewal events for external billing integration

Our external billing system relies on webhook callbacks from SAP S/4HANA subscription management API to trigger invoice generation. Renewal events are processed successfully in SAP (subscription status updates, contract extensions work fine), but our registered webhook endpoint never receives the callback notifications.

We’ve verified our endpoint is accessible and responds correctly to test posts. Event subscription appears configured correctly in the API setup, and we’re getting callbacks for new subscription creation events without issues. Here’s our webhook registration:

POST /sap/opu/odata/sap/API_SUBSCRIPTION_MGMT/WebhookSubscriptions
{
  "eventType": "subscription.renewed",
  "callbackUrl": "https://billing.ourcompany.com/sap/webhook",
  "active": true
}

Only renewal events are missing. This causes invoice delays since our downstream system never gets notified. Anyone experienced webhook callback issues specifically with renewal events on 1909?

I’ve resolved this exact issue multiple times on SAP 1909. The problem involves three interconnected configuration areas:

1. Event Subscription Setup: The correct event type for renewals in 1909 is "subscription.renewal.completed" not "subscription.renewed". Additionally, you need to subscribe to "subscription.renewal.failed" separately if you want failure notifications. Re-register your webhook with the correct event types:

POST /sap/opu/odata/sap/API_SUBSCRIPTION_MGMT/WebhookSubscriptions
{
  "eventType": "subscription.renewal.completed",
  "callbackUrl": "https://billing.ourcompany.com/sap/webhook",
  "active": true,
  "retryPolicy": {"maxAttempts": 3, "backoffSeconds": 60}
}

2. Webhook Endpoint Registration: Your endpoint must handle SAP’s verification challenge during registration. When you POST the webhook subscription, SAP immediately sends a verification request with a challenge token. Your endpoint must echo back the challenge within 10 seconds or the subscription is created but marked inactive. Implement this verification handler:

@app.post("/sap/webhook")
def handle_webhook(request):
    if 'X-SAP-Signature-Challenge' in request.headers:
        challenge = request.headers['X-SAP-Signature-Challenge']
        return {"challenge": challenge}  # Echo back for verification
    # Process actual webhook event
    process_renewal_event(request.json)
    return {"status": "received"}

3. API Event Mapping: This is the most commonly missed configuration. SAP 1909 requires explicit event routing in SPRO. Navigate to: IMG → Financial Accounting (New) → Contract Accounts Receivable and Payable → Business Add-Ins → Subscription Management → Define Event Notification Channels.

Create or modify the webhook channel entry:

  • Channel ID: WEBHOOK_EXT
  • Event Types: Select “Renewal Completed”, “Renewal Failed”
  • Active: Checked
  • Priority: 1 (ensures webhook fires before internal processing)

Then in transaction SSCR (Subscription Configuration), link your subscription types to this webhook channel. The default configuration only enables webhooks for creation events, not renewal events.

Verification Steps:

  1. Query webhook status: `GET /sap/opu/odata/sap/API_SUBSCRIPTION_MGMT/WebhookSubscriptions?$filter=eventType eq ‘subscription.renewal.completed’
  2. Check “active” field is true and “failureCount” is 0
  3. Test with manual renewal in transaction FP_SUBS and monitor SM58 (transactional RFC) for outbound webhook calls
  4. Enable webhook trace in transaction SWEBHOOK_TRACE to see detailed delivery attempts

Common Pitfall: If you had previous failed delivery attempts, SAP may have blacklisted your endpoint temporarily. Check table SWEBHOOK_BLACKLIST and remove any entries for your callback URL. After fixing configuration, wait 30 minutes or restart the ICM process for changes to take effect.

Implement all three areas - event subscription with correct naming, proper endpoint verification handling, and SPRO event mapping configuration. The issue is almost always missing event mapping in SPRO, which is separate from webhook API registration.

Check your event type string - SAP 1909 uses “subscription.renewal.completed” not “subscription.renewed”. The event naming changed between versions. Also verify the webhook subscription ID is still active. Sometimes subscriptions get deactivated after repeated delivery failures even if your endpoint is now working.

Good catch on the event naming - I’ll verify the exact string we’re using. We did have some initial connection issues during testing that might have caused the subscription to be deactivated. How do I check if the webhook subscription is still active after registration? Is there a query endpoint or do I need to re-register?

Query your webhook subscriptions with GET request to /sap/opu/odata/sap/API_SUBSCRIPTION_MGMT/WebhookSubscriptions. Look for “active”: false or “status”: “suspended”. Also check the “failureCount” field - if it’s above 5, SAP automatically suspends the subscription. You’ll need to DELETE the old subscription and re-register with correct event type. Make sure your endpoint returns HTTP 200 within 10 seconds or SAP marks it as failed.