Query and reconcile transactions
Use reporting records to resolve operational state and compare your ledger.
Retrieve one REST payment
Use the payment ID returned by the gateway to retrieve its current state. This REST lookup complements the Classic reporting API below. A pending or captured result is not proof of settled funds. GET /api/v5/payments/<payment-id> HTTP/1.1 Host: sandbox.nmi.com Authorization: <sandbox-private-key>
Classic Query API request
This reporting API uses form-encoded name/value pairs rather than REST JSON. Use a dedicated test account for testing; generic sandbox examples do not establish reporting access. POST /api/query.php HTTP/1.1 Host: sandbox.nmi.com Content-Type: application/x-www-form-urlencoded security_key=<url-encoded-private-key>&transaction_id=<url-encoded-payment-id>
Response model
The Query API returns machine-readable transaction data and reports times in UTC. Parse XML with a parser configured to disable external entity resolution. The parsing advice is an application security control, not a special gateway protocol. Record Operational use transaction_id Join gateway activity to your application payment. condition Inspect current transaction state. amount and currency Compare the financial record with the order ledger. action records Investigate the sequence of payment operations.
Reconciliation workflow
Recommended daily process: Store gateway IDs at payment creation so matching does not depend on customer names. Retrieve activity for the intended merchant and reporting interval. Normalize report timestamps to UTC and retain the original source timestamps. Match payments, captures, refunds and voids with application entries. Investigate unmatched records, duplicates and amount differences. Compare gateway results with processor settlement reports before treating funds as deposited.
Resolve an uncertain attempt
Search for the existing payment before allowing another charge. A single missing observation is not proof that no charge occurred; maintain an unresolved state and escalate when you cannot establish a reliable match.
Validation boundary
Dedicated sandbox account reporting was exercised against only the test payments created during verification. The static portal itself does not retrieve account reports. Production reporting permissions, retention and settlement timing must be checked for your account. Sandbox verified 2026-10-16: REST retrieval and Classic Query API matched the exact test transaction IDs and pending/captured states. Settlement reconciliation remains unverified.