Reconcile Payment
payment_reconcileMatch an incoming payment to an open invoice using payer email and amount. On match, mark invoice paid and update payment history.
Instructions
Match an incoming external payment (e.g. Stripe webhook, PayPal IPN, bank transfer) to an open invoice. Matching rule: the payer_email must equal the invoice client_email (case-insensitive) AND the payment_amount must equal the invoice amount_due within one cent. On match the invoice is marked paid, amount_paid/amount_due are updated, and client payment_history is recomputed exactly like invoice_mark_paid. Returns a reconciliation message on match or a "no match" message otherwise (no error). If multiple invoices match, the first one is reconciled.
Input Schema
| Name | Required | Description | Default |
|---|---|---|---|
| reference | No | External payment reference or transaction ID for your records | |
| payer_email | Yes | Email of the payer (matched against invoice client_email, case-insensitive) | |
| payment_amount | Yes | Amount received from the payer, in the invoice currency | |
| payment_method | No | Payment channel (stripe|paypal|bank_transfer|etc.) |