Preview what an import of these rows would do, without storing anything (ANALYST+)
const url = 'https://api.invogi.com/v1/payments/import/preview';const options = { method: 'POST', headers: {Authorization: 'Bearer <token>', 'Content-Type': 'application/json'}, body: '{"rows":[{"supplierName":"example","supplierTaxId":"example","supplierExternalId":"example","invoiceExternalId":"example","invoiceNumber":"example","amount":"example","currency":"GBP","paidAt":"2026-04-15","paymentReference":"example","method":"example","direction":"PAYMENT","sourceRowNumber":1}],"source":"BANK_STATEMENT","dataProfile":{"profileId":"2489E9AD-2EE2-8E00-8EC9-32D5F69181C0","revisionId":"2489E9AD-2EE2-8E00-8EC9-32D5F69181C0","clientDiagnostics":{"inputRowCount":1,"rejectedRowCount":1,"warningRowCount":1,"unusedColumnCount":1}}}'};
try { const response = await fetch(url, options); const data = await response.json(); console.log(data);} catch (error) { console.error(error);}curl --request POST \ --url https://api.invogi.com/v1/payments/import/preview \ --header 'Authorization: Bearer <token>' \ --header 'Content-Type: application/json' \ --data '{ "rows": [ { "supplierName": "example", "supplierTaxId": "example", "supplierExternalId": "example", "invoiceExternalId": "example", "invoiceNumber": "example", "amount": "example", "currency": "GBP", "paidAt": "2026-04-15", "paymentReference": "example", "method": "example", "direction": "PAYMENT", "sourceRowNumber": 1 } ], "source": "BANK_STATEMENT", "dataProfile": { "profileId": "2489E9AD-2EE2-8E00-8EC9-32D5F69181C0", "revisionId": "2489E9AD-2EE2-8E00-8EC9-32D5F69181C0", "clientDiagnostics": { "inputRowCount": 1, "rejectedRowCount": 1, "warningRowCount": 1, "unusedColumnCount": 1 } } }'Runs the same matching, credit handling and duplicate-payment checks as POST /payments/import inside a transaction that is always rolled back. No payments, refunds, findings, notifications, import batch or automation activity are recorded. A later import can differ if other payments or suppliers are recorded in between; its response is authoritative.
Authorizations
Section titled “Authorizations”Parameters
Section titled “Parameters”Header Parameters
Section titled “Header Parameters”For a Clerk session, selects a workspace in which the user has an active membership. If omitted, the remembered accessible workspace is used. API keys remain bound to their own workspace and cannot select another tenant.
Request Bodyrequired
Section titled “Request Bodyrequired”object
object
Payee name as exported
The payee’s ID in the customer’s system; kept as evidence
Matches an invoice’s externalId
Matches an invoice by number when there is no invoice ID
A positive payment amount; at most 18 integer and 6 decimal digits
Optional; defaults to the organization’s base currency
REFUND is money the supplier sent back (in an export, a row of the opposite sign to the payments). It is kept as a supplier refund that can be suggested on a matching recovery case, never checked as a payment. The amount stays positive. A refund already imported (same payee, currency, amount, date and reference) is not added again.
What kind of file the rows came from. AP_PAYMENT_EXPORT (the default): an AP or ERP payment report, where every REFUND row is a supplier refund. BANK_STATEMENT: a bank account export, where a REFUND (credit) row is kept as a supplier refund only when it resolves to a known supplier by invoice, tax ID or exact name. A credit that matches an earlier payment to that supplier (same amount and currency, paid within the previous 14 days, explicit return/rejection wording, and containing the earlier payment’s non-empty reference) is counted as a returned payment instead and sets that payment’s returnedOn, which excludes it from later duplicate-payment checks. A credit matching a payment in an undismissed duplicate-payment finding or a recovery case is kept as a supplier refund instead. Other credits are counted and not stored. BANK_STATEMENT rows are processed in date order, credits first on each date.
Optional SETTLED_PAYMENTS profile (dashboard users only); its file type must equal source. Accepted on preview for early validation; only an import records a receipt.
object
Counts the browser observed, stored labelled as client-reported
object
Responses
Section titled “Responses”The counts the import would produce
object
What kind of file the rows came from. AP_PAYMENT_EXPORT (the default): an AP or ERP payment report, where every REFUND row is a supplier refund. BANK_STATEMENT: a bank account export, where a REFUND (credit) row is kept as a supplier refund only when it resolves to a known supplier by invoice, tax ID or exact name. A credit that matches an earlier payment to that supplier (same amount and currency, paid within the previous 14 days, explicit return/rejection wording, and containing the earlier payment’s non-empty reference) is counted as a returned payment instead and sets that payment’s returnedOn, which excludes it from later duplicate-payment checks. A credit matching a payment in an undismissed duplicate-payment finding or a recovery case is kept as a supplier refund instead. Other credits are counted and not stored. BANK_STATEMENT rows are processed in date order, credits first on each date.
Payments the import would store.
Supplier refunds the import would store.
object
object
Example
{ "preview": true, "source": "BANK_STATEMENT"}Invalid request
Missing or invalid API key
API key lacks required scope/role