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:
- Query webhook status: `GET /sap/opu/odata/sap/API_SUBSCRIPTION_MGMT/WebhookSubscriptions?$filter=eventType eq ‘subscription.renewal.completed’
- Check “active” field is true and “failureCount” is 0
- Test with manual renewal in transaction FP_SUBS and monitor SM58 (transactional RFC) for outbound webhook calls
- 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.