Before you submit a dispute, we recommend that you include attachments as supporting information. Examples of supporting information are screenshots or photos of receipts, email communication with the merchant, or any other information the card scheme can review to make a decision on the dispute.
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.
Parameter name Type Required Description attachmentType string The type of information contained in the attachment.
Possible values:- receipt
- correspondence
- other
fileName string The name of the attachment, including its filename extension. Minimum length: four characters, Maximum length: 17 characters, including the extension type.
Supported filename extensions:- jpeg
- tiff
- airfare24_03.jpeg
- hotel24_0315.jpeg
content string The content of the image. An attachment must be Base64-encoded data. -
In the response, note the attachmentId. You need the ID if you want to later get the attachment, or delete the attachment.
Parameter name Type Description attachmentId string The unique identifier of the attachment.
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.
-
If you want to view the attachment, Base64-decode the
content
string from the response. The response also contains theid
, thefileName
andattachmentType
type of attachment.
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.
-
The response contains all attachments associated with the dispute.
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.
-
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.