Short answer: for saving user documents, compare Supabase Storage and Firebase Storage by authorization boundary and auditability, then keep gaming receipt originals private behind short-lived delivery access; the provider is secondary to that evidence model.

Gaming receipts look like ordinary user documents until a dispute arrives. Then the system must prove which original file was received, who could read it, and whether the delivered bytes are the same bytes that were retained.

The practical answer is to separate retention from delivery: keep an immutable original behind an authorization boundary, issue short-lived access for a verified request, and record every decision. That design works with a storage service, a self-hosted object store, or a filesystem-backed adapter. The service choice matters, but it is downstream of the evidence model.

What is the bill actually made of?

The storage bill is a product of retained bytes, request volume, and delivery traffic. For receipts, retained bytes usually dominate after the first upload because an original has to remain available while a player account, payment dispute, or internal review remains open. A useful estimate is deliberately plain:

package main import "fmt" func main() { players := 200000 receiptsPerPlayer := 12 averageReceiptMiB := 0.45 totalGiB := float64(players*receiptsPerPlayer) * averageReceiptMiB / 1024 fmt.Printf("retained receipt volume: %.1f GiB\n", totalGiB) } 

This is not a price quote; it is the quantity that any price model must account for. At 200,000 players, 12 receipts each, and a 0.45 MiB average original, the retained set is about 1,054.7 GiB before replicas, metadata, snapshots, and delivery requests. The change that moves the dominant term is retention policy: preserve the original receipt for the period required by the business and compliance review, then remove it with a recorded deletion event.

That trade-off is uncomfortable but explicit. Keeping every thumbnail, transformed preview, and abandoned upload forever increases the evidence surface without improving the record. I would retain the original receipt and its digest, keep a derived preview only while it serves a real workflow, and accept that a later request for a deleted preview requires regeneration from the original.

Keep it private.

That sentence is the operational default for a receipt original, not a universal rule for every document in a game. A support agent may need a preview, a player may need a download, and a dispute reviewer may need the original bytes, but those are three different actors and three different audit events. Treating them as one “read” permission makes later review needlessly ambiguous; treating them as separate actions lets retention, authorization, and delivery evolve independently without weakening the record.

How should storage handle saving user documents?

A public URL is easy to deliver and difficult to reason about. A private object plus a short-lived authorization decision is more work at the boundary, but it makes the important question answerable: was this request allowed for this player, this receipt, and this action?

Use a stable logical key rather than a user-supplied filename. A key such as receipts/{playerID}/{receiptID}/original avoids collisions and keeps names out of authorization logic. Store the original bytes, content type, byte length, a cryptographic digest, and the event identifiers in a record owned by the application. Do not infer ownership from a path that the caller can edit.

The delivery path can then be small. The application authenticates the caller, checks the receipt relationship, writes an audit event, and returns a time-limited handoff to the storage adapter. The adapter may issue a signed URL or stream the object itself; that is an operational choice, not the authorization policy. Cache behavior must be intentional as well: Cache-Control controls how responses may be reused, so a private receipt should not accidentally become a shared browser or intermediary cache entry.

Here is the decision boundary in Go. It is an adapter, so the rest of the system does not depend on a commercial API.

package receipts import ( "context" "crypto/sha256" "fmt" "io" "time" ) type Receipt struct { ID string PlayerID string ObjectKey string Digest [32]byte } type ObjectStore interface { Open(ctx context.Context, key string) (io.ReadCloser, error) } type Auditor interface { Record(ctx context.Context, action, receiptID, actorID string) error } func OpenReceipt(ctx context.Context, store ObjectStore, audit Auditor, receipt Receipt, actorID string) (io.ReadCloser, error) { if actorID == "" || receipt.ID == "" || receipt.PlayerID == "" { return nil, fmt.Errorf("incomplete receipt authorization context") } if err := audit.Record(ctx, "receipt.read.requested", receipt.ID, actorID); err != nil { return nil, fmt.Errorf("record read decision: %w", err) } return store.Open(ctx, receipt.ObjectKey) } func VerifyOriginal(r io.Reader, expected [32]byte) error { h := sha256.New() if _, err := io.Copy(h, r); err != nil { return err } var actual [32]byte copy(actual[:], h.Sum(nil)) if actual != expected { return fmt.Errorf("receipt digest mismatch at %s", time.Now().UTC().Format(time.RFC3339)) } return nil } 

The example records the authorization decision before opening the object and verifies the original separately. In a production handler, the relationship check must happen before OpenReceipt; the function should receive only a receipt already selected by a server-side query. The digest is evidence of byte identity, not proof that the receipt is genuine. Those are different claims.

Which storage model fits the receipt workflow?

Supabase Storage is a reasonable fit when a team wants object storage close to a Postgres-centered application and expects row-level authorization concepts to sit near application data. Firebase Storage is a reasonable fit when identity and Firebase Security Rules already define the application boundary. Amazon S3 is a reasonable fit when the team wants a broadly supported object-storage interface and is prepared to design IAM, bucket policy, and signing behavior explicitly. These are different control surfaces, not a neutral ranking.

The comparison should be made against the workflow, not a feature checklist:

Decision Postgres-oriented storage Firebase-oriented storage S3-oriented storage
Authorization source Database relationship and policy Identity plus storage rules IAM, bucket policy, or application signer
Delivery default Application or signed handoff Application or signed handoff Application or presigned handoff
Main integration cost Keeping object and row state consistent Keeping rules aligned with receipt ownership Owning policy, lifecycle, and key design
Audit requirement Application audit trail remains necessary Application audit trail remains necessary Application audit trail remains necessary

The table describes engineering boundaries, not promises about a provider's current plan or pricing. Every option still needs an application-owned receipt record and an audit trail. A storage access log can tell you that an object was requested; it usually cannot replace the business decision that explains why that actor was allowed to request it.

What should fail, and what should be tested?

Uploads should be idempotent. Derive an idempotency key from the payment event or accept one from the trusted ingestion path, then make retries converge on one receipt record and one original object. A client retry must not produce three audit records that look like three independent receipts. The exactly-once mindset belongs in the state transition, even when the network can deliver a request more than once.

Test the uncomfortable cases first: the same upload retried after a timeout, a changed player identifier, a missing object with a present database row, a digest mismatch, an expired delivery handoff, and a deletion attempted before the retention deadline. Also test that an operator can reconstruct the sequence from audit records without reading private payloads. That is the difference between observability and an audit trail.

In deployment, alert on divergence rather than only on request errors. A count of receipt rows without corresponding originals, or originals without a receipt row, deserves attention. Keep a repair job narrow and reviewable; it should reconcile state, never silently overwrite an original.

Decision rule

Choose the storage model whose authorization boundary your team can review line by line, then put the receipt record, digest, retention decision, and audit event in your own domain model. For gaming documents, delivery simplicity is useful only after access control and evidence preservation are settled.

The original file is the record; the URL is merely a delivery mechanism.

Further reading