Upload Evidence


To upload evidence for a dispute using disputeId

EnvironmentHttp MethodAPI
SandboxPOSThttps://api-preprod.phonepe.com/apis/pg-sandbox/v1/disputes/{disputeId}/evidences
ProductionPOSThttps://api.phonepe.com/apis/pg/v1/disputes/{disputeId}/evidences
Request Headers
Header NameHeader Value
Content-Typemultipart/formdata
AuthorizationO-Bearer <access_token>

Noteaccess_token can be generated using the Auth Token API. Refer here

Form Data Parameters
Form Data ParametersTypeDescription
filePath to the file.
Note: The size should not be less than 2 MB
Possible file type: [bmp, jpeg, jpg, pdf, csv, doc, png]
typeSTRINGType of Evidence
Possible Values:
explanationLetter
customerRecallLetter
serviceConfirmation
refundConfirmation
serviceCancellation
deliveryProof
shippingProof
accessActivityLog
labelSTRINGName of the file
Note: The label can not be null and max length is 256
Sample Response
{
   "evidenceId": "324524312",
   "label": "document.pdf"
}
Response Parameters
Response ParameterTypeDescription
evidenceIdStringUnique evidence id generated at PhonePe
labelStringLabel 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 ScenarioResponse CodeResponse
Dispute not found404{
   “message”: “Dispute Not Found”,
   “code”: “DISPUTE_NOT_FOUND”
}
The evidence can be uploaded when the dispute is in ACTION_REQUIRED only409{
   “message”: “Transition not allowed”,
   “code”: “INVALID_TRANSITION”
}
Any issue at PhonePe end500{
   “message”: “Something went wrong, please try again”,
   “code”: “SOMETHING_WENT_WRONG”
}
Type is null or other than possible values400{
   “message”: “Evidence type not allowed”,
   “code”: “INVALID_EVIDENCE_TYPE”
}
Label is null or having character length more than 256400{
   “message”: “Label is invalid”,
   “code”: “INVALID_LABEL_SIZE”
}
File size is larger than 2 MB (or) File having 0 Bytes400{
   “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”
}
Is this article helpful?