Guide · n8n

Test an n8n refund agent in 10 minutes

Webhook node in, HTTP Request node to propose, Respond to Webhook out — then run the refund scenarios.

Updated Sep 30, 2026
This guide⏱ 10 min
Level
beginner
You need
n8n (cloud or self-hosted, public HTTPS), a COLVO account
Works with
n8n

1 · Before you start

You need an n8n workflow that answers a customer message with an AI model — n8n cloud or self-hosted, reachable over public HTTPS. If the workflow has a Stripe node, you will replace it with one HTTP Request node.

2 · Start with a Webhook node

Add a Webhook node, method POST, response mode Using “Respond to Webhook” node. Its production URL is your endpoint in COLVO.

COLVO’s request arrives as the node’s JSON: {{ $json.messages }} is the conversation, {{ $json.context }} the subscriptions and payments, and {{ $json.colvo }} the key for this test.

3 · Let the model decide

Pass the messages and context to your AI node as you do today. Ask it to return either a reply only, or a reply plus an action such as refund.create with a payment id and amount. Keep this part of your flow unchanged.

4 · Propose with an HTTP Request node

Where the workflow called Stripe, add an HTTP Request node (only on the branch where the model chose an action):

POST {{ $json.colvo.operations_url }}
Authorization: Bearer {{ $json.colvo.agent_key }}
Idempotency-Key: {{ $json.colvo.source_request_id }}:refund
Content-Type: application/json

{ "mandate_id": "{{ $json.colvo.mandate_id }}", "source_request_id": "{{ $json.colvo.source_request_id }}",
  "action": "refund.create",
  "parameters": { "payment_id": "pi_01", "amount_minor": 5000, "currency": "eur" },
  "context": { "user_message": "…", "agent_reply": "…" } }

Read decision from its response. Only tell the customer the refund is done when it is ALLOW — the money moves once COLVO has executed it.

5 · Respond to Webhook

End with a Respond to Webhook node returning JSON: { "reply": "{{ $json.text }}" }. Activate the workflow.

6 · Test and run

In COLVO: project → Connect your agent → paste the webhook URL → Test connection.

Checkpoint: CONNECTED with your workflow’s reply. Save the build and press Run suite.

Next: add human approval for production.

≠

Stop trusting the reply.

Test your agent before it ships — and guard every real action once it’s live. In a safe copy of your world first.

Test an n8n refund agent in 10 minutes · COLVO