{"product_id":"simulate-payment-webhook-for-opentelemetry-traces-in-jaeger","title":"Simulate Payment Webhook for OpenTelemetry Traces in Jaeger","description":"\u003ch3\u003eSimulate payment webhook events and trace them end-to-end in Jaeger with OpenTelemetry spans\u003c\/h3\u003e\n\u003cp\u003eThis n8n automation workflow simulates a card charge via a webhook, then sends the run’s OpenTelemetry traces to a local \u003cstrong\u003eJaeger\u003c\/strong\u003e collector—so you can compare a successful charge against a deliberate failure. Built for Exercise 3 in the \u003cem\u003en8n Production AI Playbook on Audit \u0026amp; Trace\u003c\/em\u003e, it requires \u003cstrong\u003eno LLM credentials\u003c\/strong\u003e.\u003c\/p\u003e\n\n\u003ch3\u003eWhat this workflow does\u003c\/h3\u003e\n\u003cul\u003e\n  \u003cli\u003e\n\u003cstrong\u003eReceives webhook input\u003c\/strong\u003e: Accepts a \u003ccode\u003ePOST\u003c\/code\u003e request containing \u003ccode\u003erequestId\u003c\/code\u003e and \u003ccode\u003eamount\u003c\/code\u003e.\u003c\/li\u003e\n  \u003cli\u003e\n\u003cstrong\u003eValidates the Amount\u003c\/strong\u003e: An \u003cem\u003eIf\u003c\/em\u003e node checks for invalid amounts; invalid requests are routed to \u003cem\u003eReject Request\u003c\/em\u003e using a \u003cem\u003eStop and Error\u003c\/em\u003e path.\u003c\/li\u003e\n  \u003cli\u003e\n\u003cstrong\u003eNormalizes input\u003c\/strong\u003e: An \u003cem\u003eEdit Fields\u003c\/em\u003e step converts the amount (e.g., 49.99) into \u003cstrong\u003ecents\u003c\/strong\u003e for consistent “payment-like” processing.\u003c\/li\u003e\n  \u003cli\u003e\n\u003cstrong\u003eSimulates Charge vs Decline\u003c\/strong\u003e: Another \u003cem\u003eIf\u003c\/em\u003e node routes requests with \u003ccode\u003etrigger_failure\u003c\/code\u003e to a \u003cem\u003eDecline Charge\u003c\/em\u003e branch, which stops with an error \u003cstrong\u003ecard_declined\u003c\/strong\u003e.\u003c\/li\u003e\n  \u003cli\u003e\n\u003cstrong\u003eCaptures success and responds\u003c\/strong\u003e: A capture step records the successful charge, and a \u003cstrong\u003eRespond to Webhook\u003c\/strong\u003e returns it.\u003c\/li\u003e\n\u003c\/ul\u003e\n\n\u003ch3\u003eUse cases\u003c\/h3\u003e\n\u003cul\u003e\n  \u003cli\u003eVerify \u003cstrong\u003eOpenTelemetry trace visibility\u003c\/strong\u003e for webhook-driven automations in Jaeger.\u003c\/li\u003e\n  \u003cli\u003eTest auditability by comparing a “success” run with a controlled failure (\u003ccode\u003etrigger_failure\u003c\/code\u003e).\u003c\/li\u003e\n  \u003cli\u003eValidate SaaS payment-like flows without calling real payment providers.\u003c\/li\u003e\n\u003c\/ul\u003e\n\n\u003ch3\u003eTechnical details\u003c\/h3\u003e\n\u003cul\u003e\n  \u003cli\u003e\n\u003cstrong\u003eIntegrations\u003c\/strong\u003e: OpenTelemetry tracing to \u003cstrong\u003eJaeger\u003c\/strong\u003e (via OTLP endpoint, e.g., Jaeger port \u003cstrong\u003e4318\u003c\/strong\u003e).\u003c\/li\u003e\n  \u003cli\u003e\n\u003cstrong\u003eNodes used\u003c\/strong\u003e: \u003ccode\u003eWebhook\u003c\/code\u003e, \u003ccode\u003eIf\u003c\/code\u003e, \u003ccode\u003eEdit Fields\u003c\/code\u003e, \u003ccode\u003eStop and Error\u003c\/code\u003e, \u003ccode\u003eRespond to Webhook\u003c\/code\u003e, plus supporting notes like \u003ccode\u003eSticky Note\u003c\/code\u003e.\u003c\/li\u003e\n\u003c\/ul\u003e\n\n\u003ch3\u003eQuick setup (Jaeger + n8n)\u003c\/h3\u003e\n\u003cul\u003e\n  \u003cli\u003eRun Jaeger locally (Docker image \u003ccode\u003ejaegertracing\/jaeger:2.20.0\u003c\/code\u003e) and expose \u003cstrong\u003e4318\u003c\/strong\u003e.\u003c\/li\u003e\n  \u003cli\u003eIn n8n: Settings \u0026gt; OpenTelemetry: set the OTLP endpoint, sample rate to \u003cstrong\u003e1\u003c\/strong\u003e, turn off “Track published workflows only”, and enable tracing.\u003c\/li\u003e\n  \u003cli\u003eExecute with: \u003ccode\u003e{\"requestId\":\"REQ-3001\",\"amount\":49.99}\u003c\/code\u003e and \u003ccode\u003e{\"requestId\":\"REQ-3002\",\"amount\":49.99,\"trigger_failure\":true}\u003c\/code\u003e. Inspect spans in Jaeger by searching \u003cstrong\u003en8n.execution.id\u003c\/strong\u003e.\u003c\/li\u003e\n\u003c\/ul\u003e","brand":"N8N Commerce","offers":[{"title":"Default Title","offer_id":46157934821555,"sku":"N8N-20345","price":6.99,"currency_code":"GBP","in_stock":true}],"thumbnail_url":"\/\/cdn.shopify.com\/s\/files\/1\/0749\/6279\/6723\/files\/1Y1WQjbApigP9kYDwCVgb_QluNo7xE.png?v=1791018885","url":"https:\/\/buyflowscripts.com\/products\/simulate-payment-webhook-for-opentelemetry-traces-in-jaeger","provider":"N8N Commerce","version":"1.0","type":"link"}