OctiAI

Categories

Zapier Blueprint Prompt — Stripe ⇄ Accounting Reconciliation

Please provide these required inputs so I can generate the full Zapier workflow blueprint: Stripe webhook URL (or Stripe account/webhook to attach), OAuth/client credentials for...

What You'll Get

How to Use

Do not paste secrets — use placeholders

Provide credential placeholders (e.g., STRIPE_WEBHOOK_URL=https://hooks.example/stripe-hook and ACCOUNTING_OAUTH_CLIENT_ID=<<redacted>>) rather than raw API keys. I will reference these placeholders in auth notes and in idempotency header examples so engineers can wire secrets from your vault.

Works Best With

Best used when converting verbal/written reconciliation requirements into implementation-ready Zapier/n8n/Make blueprints for Stripe → Accounting integrations

Prompt Template

# Automation & Workflow Blueprints (n8n/Zapier/Make) (use EXACT section order)

## Goal
- Automate subscription billing reconciliation between Stripe and an accounting system so that failed invoices, refunds, proration adjustments, and ledger mappings are detected and reconciled automatically; generate accounting journal entries, update invoice/credit statuses, create audit logs, and notify finance on exceptions.

## Inputs
- Trigger: Stripe webhook events (invoice.created, invoice.payment_failed, invoice.payment_succeeded, charge.refunded, invoice.finalized, invoice.updated).
- Apps/Integrations: Stripe (API key / webhook), {{accounting_system}}, Email/SMS/Slack notifier, Audit datastore (e.g., Google Sheet or DB), optional middleware (Zapier built-in Formatter, Webhooks by Zapier).
- Auth assumptions: API key for Stripe (read webhooks), OAuth/client credentials for {{accounting_system}} for create/update ledger entries, secure storage for secrets.
- Schemas/payloads: standard Stripe webhook payloads; accounting API payloads per {{accounting_system}} chart-of-accounts mapping provided in accounting_chart_map.
- Failure policy: retries with exponential backoff, escalate after {{reconciliation_window_days}} days of unresolved exceptions to finance inbox {{reconciliation_email}}.
- Idempotency key: use composite key built from Stripe object id + event id + {{dedupe_keys}}.
- Dedupe rule: dedupe on idempotency key; if a duplicate event is detected, verify stored audit record and skip or revalidate without creating duplicate ledger entries.
- If any critical field above is not present, the prompt below will ask a single clarifying question identifying exactly which field(s) are missing.

## Prompt
You are an expert Zapier automation architect. Produce a complete, implementation-ready Zapier workflow blueprint to reconcile Stripe subscription billing with {{accounting_system}} accounting records. Use the following constraints and required deliverables.

Constraints and required behaviour:
- Trigger source: Stripe webhooks for the event types listed in Inputs.
- Branching: separate flows for Failed Payments, Successful Payments, Refunds, Prorations/Prorated Credits, and Invoice Adjustments.
- Idempotency: every create/update to the accounting system must include an idempotency key constructed as: stripe_object_id + "|" + stripe_event_id + "|" + "{{dedupe_keys}}".
- Auditing: every processed event must produce an audit row in the Audit datastore with timestamp, idempotency_key, processing_status, error_message (if any), and payload snapshot.
- Error handling: implement retries (max 5 attempts, exponential backoff starting at 30s), timeout per external call 15s, and an escalation path to {{reconciliation_email}} when retries exhausted or when business-rule exceptions occur.
- Security: never store raw API keys in logs; redact keys in audit payload snapshots.

Produce only the workflow spec in the exact Output Format below. If any of the following are missing, ask one concise question: Stripe account/webhook URL, OAuth details for {{accounting_system}}, the accounting_chart_map, the value for {{reconciliation_window_days}}, and the notification destination {{reconciliation_email}}.

Requirements for the Zap blueprint output:
- Provide a high-level Overview describing purpose, scope, SLAs and success criteria.
- Produce an ordered Node list (Zap steps) with exact Zap names, app/action, input mappings, conditional filters/Paths, and transformation steps. For each step include:
  - Step name (exact label to use in Zapier)
  - App & Event (e.g., Stripe — Catch Hook, Formatter — Utilities, Webhooks by Zapier — Custom Request)
  - Authentication note (which account to attach)
  - Input field mappings and sample values (refer to field mapping tables)
  - Expected outputs for downstream steps
  - Retry/timeout settings per step
  - Error fallback step (e.g., write to Audit datastore then notify)
- Provide Field mapping table(s) showing source Stripe fields, transformation rule, target accounting fields, example value, and validation checks.
- Include Webhook schema for the Stripe events consumed (explicit required fields and sample JSON snippets for each event type: invoice.payment_failed, invoice.payment_succeeded, charge.refunded, invoice.finalized, invoice.updated).
- Include Accounting API payload examples (HTTP method, endpoint, headers including idempotency header, and JSON body) for: create_invoice, create_credit_note/refund, create_journal_entry, update_invoice_status.
- Provide Retries/timeouts + dedupe strategy in a dedicated section: exact backoff schedule, max attempts, how to detect duplicates, and how to reconcile partial failures (e.g., invoice created but journal failed).
- Provide Test payload(s): at least one complete webhook JSON for each main flow (failed payment, successful payment, refund, proration) and the expected accounting API request/response simulation.
- Provide branching logic with explicit Path conditions and the exact boolean expressions to use in Zapier Filters/Paths.
- Provide one-sentence developer notes where necessary to implement complex transformations (e.g., how to calculate proration amounts, map Stripe tax/discount lines to accounting lines).

Formatting and delivery:
- Use clear, structured tables for mapping and examples.
- Do not include code fences; present API payloads and JSON as plain indented blocks.
- Keep the output operator-ready: names, exact field keys, and values must be usable when building the Zap steps.

Produce the output now. If any required input is missing, ask only the single concise question naming which input is needed.

## Output Format
Output:
1) Overview
2) Node list (ordered)
3) Field mapping table(s)
4) Retries/timeouts + dedupe strategy
5) Test payload(s)

## Guardrails
- No “magic nodes”; every transformation must be explicit and mapped to a Zapier action or Formatter step.
- Enforce idempotency + dedupe on every external write using the specified composite idempotency key.
- All external API requests must include timeout and retry metadata.
- Redact secrets in all audit logs; store only safe identifiers.
- On partial success (e.g., accounting write fails after webhook processed), mark audit row as "partial_failure" and queue an automated reconciliation retry path that attempts to reapply missing ledger entries up to the max retries before escalation.

## Examples
Mini node list excerpt:
- Step 1 — Stripe Webhook Trigger: Stripe — Catch Hook (attach {{stripe_account_id}}) — events: invoice.payment_failed, invoice.payment_succeeded
- Step 2 — Filter Path A: Only continue if event.type == "invoice.payment_failed"
- Step 3 — Formatter: Build accounting payload (map invoice lines → chart accounts using accounting_chart_map)
- Step 4 — Accounting Create Journal Entry: Webhooks by Zapier — Custom Request (POST /api/journals) with idempotency key header and audit write on success/failure.

Variables

Usage Notes

Not for

Do not include

Zapier Blueprint Prompt — Stripe ⇄ Accounting Reconciliation

Convert a verbal or written requirements brief into a complete, node-by-node Zapier workflow blueprint for subscription billing reconciliation between Stripe and an accounting system (failed invoices, refunds, proration, ledger mapping).

Turn this into a working asset in minutes.

Import into Workspace to auto-fill variables, adapt output style, and iterate with OctiAI's prompt editor.

What you'll get

Output format

Markdown

Best used when

Avoid when

Sign in to save, like, or rate this prompt.

Made for

What to fill in

Use the guidance below to complete each placeholder with the right level of detail.

Accounting System

Provide the key details needed for this variable.

Reconciliation Window Days

Provide the key details needed for this variable.

Reconciliation Email

Provide the key details needed for this variable.

Dedupe Keys

Provide the key details needed for this variable.

Stripe Account Id

Provide the key details needed for this variable.

Rules

Canonical Examples

Input: Reconcile Stripe subscription billing to QuickBooks Online. Retry window 7 days, escalation to finance+recon@example.com, dedupe on customer_id, Stripe acct acct_ABC123.

Loading result...

Failed to load output.

Overview + ordered Zap steps (Catch Hook → Paths: Failed / Successful / Refund / Proration → Formatter mappings → Webhooks by Zapier requests to QBO) + field mapping tables + retry/dedupe schedule + test payloads.

Why it works: This blueprint translates webhook events into deterministic Zapier steps with explicit idempotency, audit writes, and per-event branching so engineers or low-code builders can implement a one-shot Zap that is reproducible, tested, and deployable without further design iterations.

Input: Reconcile Stripe subscription billing to Xero. Retry window 14 days, escalation to finance-recon@example.com, dedupe on subscription_id, Stripe acct acct_XYZ789.

Loading result...

Failed to load output.

Overview + ordered Zap steps (Catch Hook → Paths → Formatter mappings → Webhooks by Zapier to Xero) + field mapping tables + retries/dedupe + test payloads.

Why it works: This blueprint demonstrates the same deterministic conversion but targeted at Xero, showing how to structure Zapier steps, idempotency keys, audit writes, and exact branching/transformations so implementers can deploy a parallel system for another accounting target.

Works Best With

Best used when converting verbal/written reconciliation requirements into implementation-ready Zapier/n8n/Make blueprints for Stripe → Accounting integrations