CUSTOMER SUPPORT

Refund Fraud Guard Against Internal Postgres Ledger

Cross-references each refund request against a Postgres ledger of prior refunds and Stripe charge data to flag serial refunders and duplicate claims before an agent issues money.

CategoryCustomer Support
Enginesim
Difficultyadvanced
Triggerwebhook
Steps5
Setup~25 min

How it runs

The automated pipeline, trigger to output.

  • TriggerRefund request webhook receivedHTTP webhook
  • ActionFetch charge and refund state from StripeStripeStripe
  • ActionQuery refund ledger for history and duplicatesPostgreSQLPostgres
  • LogicApply serial-refunder and duplicate thresholds
  • OutputWrite verdict and log request to ledgerPostgreSQLPostgres

What it does

This agent protects against refund abuse. For each request it pulls the Stripe charge and queries your internal Postgres ledger for the customer's lifetime refund count, total refunded amount, and any open duplicate claim on the same order. If the customer trips an abuse threshold or the order was already refunded, it blocks with reasoning; otherwise it clears the request and records it in the ledger.

When to use it

Use it when a small set of customers drive a large share of refunds, or when duplicate refund claims slip through across channels. It gives agents an abuse signal grounded in your own history, not just Stripe's single-charge view.

How it works

  1. 1A refund request webhook starts the flow.
  2. 2The agent fetches the charge and refund state from Stripe.
  3. 3It queries the Postgres refund ledger for the customer's history and duplicate claims.
  4. 4Abuse logic compares counts and totals against your thresholds.
  5. 5The verdict is written back and the request is logged to the Postgres ledger.

Set it up

What you configure once, before turning it on.

  1. 1
    Connect HTTP webhookTrigger any URL on agent actions.
  2. 2
    Connect StripeCustomers, subscriptions, payments.
  3. 3
    Connect PostgresAny Postgres URL — query, write, migrate.
  4. 4
    Set each agent's modelWe leave models unset so you pick the tier — fast + cheap, or top-quality.
  5. 5
    Tune it to your dataEdit the prompts, filters, and field mappings so it matches how your team works.
  6. 6
    Test, then turn it onRun once against a sample, confirm the output, then enable the trigger.

Run this workflow in your colony.

14-day trial. No DevOps. No Sales call. Provisioned in under a minute.