Requirements
Before you begin, take into account the requirements, limitations, and preparations described under Raise disputes.Upload an attachment
- Base64-encode any attachments the cardholder provides for upload with their dispute.
-
Make a POST /disputes/{disputeId}/attachments request, specifying the disputeId as a path parameter and the following request parameters.
- When you present the screen to cardholders to upload attachments, make sure they know which file types we support (JPEG, PDF, TIFF).
- Make sure any photos you attach to the dispute are in-focus and not blurry.
- Attachments must be in Base64-encoded string format.
- If a cardholder wants to upload multiple attachments, you need to make a separate POST request for each attachment.
Upload an attachment as supporting information for a dispute -
In the response, note the attachmentId. You need the ID if you want to later get the attachment, or delete the attachment.
Response
Get an attachment
You can retrieve an attachment associated with a dispute when you know the specific dispute ID and attachment ID you want.-
Make a GET /disputes/{disputeId}/attachments/{attachmentId} request, specifying the dispute id and the attachmentId as path parameters.
Get an attachment by attachmentId
-
If you want to view the attachment, Base64-decode the
contentstring from the response. The response also contains theid, thefileNameandattachmentTypetype of attachment. Response
Get a list of attachments
You can retrieve a list of all attachments associated with a specific dispute.-
Make a GET /disputes/{disputeId}/attachments/ request, specifying the disputeId as a path parameter.
Get a list of attachments associated with a dispute
-
The response contains all attachments associated with the dispute.
Response
Delete an attachment
You may want to delete an attachment associated with a dispute in some cases. For example, your cardholder uploaded the wrong attachment and wants to remove it from the dispute. Adyen may retain files attached to disputes for auditing and compliance purposes. To delete an attachment:-
Make a DELETE /disputes/{disputeId}/attachments/{attachmentId} request, specifying the disputeId and attachmentId as path parameters.
Remove an attachment from a dispute
- Check that you receive an HTTP 204 - No Content status code as a response. This indicates that your request to delete the attachment was successful. If you want to upload a file attachment you recently deleted from a dispute, make sure to provide a unique name for the file before you upload it.
