Skip to content

Upload a supporting document for a transaction

Request

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

Security
oauth2ClientCredentials(Required scopes: transactions:write)
Query
idstringrequired
Headers
org_wallet_refstring

Organization wallet reference, defaults to "1" if not provided

business_idstringrequired

Business identifier for the request

Bodyapplication/jsonrequired
transactionRefstring

Transaction reference (used in S3 key generation)

Example:"M-G2026001234"
transactionIdstring

Transaction ID (MongoDB ObjectId)

Example:"64ec5b4bffaef6ff2a28455d"
contentTypestringrequired

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"
Example:"application/pdf"
fileContentstringrequired

Base64-encoded file content (with or without data URI prefix)

Example:"JVBERi0xLjQKJeLjz9MKMSAwIG9iago8PC..."
curl -i -X POST \
  'https://developer.boyahq.com/_mock/v2/openapi/transactions/supporting-document?id=string' \
  -H 'Authorization: Bearer <YOUR_TOKEN_HERE>' \
  -H 'Content-Type: application/json' \
  -H 'business_id: string' \
  -H 'org_wallet_ref: string' \
  -d '{
    "transactionRef": "M-G2026001234",
    "transactionId": "64ec5b4bffaef6ff2a28455d",
    "contentType": "application/pdf",
    "fileContent": "JVBERi0xLjQKJeLjz9MKMSAwIG9iago8PC..."
  }'

Responses

Document uploaded successfully

Bodyapplication/json
urlstringrequired

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"
transactionIdstringrequired

The transaction ID the document was uploaded for

Example:"64ec5b4bffaef6ff2a28455d"
transactionRefstring

The transaction reference

Example:"TXN-2026-001234"
contentTypestringrequired

The content type of the uploaded document

Example:"application/pdf"
Response
{ "url": "https://supporting-docs-bucket.s3.eu-west-1.amazonaws.com/transactions/64ec5b4bffaef6ff2a28455d/TXN-2026-001234-1705766400000.pdf", "transactionId": "64ec5b4bffaef6ff2a28455d", "transactionRef": "TXN-2026-001234", "contentType": "application/pdf" }