Browse the docs

Agent setup guide

Adyen Refund Request Triage

Refund requests checked against your policy with a drafted reply; after a person approves, Adyen refunds exactly the requested amount.

Available About 10 min to set up

What it does

Refund requests checked against your policy with a drafted reply; after a person approves, Adyen refunds exactly the requested amount.

  • Starts when your helpdesk or form posts a refund request.
  • AI compares it with your refund policy, recommends refund, decline or unclear, and drafts the reply; it never picks an amount.
  • A person approves every request in Reviews; money moves only when the approved decision is refund.
  • Code checks the decision, PSP reference, a whole-number amount, the customer email and the reply first.
  • Adyen refunds exactly the requested amount (request id as the idempotency reference); the customer gets the reply and you get the details.

What it needs

  • A paid plan (agents run live on paid plans).
  • An AI provider key (Settings → AI Providers).
  • Adyen: an API key, your merchant account and (for Live) your live endpoint prefix (an Adyen merchant account; live processing needs an approved Adyen contract).
  • Gmail, connected in Settings → Integrations, and a helpdesk or form that can post to a webhook.

What it doesn't do

  • It never refunds without a person's approval, and never a different amount than requested.
  • It doesn't look the payment up first: Adyen refuses a refund that's larger than what's left on the payment.
  • Declined requests get no automatic reply; answer them yourself.

Availability and plans

Available

Its workflow is built and tested, and every app it needs is live. You can get it and set it up now.

Included free on the Enterprise plan; on other paid plans it's a one-time purchase per workspace (the price is on the Agents page). The Agents page in the app always shows its current status.

Before you start

  • A paid plan: agents run live, and the Free plan only runs Dry Runs.
  • An AI provider key (OpenAI, Anthropic, Google and more) in Settings → AI Providers. AI usage is billed by your provider.
  • These apps, connected in Settings → Integrations: Adyen and Gmail.
  • A form, app or system that can send each new item to a webhook URL (the agent starts from a webhook).
  • About 10 minutes.

Set it up step by step

Get the agent first (buy it, or it's already yours when your plan includes it), then in Agents → My agents press “Set up this agent”. That creates the agent's workflow in your workspace (it counts towards your plan's workflow limit) and opens the canvas with a setup checklist above it. Each item links to the exact place to go and ticks itself off when it's done.

1. Connect your AI provider

The AI steps run on your own key (OpenAI, Anthropic, Google and more). Add one in Settings → AI Providers.

2. Connect Adyen

Connect Adyen with your API key, merchant account and live prefix (Settings → Integrations → Adyen).

3. Connect Gmail

Connect the Gmail account replies are sent from.

4. Paste your refund policy

Open “Check it against your policy” and replace the placeholder.

SettingWhat to enterIn step
Your refund policyReplace the placeholder with when you refund and when you don't, your tone and sign-off. It starts as “[YOUR REFUND POLICY: WHEN A REFUND IS GIVEN (E.G. WITHIN 30 DAYS, DAMAGED OR NOT DELIVERED), WHEN IT ISN'T, YOUR TONE AND SIGN-OFF FOR THE REPLY TO THE CUSTOMER]” until you replace it.“Check it against your policy”

5. Pick Adyen and Gmail, enter your email

Open “Refund in Adyen” and “Reply to the customer” and pick your accounts, then enter your email on “Tell your team”.

SettingWhat to enterIn step
Adyen accountYour Adyen connection (Live), with refunds allowed on the API credential. Pick your connected Adyen account.“Refund in Adyen”
Gmail accountThe Gmail account replies are sent from. Pick your connected Gmail account.“Reply to the customer”
Your email (refunds)Who hears about each refund (up to 5, comma-separated). Replace the example address. It starts as “you@your-business.example” until you replace it.“Tell your team”

6. Test it with Dry Run

Press Dry Run: the agent runs on sample data with no messages sent and nothing written to your apps.

7. Switch the trigger on

Open the trigger, copy the webhook URL and secret into your helpdesk or form and switch it on. Fields: request_id, psp_reference, amount_minor, currency, customer_email, customer_name, order_reference, reason.

How it works

The agent is a normal workflow with 11 steps (1 AI step, with a person approving in Reviews). You can open, edit and monitor it like any other workflow.

  • Refund request received — Starts when your form or app sends data to the agent's webhook URL. Your helpdesk, shop or a form posts the refund request here: request_id, psp_reference (of the payment), amount_minor (whole number in minor units), currency, customer_email, customer_name, order_reference and reason.
  • Check it against your policy — AI step (runs on your AI provider key). AI compares the request with your refund policy, recommends refund or decline with the reason, and drafts the reply to the customer. It never decides the amount.
  • Approve the refund — A person approves or rejects it in Reviews (the run waits). A person reads the request, the AI's recommendation and the reply in Reviews. Approving with json.decision = refund sends exactly the requested amount back; anything else refunds nothing.
  • Not approved — Kept in the run history. Branch: Rejected. Rejected: nothing was refunded or sent.
  • Check before refunding — Step. Branch: Approved. In code, after approval: the decision is refund, a PSP reference and a whole-number amount are present, the customer email is valid and the reply has no placeholders.
  • Refund it? — Decision: picks the branch to follow. Approved refunds that pass go to Adyen; the rest refund nothing.
  • No refund — Kept in the run history. Branch: No refund. Declined, unclear or failed a check: nothing was refunded. The reason is in the run history; reply to the customer yourself.
  • Refund in Adyen — Adyen: Refund a payment (sends money back). Branch: Passes. MONEY MOVES: asks Adyen to refund exactly the requested amount (copied by code) on the payment. The request id is the reference, so a retried run can't refund twice. Adyen confirms the result by webhook.
  • Reply to the customer — Gmail: Send an email. Sends the approved reply from your Gmail.
  • Tell your team — Sends an email from your workspace's sender. Emails you what was refunded, with Adyen's references.
  • Refund sent to Adyen — Kept in the run history. The run history keeps the request, the approval and Adyen's references.

Test it with Dry Run

Press Dry Run in the canvas. The agent runs on the sample data stored on its trigger (the “Sample data for Dry Run” box), so you can check every step's output before anything is live. Edit the sample to match the fields your own form or app sends.

Sample data fields

request_id, psp_reference, amount_minor, currency, customer_email, customer_name, order_reference, reason.

  • Nothing is sent or written: app actions, emails and Slack posts are simulated, and AI steps don't call your AI provider.
  • Approval steps use the Dry Run decision you pick in the step's settings (approved, rejected or timeout), so you can try each branch.

Go live

  • Open the trigger, copy the webhook URL and secret into your helpdesk or form and switch it on. Fields: request_id, psp_reference, amount_minor, currency, customer_email, customer_name, order_reference, reason.
  • The webhook is protected by a secret: send it in the header shown in the Activation panel (requests without it are refused with 403). Each request starts one run.
  • The setup checklist adds a “paid plan” item before activation: live runs need a paid plan (the Free plan only runs Dry Runs).
  • When every checklist item is done and the trigger is on, the checklist says “Live — this agent is running”. Follow its runs in the workflow's History tab and in Analytics → Agents.

Questions

Can the AI refund money?

No. The AI only recommends and drafts the reply. Money moves only after a person approves with the decision set to refund, and code has checked the request.

Which amount is refunded?

Exactly the amount_minor in the request (minor units: 2500 = €25.00), copied by code. For a different amount, reject it and refund by hand in the Customer Area.

Can a refund happen twice?

The request id is sent as the refund reference and idempotency key, so a retried run with the same request doesn't refund again.

Troubleshooting

  • “No AI provider connected” or a rejected key: connect or fix the key in Settings → AI Providers, then press Test there.
  • A checklist item stays unticked: the setting is still empty or still contains its placeholder text. Open the step from the checklist and fill it in.
  • An app step fails with “Needs reconnect”: the account's access was revoked or expired. Reconnect it in Settings → Integrations.
  • Nothing happens when your form sends data: check the webhook is switched on and the request carries the secret header (403 means it's missing or wrong).
  • A run shows as paused: it's waiting for someone in Reviews to approve or reject it.
  • A step failed: open the run in History and check that step in the Trace tab for the error and what it received.

Generated from the agent's own workflow, so it always matches what the agent does. Last updated .