{ "name": "Chargeback Dispute Decision with Verifiable Decision Receipts", "nodes": [ { "parameters": { "httpMethod": "POST", "path": "chargeback-dispute", "options": {}, "responseMode": "responseNode" }, "id": "5fb1243e-1f4a-47a4-a322-78294245c9f0", "name": "Chargeback Dispute Decision", "type": "n8n-nodes-base.webhook", "typeVersion": 2.1, "position": [ 0, 300 ], "webhookId": "edaf4b2b-eabc-4413-bca0-90fa5d263ef9" }, { "parameters": { "modelId": { "__rl": true, "mode": "list", "value": "gpt-4o", "cachedResultName": "GPT-4O" }, "messages": { "values": [ { "role": "system", "content": "=You are a chargeback dispute AI. Return JSON: {\"decision\":\"FIGHT|ACCEPT\",\"evidence\":\"...\",\"reason\":\"...\"}." }, { "content": "=Return JSON only.\n\nInput:\n{{ JSON.stringify($json.body) }}" } ] }, "jsonOutput": true, "options": {} }, "id": "a63b4979-d45f-4286-af88-02c90f2e477a", "name": "AI Decision", "type": "@n8n/n8n-nodes-langchain.openAi", "typeVersion": 2.1, "position": [ 220, 300 ], "credentials": { "openAiApi": { "id": "REPLACE_OPENAI_CRED_ID", "name": "OpenAi account" } } }, { "parameters": { "operation": "generateReceipt", "agentName": "ChargebackAgent", "workflowName": "={{ $workflow.name }}", "action": "={{ 'AI decision: ' + ($json.message.content.decision || $json.message.content.recommendation || 'completed') }}", "decision": "={{ JSON.stringify($json.message.content) }}", "additionalFields": { "modelProvider": "openai", "modelUsed": "gpt-4o", "decisionType": "chargeback_decision", "riskLevel": "high", "humanReview": false, "policies": "dispute-policy-v1", "permissions": "dispute.decide", "tags": "payments, chargeback, finance" } }, "id": "c19ca647-3b65-47b3-80d2-daf870e3eee9", "name": "Signatrust: Receipt", "type": "n8n-nodes-signatrust.signatrust", "typeVersion": 1, "position": [ 440, 300 ], "credentials": { "signatrustApi": { "id": "REPLACE_SIGNATRUST_CRED_ID", "name": "Signatrust API account" } } }, { "parameters": { "respondWith": "json", "responseBody": "={{ { status:\"OK\", receipt_id:$json.id, decision:$('AI Decision').item.json.message.content } }}", "options": {} }, "id": "1125f794-6b71-4360-983b-d0c3cd9a4ce3", "name": "Respond", "type": "n8n-nodes-base.respondToWebhook", "typeVersion": 1.1, "position": [ 660, 300 ] }, { "parameters": { "content": "## Chargeback Dispute Decision with Verifiable Decision Receipts\n**Why Signatrust?** Every AI decision here becomes a tamper-evident, Ed25519-signed receipt — verifiable for audits and disputes.", "height": 170, "width": 420, "color": 5 }, "id": "6d3dc873-62d1-4c20-9b5e-f1b4636ecf36", "name": "Sticky Note 83f4b2", "type": "n8n-nodes-base.stickyNote", "typeVersion": 1, "position": [ -40, 40 ] } ], "connections": { "Chargeback Dispute Decision": { "main": [ [ { "node": "AI Decision", "type": "main", "index": 0 } ] ] }, "AI Decision": { "main": [ [ { "node": "Signatrust: Receipt", "type": "main", "index": 0 } ] ] }, "Signatrust: Receipt": { "main": [ [ { "node": "Respond", "type": "main", "index": 0 } ] ] } }, "active": false, "pinData": {}, "settings": { "executionOrder": "v1" }, "tags": [ { "name": "Chargeback Dispute Decision — payments" }, { "name": "Chargeback Dispute Decision — chargeback" }, { "name": "Chargeback Dispute Decision — finance" }, { "name": "Signatrust (10)" } ], "meta": { "templateCredsSetupCompleted": false }, "versionId": "59efaa49-2b75-4461-b771-3a597302af23" }