Document API

Create, retrieve, and delete document files. Documents (for example, scanned receipts or shipment delivery slips) are used to help resolve disputes. Supported file types include PNG, JPG, and PDF.

Attributes

Name Type Description
object string

The string document.

id string

The document identifier matching /docu(_test)?_[0-9a-z]+/.

livemode boolean

Whether this is a live (true) or test (false) document.

location string

API path to retrieve the current document object.

created_at string

UTC datetime of document creation in ISO 8601 format (YYYY-MM-DDThh:mm:ssZ).

deleted boolean

Whether document is deleted.

download_uri string

URI of document for download.

filename string

Original filename of uploaded document.

kind string

Document kind

Example

  • JSON Response

Upload a document

- POST https://api.omise.co/disputes/{id}/documents

This endpoint allows you to send an HTTP multipart upload to add a dispute evidence document. Note that documents may only be added to an open dispute and document file size may not exceed 10MB. Returns the newly created document.

Request Parameters

Name Type Description
file string

(optional) File for upload as document. Valid formats include PNG, JPG, and PDF.

kind string

(optional) Document kind. When providing evidence for a dispute, kind must be one of cardholder_details, details_of_purchase, proof_of_receipt, proof_of_acceptance.

Example

  • Create a document

Destroy a document

- DELETE https://api.omise.co/disputes/{id}/documents/{document_id}

Destroys the document matching :document_id belonging to dispute matching :id. Dispute status must be open.

Example

  • Destroy a document

List documents

- GET https://api.omise.co/disputes/{id}/documents

Returns a list of documents belonging to the dispute.

Request Parameters

Name Type Description
from string

(optional, default: 1970-01-01T00:00:00Z) Earliest UTC datetime for returned records in ISO 8601 format (YYYY-MM-DDThh:mm:ssZ).

limit integer

(optional, default: 20) Number of records returned.

offset integer

(optional, default: 0) Offset of the first record returned (i.e. how many records to skip from the beginning).

order string

(optional, default: chronological, one of: chronological, reverse_chronological) Order of records returned.

to string

(optional) Latest UTC datetime for returned records in ISO 8601 format (YYYY-MM-DDThh:mm:ssZ).

Example

  • List all dispute documents

Retrieve a document

- GET https://api.omise.co/disputes/{id}/documents/{document_id}

Returns the document matching :document_id.

Example

  • Retrieve a document

Omise uses cookies to improve your overall site experience and collect information on your visits and browsing behavior. By continuing to browse our website, you agree to our Privacy Policy. Learn more