Upload & Payment Flow
This guide walks through the current end-to-end Fangate backend flow from creator upload to buyer unlock.
It reflects the live backend as documented in:
- upload sessions
- product creation and update endpoints
- consent flows
- moderation jobs
- purchase access routes
Flow A: recommended creator upload using upload sessions
1. Create the upload session
Call:
POST /api/upload-sessions
The backend returns:
- the upload session id
- file metadata
- an upload strategy
- either single-part or multipart instructions
The current backend supports:
device_multipartremote_import
The upload configuration currently uses:
- multipart threshold:
100 MB - minimum part size:
8 MB - max upload size:
5 GB - presign TTL:
15 minutes
2. Upload bytes to staging storage
Depending on upload_strategy, the client either:
- uploads once using the initial upload instruction, or
- requests part instructions with
POST /api/upload-sessions/{id}/partsand uploads each part
3. Complete the upload
Call:
POST /api/upload-sessions/{id}/complete
4. Poll session status
Call:
GET /api/upload-sessions/{id}
Continue polling until the session becomes:
readyfailedexpiredaborted
Important statuses used by the live backend:
createduploadinguploadedfinalizingreadyfailedabortedexpired
5. Create the product from the ready session
Call:
POST /api/products
with upload_session_id plus product metadata such as:
pricetitleis_adult_contentis_verif_ageis_should_consentpublic_descriptionprivate_description
Flow B: legacy direct upload
The backend still supports direct POST /api/products uploads with a media file for legacy clients.
Important live behavior:
- large uploads may return
202 Accepted - some legacy chunk-upload flows can report
upload_percentage - product creation may continue asynchronously in
CreateProductJob
For new client work, prefer upload sessions.
Price rules
The backend stores product price in minor units.
Examples:
500=5.005500=55.00
Client guidance:
- send prices in the backend's expected units
- enforce no more than two decimal places in UI input before conversion
- treat the backend response as the source of truth for stored price
Post-upload editing
Once a product exists, the creator can adjust:
- title
- public description
- private description
- adult-content flag
- buyer age-check requirement
- third-party consent requirement
- downloadability
- folder assignment
- collection membership
Relevant endpoints:
PATCH /api/products/{product}PATCH /api/products/{product}/folderPOST /api/products/{product}/collection
Moderation and post-processing
After upload, Fangate may:
- generate previews / thumbnails
- mirror assets across process and final disks where needed
- run image moderation through SightEngine
- mark video uploads for manual approval instead of automated SightEngine review
The current backend does not send video assets to SightEngine.
Third-party consent during the flow
If a creator indicates that other people appear in the content, the current backend supports:
- tagging Fangate creators
- sending an email-based consent flow
- uploading at least three supporting consent documents
Endpoint:
POST /api/consents/store-or-send
Buyer unlock flow
After a creator publishes and a buyer purchases:
- the buyer opens the Fangate sales link
- Fangate applies the adult-content / age-check rules if required
- payment is completed
- provider webhooks confirm the purchase
- Fangate grants access to the purchased media
Relevant access routes include:
/payment/view-only/{transaction}/download/{media}/view/{media}/access-media/{transaction}/{media}
Important access detail
Buyers should access media through Fangate-controlled routes or backend-returned URLs, not through guessed raw object-storage paths.
That matters because:
- some assets are private or signed
- storage layout can change between environments
- the backend may use generated or mirrored final-storage locations
Example sequence: upload session to live sales link
POST /api/upload-sessions- upload bytes to storage
POST /api/upload-sessions/{id}/completeGET /api/upload-sessions/{id}untilreadyPOST /api/productswithupload_session_idPATCH /api/products/{id}for descriptions / toggles if neededPOST /api/consents/store-or-sendif third-party consent is required- buyer purchases the generated Fangate sales link
- buyer accesses content through Fangate access routes