Upload Evidence
To upload evidence for a dispute using disputeId
Environment
| Environment | Http Method | API |
|---|---|---|
Sandbox | POST | https://api-preprod.phonepe.com/apis/pg-sandbox/v1/disputes/{disputeId}/evidences |
Production | POST | https://api.phonepe.com/apis/pg/v1/disputes/{disputeId}/evidences |
Request
Request Headers
| Header Name | Header Value |
|---|---|
Content-Type | multipart/formdata |
Authorization | O-Bearer <access_token> |
Note: access_token can be generated using the Auth Token API. Refer here
Form Data Parameters
| Form Data Parameters | Type | Description |
|---|---|---|
file | Path to the file. Note: The size should not be less than 2 MB Possible file type: [bmp, jpeg, jpg, pdf, csv, doc, png] | |
type | STRING | Type of Evidence Possible Values: • explanationLetter • customerRecallLetter • serviceConfirmation • refundConfirmation • serviceCancellation • deliveryProof • shippingProof • accessActivityLog |
label | STRING | Name of the file Note: The label can not be null and max length is 256 |
Response
Sample Response
{
"evidenceId": "324524312",
"label": "document.pdf"
}Response Parameters
| Response Parameter | Type | Description |
|---|---|---|
evidenceId | String | Unique evidence id generated at PhonePe |
label | String | Label of the file |
⚠️ Dispute Status Action Rules!
A dispute can be accepted only when its status is ACTION_REQUIRED. If the status is different, the API will return a 409 error.
Error Scenarios
| Error Scenario | Response Code | Response |
| Dispute not found | 404 | { “message”: “Dispute Not Found”, “code”: “DISPUTE_NOT_FOUND” } |
| The evidence can be uploaded when the dispute is in ACTION_REQUIRED only | 409 | { “message”: “Transition not allowed”, “code”: “INVALID_TRANSITION” } |
| Any issue at PhonePe end | 500 | { “message”: “Something went wrong, please try again”, “code”: “SOMETHING_WENT_WRONG” } |
| Type is null or other than possible values | 400 | { “message”: “Evidence type not allowed”, “code”: “INVALID_EVIDENCE_TYPE” } |
| Label is null or having character length more than 256 | 400 | { “message”: “Label is invalid”, “code”: “INVALID_LABEL_SIZE” } |
| File size is larger than 2 MB (or) File having 0 Bytes | 400 | { “message”: “File size invalid”, “code”: “INVALID_FILE_SIZE” } |
| File type is other than [pdf, jpg, bmp, doc, csv] | 400 | { “message”: “File type not allowed”, “code”: “INVALID_FILE_TYPE” } |