tupicAcademy

Pay Now Workflow

·article·2026-06-12

Pay Now Workflow

Definition

Recording an expense and its cash settlement in a single operation: the cost item, the bank withdrawal, and the PAID status are written atomically.

Worked Example

User enters a $499 SaaS subscription cost, selects Pay Now and a bank account:

BEGIN;
  INSERT cost_item   (amount=499, payment_status='PAID', ...);
  INSERT cash_transaction (type='WITHDRAWAL', amount=499, account=X);
  INSERT audit_trail (...);
COMMIT;

If any step fails, none happens — the system can never half-pay.

Interpretation & Pitfalls

Atomicity is the point: expense, cash, and status can never drift apart.

In TupicFinance

Pay Now requires a bank-account selection and creates the withdrawal in the same operation as the cost item.

share