Expense Management
Build a modern spend management platform. Issue virtual and physical corporate expense cards to employees, enforce dynamic spending controls and MCC limits, auto-capture receipt metadata via OCR webhooks, and synchronize settled expenses directly into ERP general ledgers.
System Architecture & Flow
Employee taps card at terminal or checks out online with virtual card.
Rook checks employee spending budget, MCC rules, and triggers real-time auth webhook.
Instant push notification prompts employee to upload receipt photo via mobile app.
Settlement webhook triggers automated two-way entry in QuickBooks, NetSuite, or Xero.
1Issue Employee Expense Card with Spending Policies
Create an active virtual card assigned to an employee with daily/monthly limits and Merchant Category Code (MCC) white-lists (e.g. travel, software subscriptions, office supplies).
curl -X POST "https://api.sandbox.rookpayments.com/v1/cards" \
-H "Authorization: Bearer rk_test_..." \
-H "X-Program-ID: 7c9e6679-7425-40de-944b-e07fc1f90ae7" \
-H "Content-Type: application/json" \
-d '{
"account_id": "acc_exp_99812",
"type": "virtual",
"cardholder_name": "Jordan Rivera",
"metadata": {
"department": "Engineering",
"cost_center": "CC-4010"
},
"spending_limits": [
{ "amount": 500000, "interval": "monthly" },
{ "amount": 100000, "interval": "daily" }
],
"controls": {
"allowed_categories": ["software", "cloud_hosting", "travel_lodging"],
"blocked_mccs": ["7995", "6051"]
}
}'2Handle Real-Time Authorization Webhook
When an employee swipes or checks out, Rook dispatches an authorization webhook. Verify employee status and project budget balance before returning approval.
{
"event_id": "evt_auth_448201",
"type": "card.authorization.request",
"data": {
"card_id": "crd_881920",
"amount": 14900,
"currency": "USD",
"merchant": {
"name": "GITHUB INC",
"mcc": "5734",
"city": "SAN FRANCISCO",
"country": "USA"
},
"cardholder": {
"id": "usr_9912",
"name": "Jordan Rivera"
}
}
}3Attach Receipt & Reconcile with Accounting GL
Attach the employee's uploaded receipt image, extract tax details, and match the receipt against the cleared ledger transaction.
curl -X POST "https://api.sandbox.rookpayments.com/v1/transactions/txn_449210/receipts" \
-H "Authorization: Bearer rk_test_..." \
-H "Content-Type: application/json" \
-d '{
"file_url": "https://s3.amazonaws.com/company-receipts/rec_89812.pdf",
"ocr_metadata": {
"total_tax": 1250,
"merchant_tax_id": "XX-XXXXXXX",
"invoice_number": "INV-2026-908"
},
"status": "matched"
}'