The scenario: a submitted proof needs an honest receipt
A patient can submit information about a payment without the application having independently established that money reached the clinic. The interface needs to distinguish a submitted proof, any image information retained and the authoritative decision that verifies the claim. Combining those stages into a generic success label can promise more than a particular implementation actually records.
The pinned Movo-X proof route measures decoded bytes and forwards selected metadata. One existing API case, three supplemental TypeScript cases and one portable Swift case passed with synthetic inputs. Selected database and presentation source was reviewed separately. No bank, actual payment or invoice was involved.
Compute a digest from bytes rather than accepting one from the caller
The selected helper validates a bounded Base64 input shape, decodes it, checks a raw-byte limit and returns a SHA-256 digest with byte count. A supplemental known-vector case checks the representation for three synthetic text bytes. Those bytes deliberately are not a decoded image.
That distinction is useful: this helper identifies/measures supplied bytes; it does not parse pixels or verify a banking screenshot. Its selected refusal fixtures include missing/wrong input shapes, a data-URL prefix and leading whitespace. They do not establish every Base64 canonicalization rule or the authenticity of whatever a user chose to encode.
Keep the byte budget distinct from a MIME label
The route permits selected declared JPEG, PNG and WebP labels. An existing case refuses an unsupported label and malformed input. A supplemental boundary case accepts the selected four-MiB raw maximum and refuses the next byte. The native Swift case independently rejects empty and oversized input and normalizes an allowed MIME label.
A declared MIME value is still caller metadata. Neither these byte-count cases nor the Swift constructor demonstrates actual raster decoding or screenshot validity. The selected historical SQL metadata constraint has its own broader size bound; that does not expand the stricter public handler/native limit or establish current installed acceptance.
Refuse caller-supplied verification and authoritative fields
The supplemental injected-handler case adds a verified status, chosen currency or precomputed image digest to an otherwise shaped request. Each is refused before its fake database call. The selected valid shape reaches that injected API once. These cases make the public writable-field boundary inspectable.
They do not establish that the requesting account is authorized for a real invoice. The local bearer and dependency result are synthetic; authoritative access still belongs to the responsible service. A server-computed digest also remains a digest of caller-chosen content, not a declaration that its financial assertion is true.
Forward metadata without advertising image storage
The existing API fixture checks the selected RPC input: facility/patient scope, optional invoice/amount, MIME label, digest and decoded size. The submitted Base64 image field is absent from that input. This verifies one payload projection rather than an end-to-end image-retention audit.
The inspected historical function records proof metadata and returns an imageStored false flag. That branch does not place the bytes into an image store. It does not follow that the screenshot vanished from the device, was absent from every transient buffer or can be retrieved later from its hash. Retention, retrieval and privacy claims need evidence beyond a removed RPC field.
Retain invoice, currency and submitted-state authority
The selected SQL definition resolves scoped record access and, when an invoice is supplied, checks an issued invoice in the selected patient chain. It derives selected currency from that invoice, records proof metadata and defines a submitted default status. Those database branches were not executed in this batch or audited across every later wrapper/trigger.
The Swift case checks positive-amount construction and one selected numeric encoding value. It is not an accounting-precision or settlement test. A proof-status field, an optional reported amount and an invoice reference are different from verified funds or the invoice ledger’s authoritative payment outcome. Do not infer a paid balance from a successful submission response.
Show the image-retention flag in the user handover
The inspected iOS sheet assigns the returned imageStored flag and conditionally shows its keep-screenshot message after the submission call. This is a useful source-level connection between a receipt field and what the person is asked to retain. The actual SwiftUI view and localized text were not mounted or visually accepted here.
The response also carries a proof status independent of the presence of stored image bytes. Test those fields and the intended copy together using controlled receipts. A completed upload interaction, a proof awaiting review and a verified financial outcome should have explicit product meanings rather than inheriting one another’s labels.
Test permission and retry separately from local input checks
The historical metadata function defines request replay handling and an audit event alongside its access and field checks. The pure digest cases do not execute that transaction. The injected route case does not create a durable proof or establish behaviour under concurrent retries, changed input or a revoked clinic link.
Keep byte identity, request identity and financial identity separate in acceptance. Include repeated submissions, cross-invoice scope, absent invoice context, refused sessions and current review transitions in an isolated authoritative environment. Do not use a matching hash as a substitute for account permission or a bank/clinic decision.
A practical payment-proof engineering package
Retain the five scoped cases with source and fixture records. Add current database and clinic-workflow acceptance using synthetic invoices and proofs, then test native receipt wording, image retention and recovery after a lost response. Inspect actual logging/storage boundaries before promising any broader privacy or retrieval behaviour.
For a CTO, the deliverable is a clear claim chain: the client constructs an input, the server computes selected metadata, a scoped service records a submission and the responsible workflow establishes any verified result. The selected local cases support the first boundaries. They do not certify a financial transaction or demonstrate actual invoice settlement.
Compare the reviewed boundaries
Payment proof has several independent meanings
On smaller screens, scroll across to compare every column. Keyboard users can focus the table and use the arrow keys.
| Boundary | Selected evidence | Separate acceptance |
|---|---|---|
| Byte identity | Known digest and exact-size fixtures | Actual image/content authenticity |
| Writable fields | Injected refusal of status/currency/digest | Current account and invoice authority |
| Submission record | Selected SQL metadata intent | Durable replay and current review transitions |
| Image retention | RPC projection and imageStored source | Actual storage/logs and native receipt wording |
Illustrative control flow
Pseudocode summarizing the decision boundary. It is not copied production code or a deployment instruction.
metadata = hash_and_measure_bounded_decoded_bytes(input)
refuse_caller_owned_status_currency_or_digest_fields()
receipt = submit_metadata_under_authorized_invoice_scope(metadata)
show_submission_status_and_image_retention_flag(receipt)
# Financial verification and invoice settlement require their own authoritative result.About this engineering series
Written by Omer Muneer Qazi from a review of Movo-X implementation and dated engineering records. This article explains source behaviour and historical observations; current production, clinical outcomes and store availability require their own verification. Examples are synthetic and proposed test cases are identified as such.
Explore the Movo-X engineering series → · Related implementation experience →
Discuss a similar engineering problem
Send the workflow, current platform and the decision your team needs to make. I can help define an implementation or review scope with concrete acceptance evidence.
Discuss your project on WhatsApp ↗