See llms.txt for all machine-readable content.

Back to Templates

Sync Stripe refunds to Xero and send dispute alerts with Slack

Quick overview

This workflow listens for Stripe refund and dispute events, posts succeeded refunds to Xero as manual journals using a country-based mapping table, and sends Slack alerts for duplicates, disputes, and refund-sync failures.

How it works

  1. Triggers when Stripe sends a charge.refunded event and extracts the refund details from the webhook payload.
  2. Stops processing unless the refund status is succeeded, then fetches the related Stripe charge and invoice.
  3. Looks up the customer’s invoice country in an n8n Data Table and maps it to the correct Xero tenant ID plus clearing and revenue account codes.
  4. Retrieves recent Xero manual journals and checks whether a journal narration already contains the Stripe refund ID.
  5. If a duplicate is detected, posts a Slack message and skips posting anything to Xero.
  6. If no duplicate is found, creates and posts a POSTED Xero manual journal that debits the revenue account and credits the clearing account for the refund amount.
  7. Separately, triggers on Stripe charge.dispute.created, fetches the disputed charge details, and posts a Slack alert containing the dispute amount, customer, reason, evidence deadline, and Stripe dashboard link.
  8. If any step in the refund sync path fails, posts the failing step and error details to Slack via an error workflow trigger.

Setup

  1. Create and connect credentials for Stripe (API key), Xero (OAuth2 connection to your organisation), and Slack (access to your target channel).
  2. Replace REPLACE_WITH_YOUR_N8N_DATA_TABLE_ID with your n8n Data Table ID and populate the table with columns country, xero_tenant_id, revenue_account, and clearing_account (one row per country code you sell to).
  3. Update the Slack channel in the Slack steps (for duplicate refund alerts, dispute alerts, and failure alerts) to the channel you want to notify.

Additional info

Connect with us:
Website: https://www.intuz.com/n8n-workflow-automation-templates/
Email: [email protected]
LinkedIn: https://www.linkedin.com/company/intuz

For Custom Workflow Automation

Get Started: https://n8n.partnerlinks.io/intuz