See llms.txt for all machine-readable content.

Back to Templates

Detect payment fraud and deduplicate webhooks with DevDeskApp, PostgreSQL, and Slack

Quick overview

This workflow receives payment webhooks (or a test payload), creates an idempotency hash and audit UUID with DevDeskApp, then routes verified orders into PostgreSQL and notifies Slack, while flagging suspicious orders to a fraud-alert Slack channel.

How it works

  1. Receives a payment event via an HTTP webhook (or runs with a built-in sample payload when testing manually).
  2. Uses DevDeskApp to compute a SHA-256 idempotency fingerprint from the transaction, order, and amount, generates an audit UUID, and normalizes customer/name and address text.
  3. Checks whether the order passes the configured risk gate (based on the disposable-email flag).
  4. For passing orders, formats a verified order record with the idempotency hash and audit UUID and inserts it into PostgreSQL using an upsert-style insert that ignores duplicates.
  5. Posts a verified-order notification to a Slack channel for the fulfillment team.
  6. For failing orders, formats a quarantine message and posts it to a separate Slack channel for fraud/security review.

Setup

  1. Create and connect DevDeskApp credentials so the workflow can generate hashes, UUIDs, and text transformations.
  2. Add PostgreSQL credentials and ensure an orders table exists with a unique constraint on idempotency_hash to support the ON CONFLICT ... DO NOTHING deduplication.
  3. Add Slack credentials and set the target channels (for example #ecommerce-orders and #fraud-alerts) to match your workspace.
  4. If using live events, copy the production webhook URL from the webhook trigger and configure it in your payment provider to POST to /payment-fraud-guard.