Skip to content

Receipts

Receipts attach to five kinds of records:

  • payment — a brother's dues payment
  • deduction — a brother's out-of-pocket spending
  • donation — incoming donation
  • transaction — a Slash card swipe
  • expense — a recurring bill / nationals payment

All five flow through the same upload pipeline. Files are saved on the bot server under receipts/<year>/<kind>/<record_id>.<ext> — local-first, the bot is the source of truth.

/attach_receipt

Upload a receipt and link it to a record.

Usage: /attach_receipt <kind> <record_id> <file>

Argument Required Description
kind yes Payment / Deduction / Donation / Transaction / Expense
record_id yes The record's ID (visible in the record's confirmation embed)
file yes Image (PNG/JPEG/WebP/GIF/HEIC) or PDF, max 25 MB

Example:

/attach_receipt kind:Transaction record_id:agg_tx_1d9i9 file:[upload]

Limits:

  • 25 MB file size cap
  • Allowed types: PNG, JPG/JPEG, WebP, GIF, HEIC, PDF
  • Other types rejected with a clear error

How to find a record ID

Kind Where the ID shows
Payment In the /log_payment confirmation footer, or /my_history, or /show_payment
Deduction /deduct_dues confirmation, or /show_deduction
Donation /log_donation confirmation, or /donations list
Transaction /charges row (printed under each row in a code block), or /txn footer
Expense /list_expenses row, or /show_expense footer

For mobile copy-paste, /charges and the dropdown drill-downs include a plain-text follow-up message with just the ID — long-press → Select All → Copy.


What happens when you attach

  1. Bot downloads the file from Discord (Discord CDN URLs expire, so we save immediately to disk)
  2. Saves under receipts/<year>/<kind>/<id>.<ext> on the bot server
  3. Updates the record's receipt_path field in Mongo
  4. (Transactions only) Pushes "📎 Receipt attached" memo to Slash via PATCH /transaction/{id}/note if a memo was set

After upload, the record's display will show "Receipt: 📎 attached". /charges rows show a 📎 indicator. Drill-down views show the receipt image inline.


Permanence

Receipts persist on the server forever — they don't get cleaned up automatically. If you back up the bot, include the receipts/ directory.

The Slash dashboard does not show our receipts (their API doesn't have a transaction-attachment endpoint — only expense reports do, and we don't use those). The bot is the canonical receipt store.