Skip to content
Back to Prompts

Build a reconciliation ledger

A daily job that compares your database against BlindPay's payout, payin, and transfer statuses, catches drift, and alerts on stuck or mismatched money.

Payouts
Payins
Webhooks

Paste this prompt into your coding agent to build the safety net every money-moving integration needs: an independent daily reconciliation.

Prompt

text
You are building a reconciliation ledger for my BlindPay integration: a scheduled job that independently verifies my database agrees with BlindPay about every payment.

Before writing code, read these sources and follow them over any prior knowledge:
- https://blindpay.com/docs/llms.txt
- The OpenAPI spec: curl https://api.blindpay.com/doc (use it to find the list/get endpoints for payouts, payins, and transfers; do not guess paths)

Build:
1. A local ledger table if I do not have one: every BlindPay object I create (po_, pi_, tr_, qu_) stored with my own entity ID, amounts in minor units, status, and timestamps, written at creation time and updated only by verified webhooks.
2. The daily reconciliation job: page through BlindPay's records for the last N days via the list endpoints from the OpenAPI spec and diff against my ledger in both directions:
   - Objects BlindPay has that my ledger lacks (a create succeeded but my write failed).
   - Ledger rows BlindPay lacks or reports with a different status or amount (missed or unverified webhooks, manual dashboard actions).
   - Non-terminal statuses older than the rail's expected settlement window (stuck payments).
3. Output: a report per run (clean or discrepancies with IDs and both sides' values) plus an alert to my team channel when anything is found; never auto-correct money records, only flag them.
4. Idempotent healing helper: for the missed-webhook case, a command that re-fetches one object by ID and applies the true status through the same code path webhooks use, so fixes are audited.
5. Tests: seed a fake drift case of each type and assert the job catches all three.

Constraints: API keys server-side; the job must be rate-limit-polite (page, do not hammer) and safe to re-run; all comparisons in integer minor units.

Deliverables: ledger schema/migration if needed, the reconciliation job with report and alerting, the healing command, and the drift tests.

How to use

  1. Paste the prompt with your database schema and scheduler (cron, queue, or workflow engine).
  2. Run it against your development instance history first; it should come back clean.
  3. Treat any production discrepancy as an incident to root-cause, not just heal.

One API.
Multiple payment rails.

Blind Pay, Inc. (“BlindPay”) is a United States-based financial technology and payments infrastructure company, incorporated in the State of Delaware on May 2, 2024. BlindPay is duly registered as a Money Services Business (“MSB”) with the Financial Crimes Enforcement Network (“FinCEN”) under registration number 31000277566153. BlindPay is not a state-licensed money transmitter and does not, in its own capacity, engage in regulated money transmission services. All such regulated activities are conducted exclusively through, and under the licenses of, duly authorized financial institution partners. BlindPay's role is limited to providing financial technology, virtual account management, payment processing, and related payments infrastructure services that facilitate payment flows and account functionalities. These services are provided in coordination with its licensed partners and in compliance with applicable federal MSB requirements and relevant state regulatory frameworks.

Blind Pay, LLC (“BlindPay”) is a Delaware limited liability company formed on June 24, 2025. BlindPay is duly registered as a Money Services Business (“MSB”) with the Financial Crimes Enforcement Network (“FinCEN”) under registration number 31000318334247 and is listed in the Nationwide Multistate Licensing System (“NMLS”) under NMLS ID #2745309.

BLIND PAY SOCIEDADE PRESTADORA DE SERVIÇOS DE ATIVOS VIRTUAIS LTDA. (“BlindPay”) is a Virtual Asset Service Provider (“VASP”) operating in Brazil. The company is presently completing the regulatory adaptation process required of Virtual Asset Service Provider Companies (SPSAV) under Central Bank of Brazil Resolution No. 520/2025, and remains subject to the transitional regime set forth in Article 88 of that Resolution. Registered address: Avenida Princesa Isabel, nº 15, Sala 1405, Edifício Martinho de Freitas, Centro, Vitória/ES, 29010-361.

BlindPay is a stablecoin API that enables individuals and businesses to move money worldwide.