Payclave developers
Reconciliation and receipts
Money fields, date windows, exports, checksums, and signed receipt snapshots.
Reconcile customer credit and merchant receipts
total is the commercial invoice total. customerAmountPaid and customerAmountRemaining describe cumulative customer credit. expectedMerchantSettlement and netAmount describe expected merchant receipts; merchantAmountSettled describes verified receipts. Keep platformFee and overpaymentAmount separate.
Group totals by settlement token and network. Do not add unrelated token amounts as though they were one currency. A confirmed payment may be a partial installment, so compare the invoice's cumulative verified credit against the stored order before fulfillment.
Choose the report's date basis
An invoice-created report answers when invoices were opened, while payment-confirmed reports answer when payments were verified. Use the date basis that matches your accounting question. from is inclusive and to is exclusive; adjacent reporting windows can share a boundary without counting it twice.
Read the schema definition for column meaning and supported filters. Summaries have bounded preview limits and reporting ranges. Follow each endpoint contract rather than treating a preview as a full unbounded export.
Create, wait for, and download an export
Create an export, persist its ID and statusUrl, then poll until ready. queued and running exports are not downloadable. Read failed, cancelled, or expired states before retrying. Download the returned archive before expiry and verify X-Payclave-Content-SHA256.
The download returns ZIP bytes, not a JSON envelope. Secret keys stay on your backend, which can authorize the request and stream the archive to a user. Read manifest.json and the schema version when importing CSV or JSON datasets.
Read signed payment receipts
Receipt access is gated and secret-key-only. An issued receipt is an immutable compact Ed25519 JWS snapshot; pending means no completed snapshot is available, and unavailable means issuance is disabled. Verify the signature using the documented key set and inspect the receipt's identity and monetary facts.
A historical receipt does not establish the invoice's current collectible remainder or authorize fulfillment. Continue using verified current records and signed payment events for those decisions. Restricted merchant MCP keys cannot read private receipt routes.