Process Adyen refunds from approved Zendesk tickets

By General Input

When a support ticket is marked refund-approved, submit the Adyen refund, reply to the customer, and post a summary to finance in Slack.

Integrations

  • Zendesk
  • Adyen
  • Slack

Type

Agentic Task

Categories

  • Customer Support
  • Finance

Build an agent workflow that processes approved Adyen refunds surfaced through Zendesk support tickets. Trigger: a Zendesk webhook that fires whenever a ticket is updated. The agent should only act when the updated ticket carries the approval signal, either a refund-approved tag or a status of Refund Approved. Any other ticket update is a no-op.

On a qualifying update, the agent uses Zendesk Show Ticket and Zendesk List Ticket Comments to load the full ticket and its conversation. From that content it extracts four fields: the Adyen pspReference for the original captured payment, the refund amount, the currency, and a short refund reason. Sensible defaults apply: if no amount is specified, treat it as a full refund of the original captured amount referenced on the ticket; if no reason is specified, use a short default such as "Customer request approved by support".

Guardrails before calling Adyen. If the pspReference is missing or the agent is not confident which captured payment to refund, the agent must refuse to act. In that case it posts an internal note on the ticket asking the support agent to add the pspReference and stops. If the extracted amount is above a configurable threshold (expose this as a workflow input, for example a maxAutoRefundAmount and its currency), the agent must also refuse to auto-refund and instead post an internal note flagging the ticket for a human approver.

When the guardrails pass, the agent calls Adyen Refund a Captured Payment against the pspReference with the extracted amount and currency. Derive a stable idempotency key from the ticket ID (for example zd-refund-<ticket_id>) and pass it as the Idempotency-Key input so re-firing the same approval never creates a duplicate refund. Use the same value for Adyen's reference field so the refund is easy to reconcile later.

Adyen refunds are asynchronous. The HTTP response returns received with a refund pspReference, but the final outcome arrives later via Adyen's REFUND webhook. Treat the initial response as pending and make that clear in every downstream message. Do not tell the customer the refund is complete.

After Adyen accepts the request, the agent uses Zendesk Update Ticket to add a public reply to the customer. The reply should confirm that the refund has been submitted to Adyen, state the amount and currency, and explain that the funds should appear in the original payment method within a few business days pending final confirmation from the payment provider. Do not include the raw pspReference in the public reply; keep that for internal notes.

Then the agent uses Slack Send a Message to post a summary to a configurable finance channel (default #finance). The Slack message should include the Zendesk ticket link, the customer name or email, the amount, currency, refund reason, the original pspReference, and the new refund pspReference from Adyen, along with a note that the final outcome will arrive via the Adyen REFUND webhook.

Expose these workflow inputs: Zendesk approval signal (tag name or status value), maxAutoRefundAmount plus its currency, the finance Slack channel, and the default refund reason. Log the refund pspReference on the ticket as an internal note so finance can match it to the eventual Adyen webhook during reconciliation.

Related prompts

Explore more prompts
Call overdue Xero customers with an AI collections agentWin back LiveChat visitors whose chats went unansweredChat quality review board for LiveChat support leadsPause marketing emails to escalated customers, then restore themWin back no-show and cancelled appointments every morningLive Loop returns analytics with product-level drill-downNewsletter pre-flight and approval board for Mailjet sendsTurn a prospect spreadsheet into personalized sequence enrollmentsLook up any customer's email delivery history in one placeMailjet email delivery lookup console for support teams