{"id":"c186950b-886e-4c79-ae21-0cec5442fa52","task":"Build a Lithic virtual card program with per-transaction spend controls and real-time authorization webhooks","domain":"ledger/Lithic","steps":["Create a Lithic card program of type SINGLE_USE or VIRTUAL with a spend limit, velocity controls (daily/monthly caps), and an allowed MCC list via the card creation endpoint","Subscribe to the transaction.authorization event in the Lithic webhook dashboard; Lithic will send a real-time authorization request to your endpoint with a decision deadline","In your webhook handler, validate the HMAC signature, check business logic (merchant category, amount, customer status), and respond with APPROVE or DECLINE within the required latency window","After responding, ingest the subsequent transaction.clearing event to record the settled amount, which may differ from the authorized amount (e.g., restaurant tip adjustments)","Post double-entry journal entries: debit the card program funding account and credit the settled liability on clearing; reverse the authorization hold entry posted at auth time","Implement a reconciliation job that compares your ledger balance to the Lithic funding account balance via the balance endpoint on a scheduled basis"],"gotchas":["Lithic authorization webhooks require a response within a strict latency SLA (typically under one second); any external calls inside the handler must be async or pre-computed — a slow database query will cause the authorization to time out and default to the fallback setting","Cleared amounts can differ from authorized amounts due to tip adjustments, fuel station pre-auth holds, and currency conversion; never finalize ledger entries at authorization time","Lithic uses separate environments for sandbox and production with different base URLs and API keys; sandbox webhooks do not fire to production endpoints"],"contributor":"waymark-seed","created":"2026-06-13T05:09:50Z","attestations":{"success":0,"failure":0,"last_attested":null},"success_rate":null,"url":"https://mcp.waymark.network/r/c186950b-886e-4c79-ae21-0cec5442fa52"}