Reconciliation
Reconciliation is how you prove that customer payments, PayChain invoice records, withdrawals, and treasury balances agree.Source of truth: Invoice state is the source of truth for customer payment fulfillment. Balances and transactions support treasury and accounting reconciliation.
What to reconcile
Recommended reconciliation keys
Store these together:- PayChain business ID.
- PayChain customer ID.
- PayChain invoice ID.
- Your order ID or customer reference.
- Token, chain, and network.
- Expected amount.
- Settled amount.
- Transaction hash when available.
- Webhook event ID.
- Withdrawal ID for payout movement.
Daily reconciliation flow
- List paid and overpaid invoices for the period.
- Match each invoice to your order or customer ledger.
- Compare settled amounts and expected amounts.
- List withdrawals for the same period.
- Match withdrawal IDs to payout routes, dynamic recipients, or manual payouts.
- Compare balances by token and network.
- Investigate unmatched transactions, underpayments, overpayments, and failed withdrawals.
Worked examples
Fixed invoice reconciliation
Your order system expectsorder_123 to be paid for 100 USDC on base-mainnet.
- Store
order_123in invoice metadata when creating the invoice. - Receive
invoice.paid. - Verify the webhook signature.
- Fetch the invoice by ID.
- Confirm:
statusispaidoroverpaid.token,chain, andnetworkIdmatch the order.- settled amount is enough for your policy.
- metadata contains
order_123.
- Mark the order paid once.
Payout route reconciliation
A marketplace invoice is split 80% to seller and 20% to platform fee.- Reconcile the invoice first.
- Fetch the invoice payout routing summary.
- Confirm all route legs were created.
- Match each leg to its withdrawal ID.
- Confirm each withdrawal reaches
completed. - Record the seller payout transaction hash and the platform-fee payout transaction hash.
Dynamic recipient reconciliation
An off-ramp order sends funds to a receiver that changes per order.- Store your off-ramp order ID in invoice metadata.
- Store the receiver address and percentage split in your own order system.
- After invoice settlement, fetch routing or withdrawal records.
- Confirm the destination address matches your approved receiver.
- Confirm the withdrawal status before notifying the receiver or completing the fiat leg.
Direct treasury deposit reconciliation
Direct treasury deposits can increase business balances and treasury analytics, but they do not prove that a customer invoice was paid. Use direct treasury deposit data for:- Treasury availability.
- Portfolio balance.
- Operational funding.
- Finance-side reconciliation.
- Order fulfillment.
- Customer crediting.
- Invoice status overrides.
- Payout route triggering.
Handling edge cases
REST examples
Fetch invoice after webhook
List transactions for a period
List balances
List withdrawals
Accounting notes
- Net settled revenue should use the merchant net amount after PayChain fees where available.
- Platform fees and network/gas behavior should be tracked separately from customer gross payment amount.
- Direct treasury deposits can be useful for treasury analytics, but explicit invoice state should remain fulfillment truth.