# Upload a supporting document for a transaction

Uploads a supporting document (PDF, XLS, XLSX, DOCX, CSV, PNG, JPEG) to S3 for a specific transaction. Maximum file size is 10MB.

Endpoint: POST /transactions/{id}/supporting-document
Version: 2.0.0
Security: oauth2ClientCredentials

## Path parameters:

  - `id` (string, required)

## Header parameters:

  - `org_wallet_ref` (string)
    Organization wallet reference, defaults to "1" if not provided

  - `business_id` (string, required)
    Business identifier for the request

## Request fields (application/json):

  - `transactionRef` (string)
    Transaction reference (used in S3 key generation)
    Example: M-G2026001234

  - `transactionId` (string)
    Transaction ID (MongoDB ObjectId)
    Example: 64ec5b4bffaef6ff2a28455d

  - `contentType` (string, required)
    MIME content type of the document
    Enum: "application/vnd.openxmlformats-officedocument.spreadsheetml.sheet", "application/pdf", "application/vnd.openxmlformats-officedocument.wordprocessingml.document", "text/csv", "image/png", "image/jpeg"

  - `fileContent` (string, required)
    Base64-encoded file content (with or without data URI prefix)
    Example: JVBERi0xLjQKJeLjz9MKMSAwIG9iago8PC...

## Response 201 fields (application/json):

  - `url` (string, required)
    The S3 URL of the uploaded document
    Example: https://supporting-docs-bucket.s3.eu-west-1.amazonaws.com/transactions/64ec5b4bffaef6ff2a28455d/TXN-2026-001234-1705766400000.pdf

  - `transactionId` (string, required)
    The transaction ID the document was uploaded for
    Example: 64ec5b4bffaef6ff2a28455d

  - `transactionRef` (string)
    The transaction reference
    Example: TXN-2026-001234

  - `contentType` (string, required)
    The content type of the uploaded document
    Example: application/pdf

