Documents API

Securely send dispute-related documents to Razorpay using the Documents API.


Use the Documents APIs to securely upload and share documents with Razorpay.

Documents Entity🔗

The Documents entity has the following fields:

id
string The unique identifier of the document uploaded.
entity
string Indicates the type of entity. In this case, it is document.
purpose
string The reason you are uploading this document. Here, it is dispute_evidence.
size
integer Indicates the size of the document in bytes.
mime_type
string Indicates the nature and format in which the document is uploaded. Possible values include:
  • image/jpg
  • image/jpeg
  • image/png
  • application/pdf
created_at
integer Unix timestamp at which the document was uploaded.

Create a Document🔗

The following endpoint allows you to upload a document onto the Razorpay ecosystem.

/documents

Handy Tips
After a document is successfully uploaded, the corresponding document id (present in response) can be provided in cases such as dispute evidence submission.

Response Parameters🔗

Descriptions for the response parameters are present in the Documents Entity parameters table.

Fetch Document Information🔗

The following endpoint allows you to retrieve the details of any document that was uploaded earlier.

/documents/:id

Path Parameter🔗

id mandatory
string The unique identifier of the document.

Response Parameters🔗

Descriptions for the response parameters are present in the Documents Entity parameters table.

Fetch Document Content🔗

The following endpoint allows you to download an earlier uploaded document.

/documents/:id/content

Path Parameter🔗

id mandatory
string The unique identifier of the document.

Response Parameters🔗

Descriptions for the response parameters are present in the Documents Entity parameters table.

×