1. Files
Casharc
Merchant
  • Merchant
  • Getting Started
    • Introduction
    • Authentication
    • Quickstart
  • Core Concepts
    • Statuses
    • Reason Codes
  • Guides
    • Idempotency
    • Metadata
  • Payments
    • Create Payment
      POST
    • List Payments
      GET
    • Retrieve Payment
      GET
    • Confirm Payment
      POST
    • Cancel Payment
      POST
    • Refund Payment
      POST
  • Payouts
    • Create Payout
      POST
    • List Payouts
      GET
    • Retrieve Payout
      GET
    • Cancel Payout
      POST
  • Appeals
    • Create Appeal
      POST
    • List Appeals
      GET
    • Retrieve Appeal
      GET
    • Cancel Appeal
      POST
  • Balance
    • Retrieve Balance
      GET
  • Files
    • Upload File
      POST
  • Webhook
    • Verifying webhooks
    • On Status Change
  1. Files

Upload File

POST
/files

Request

Authorization
Bearer Token
Provide your bearer token in the
Authorization
header when making requests to protected resources.
Example:
Authorization: Bearer ********************
or
Header Params

Body Params multipart/form-dataRequired

Responses

🟢200Success
application/json
Bodyapplication/json

Request Request Example
Shell
JavaScript
Java
Swift
curl --location '/files' \
--header 'Idempotency-Key: e1f3c592-630c-4821-abbc-1a9c51ef76f3' \
--header 'Authorization: Bearer <token>' \
--form 'file=@""' \
--form 'name="filename.pdf"'
Response Response Example
{
    "data": {
        "id": "file_2n5nkAfqi4xVVvVZ",
        "name": "filename.pdf",
        "content_type": "application/pdf",
        "size": 48213,
        "url": "https://files.casharc.pro/file_2n5nkAfqi4xVVvVZ?signature=...",
        "created_at": "2026-01-01T00:50:00Z"
    }
}
Previous
Retrieve Balance
Next
Verifying webhooks
Built with