Documents

Upload a document

Upload a file to Razorpay. Returns a document ID that can be used in dispute evidence submissions. Supports JPEG, PNG, and PDF formats.

post/documents

Request

  • Base URL
    https://api.razorpay.com/v1
  • Auth
    • HTTP basic
    • or OAuth 2
      Authorization codehttps://mcp.razorpay.com/authorize
      Client credentials
      Token URLhttps://mcp.razorpay.com/token
      Scopesread_only
  • TypeScript
    A function with typed inputs. Its response is checked against the schema.

Request body multipart/form-data

filestring binary required

File to upload. Supported: JPEG, PNG, PDF.

purposestring required

Reason for upload. Example: dispute_evidence.

Response

Document uploaded.

idstring

Unique document identifier. Example: doc_EsyWjHrfzb59Re. Always 14 alphanumeric characters.

entity'document'
namestring

Filename of the uploaded document.

mime_type'image/jpg' | 'image/jpeg' | 'image/png' | 'application/pdf'

MIME type of the uploaded file.

sizeinteger

File size in bytes.

purposestring

Upload reason. Example: dispute_evidence.

created_atinteger

Unix timestamp of upload.

Changes

No recorded changes to this operation across all 1 revision of this API.