Before you submit a dispute, 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.
Make sure any photos you attach to your dispute are in-focus and not blurry. Attachments must be in Base64-encoded string format.
Upload an attachment
-
Make a POST /disputes/{disputeId}/attachments request, specifying the disputeId as a path parameter and the following request parameters.
Parameter name Type Required Description attachmentType string yes The type of information contained in the attachment.
Possible values:- receipt
- correspondence
- other
fileName string yes 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 yes The content of the image. An attachment must be Base64-encoded data. Upload an attachment as supporting information for a disputeExpand viewCopy link to code blockCopy codecurl https://balanceplatform-api-test.adyen.com/btl/api/v4/disputes/4VXM2M64Q6OL1111/attachments \ -H 'content-type: application/json' \ -H 'x-api-key: ADYEN_API_KEY' \ -X POST \ -d '{ "fileName" : "240328UAL03.jpeg", "attachmentType" : "receipt", "content": "PITYERi0xLjQKJcOkw7zDtsOfCjIgMCBv+f/ub0j6JPRX+E3EmC==" }' -
In the response, note the attachmentId. You may 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. ResponseExpand viewCopy link to code blockCopy code{ "attachmentId": "TXAT42225223223N5LNW5PC9S62DSH" }
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 attachmentIdExpand viewCopy link to code blockCopy codecurl https://balanceplatform-api-test.adyen.com/btl/api/v4/disputes/40QH6J64D0HK7ZLG/attachments/TXAT42225223223N5LNW5PC9S62DSH \ -H 'content-type: application/json' \ -H 'x-api-key: ADYEN_API_KEY' \ -X GET -
The response contains the attachment
id
, thefileName
, theattachmentType
, and thecontent
of the attachment in base64-encoded string format.ResponseExpand viewCopy link to code blockCopy code{ "id": "TXAT42225223223N5LNW5PC9S62DSH", "fileName": "240328UAL03.jpeg", "attachmentType" : "receipt", "content": "PITYERi0xLjQKJcOkw7zDtsOfCjIgMCBv+f/ub0j6JPRX+E3EmC==" }
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 disputeExpand viewCopy link to code blockCopy codecurl https://balanceplatform-api-test.adyen.com/btl/api/v4/disputes/40QH6J64D0HK7ZLG/attachments \ -H 'content-type: application/json' \ -H 'x-api-key: ADYEN_API_KEY' \ -X GET -
The response contains all attachments associated with the dispute.
ResponseExpand viewCopy link to code blockCopy code[ { "id": "TXAT42225223223N5LNW4CL9S22KNM", "fileName": "240312KLA01.jpeg" }, { "id": "TXAT42225223223N5LNW4CL9S32PFZ", "fileName": "240316UAL02.jpeg" }, { "id": "TXAT42225223223N5LNW5PC9S62DSH", "fileName": "240328UAL03.jpeg" } ]
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 disputeExpand viewCopy link to code blockCopy codecurl https://balanceplatform-api-test.adyen.com/btl/api/v4/disputes/40QH6J64D0HK7ZLG/attachments/HY54TH87HT90FFG9 \ -H 'content-type: application/json' \ -H 'x-api-key: ADYEN_API_KEY' \ -X DELETE \ -d -
If your request to delete the attachment is successful, you receive an HTTP 204 - No Content status code as a response.