Skip to content
Docs menu

Finance company cards and reimbursement runs

Import company card statements, match each card line to its receipt, remind the cardholder about missing receipts, and pay approved personal spend back through a payment run.

View .md

Company card spend and reimbursements are part of Expenses (finance.expenses). A company card's statement comes in as a file; each line on it is matched to the receipt the cardholder filed, and a line with no receipt reminds them. Spend the member paid themselves is paid back through a reimbursement run in Payments.

The pages: Finance > Expenses > Cards (/finance/expenses/cards), built for a phone first, and Finance > Payments > Reimbursements (/finance/payments/reimbursements).

Petawork has no connection to a card network and never stores a full card number. A card is known by its last four digits only.

Who sees what

  • The cardholder sees their own cards and lines, imports their own statement, confirms or rejects a suggested match, sends in a receipt from their phone and declares a receipt lost. They need the requester role on the card's entity.
  • An AP clerk or controller (capture.review on the entity) adds cards, imports statements, and confirms or rejects matches for every cardholder on that entity. An auditor reads them.
  • Nobody else sees a card line. Something you cannot see answers exactly as an unknown id.

Adding a card

Add card (a clerk or controller) names the entity, the cardholder (their member ref, user:…), the card's last four digits, a name and the statement's currency (the entity's by default). A full card number in the last-four field is refused and is not repeated back.

Importing a statement

Choose the card and a CSV file of its statement. The first time, Petawork shows the first rows and suggests which column holds the date, the merchant, the amount, the statement's own reference and the card number, and how the dates are written. Confirm or change them, say whether charges are positive or negative numbers in the file, and import. The mapping is saved on the card, so the next statement of the same layout imports in one step.

  • Card numbers. Any run of 13 to 19 digits that passes the Luhn check is treated as a full card number and masked to **** and its last four before anything is stored, wherever it appears. The card-number column gives only its last four digits, and a row for another card is refused. The import says how many numbers it masked.
  • Row by row. A row that cannot be read (a bad date or amount, another card, no merchant) is listed with its row number; the other rows go in.
  • No duplicates. A line is known by the statement's own reference, or else by a fingerprint of its date, amount, merchant and its place among identical lines. Importing the same file again adds nothing and says it was imported before.
  • Limits. At most 5,000 rows and 2 MB per file. Statements come in as CSV; PDF card statements are not read yet.

Matching lines to receipts

Each new line is compared with the cardholder's receipts (their expenses on the same entity that are not matched yet) by the reconciliation engine's tolerance rule (Finance reconciliation rules): the same currency, an amount within 5% of the charge, and a spend date within 3 days of the posting date. Merchant names are compared first, after dropping card processor prefixes (SQ *, PAYPAL *), store numbers and legal suffixes; a receipt whose merchant is clearly different is not a candidate, and one with no merchant yet still is.

  • A line links to its receipt by itself only when exactly one receipt passes and its amount is exact.
  • Anything else (a tip, a rounding, two receipts that both fit) is a suggestion: the cardholder or a clerk taps Yes, match or Not this one. A rejected receipt is never suggested for that line again.
  • Match again checks open lines once more, for receipts filed after the import.

A line and a receipt match at most once, also when two people confirm at the same moment. A matched receipt becomes company card spend, so it is never paid back to the member. A draft paid personally can be matched; an approved personal claim cannot. Deleting a draft receipt that was matched puts its line back to waiting. A refund on the card needs no receipt.

No receipt yet

On a line waiting for a receipt the cardholder can:

  • Snap a receipt: the photo goes into Finance documents and becomes a company-card expense with the line's merchant, date and amount, matched to the line;
  • Receipt lost: write what happened (10 to 500 characters). The declaration is kept on the line and raised once as a missing_receipt item in the exceptions queue.

Reminders. A charge still without a receipt reminds its cardholder when it is N days old, and again at 2N and 3N days. N is the entity's card_unmatched_days setting (1 to 90, default 7; set it with finance_entity_update settings). Each reminder goes once per line and step: in the cardholder's bell, and by email through the organisation's own Comms email when it is set up (otherwise it is logged as skipped). The reminders run in the background sweep, only for organisations with Expenses.

Reimbursement runs

An approved expense report is paid back to its member through a payment run (Finance payments), to the member's reimbursement account: a party whose bank account was added and verified by two people, as a vendor's is. A vendor admin or controller sets it with Set reimbursement account (finance_memberpayee_set); an agent never does.

Propose reimbursement run (a payment preparer) builds a run of one bank account whose items are approved reports only:

  • only the lines the member paid personally are reimbursed; lines paid by company card, or matched to a card line, never are;
  • a report whose member's account is not verified is left out with the reason (unverified_account), and one whose member has no reimbursement account is listed as left out;
  • a report is never in two runs: each is reserved under a lock, as a bill is.

The run is then prepared, approved, released and settled exactly as any payment run: release stays in the app, by a signed-in payment releaser who did not prepare it, never an agent and never a tool. Nothing on this page releases a run.

The member sees each report as Submitted, Approved, Scheduled (in a run, with its number) or Paid (the run settled), in finance_reimbursement_list.

Tools and REST

Tool REST What it does
finance_cardfeed_create POST /api/v1/finance/card-feeds Add a card (last four digits only)
finance_cardfeed_list GET /api/v1/finance/card-feeds The cards you may see
finance_cardtxn_import POST /api/v1/finance/card-feeds/{feed_id}/import Import a statement CSV (preview, then with a mapping)
finance_cardtxn_list GET /api/v1/finance/card-lines Card lines and their match state
finance_cardtxn_match POST /api/v1/finance/card-lines/match Confirm, reject, or match again (action)
finance_cardtxn_update PATCH /api/v1/finance/card-lines/{id} Your receipt for a line, or a lost-receipt declaration
finance_reimbursement_propose POST /api/v1/finance/reimbursements/runs Propose a reimbursement run
finance_reimbursement_list GET /api/v1/finance/reimbursements Reports to reimburse and where each stands
finance_memberpayee_set PUT /api/v1/finance/member-payees Set a member's reimbursement account

Each needs Expenses switched on (finance_reimbursement_propose also Payments); otherwise it answers product_not_enabled. An agent's write goes through the Finance agents gate: without authority for it, it is only a recommendation.

Example import, after the preview:

{
  "feed_id": "…",
  "csv": "Date,Description,Amount\n2026-11-20,SQ *NOODLE BAR,48.00\n",
  "mapping": { "date": "Date", "dateFormat": "YYYY-MM-DD", "counterparty": "Description", "amount": { "type": "signed", "column": "Amount" } }
}