Group
  • Payments

    Reconcile my books against the payment provider

    Adds a regular check that every provider charge, refund, and payout matches your local records.

    • Automate workflows
    • Plan & validate
    • Advanced
    • General

Free Prompt

Build a payment reconciliation job for my app: a regular check that my local records and the payment provider's records agree. Implement: a scheduled job (daily or weekly) that pulls recent charges, refunds, and subscription invoices from the provider's API and compares them against my local order and payment records; flags every mismatch in both directions (a charge at the provider with no local order, meaning fulfillment or access was never granted; a local order marked paid with no provider charge, meaning my state is lying); checks amounts and currencies match, not just existence; and reports discrepancies in a digest I actually read, with record IDs on both sides so investigation starts from the report. Keep it read-only; reconciliation reports, humans fix. Don't auto-repair mismatches by mutating local records to match the provider; the mismatch is a symptom of a bug (missed webhook, double charge, failed fulfillment) and silently patching it hides the bug. Don't alert on expected timing gaps (a charge seconds old that the webhook hasn't delivered yet); use a small lag window. Deliver: the reconciliation job with its schedule, the mismatch report format, and verification: deliberately create a mismatch in test mode (a provider-side charge with no local record) and confirm the next run reports it.

What This Does / How This Helps

Adds the bookkeeping loop that catches when your records and the payment provider's records disagree, in either direction, before a customer or an accountant finds it. Every payment integration drifts eventually: a missed webhook leaves a paying customer without access, a double charge sits unnoticed until the statement arrives, a refund issued in the dashboard never reached your books. Small mismatches are normal at scale; invisible mismatches are the problem. The read-only rule is deliberate: the report surfaces the bug, a human decides the fix, and the bug itself stays visible instead of getting swept under an auto-patch.

Want to skip doing this by hand?

Fortivibe audits your app for all of the areas these prompts cover (and more).

See What We Check

Related Prompts