Download OpenAPI specification:Download
The Disputes API offers Klarna partners and merchants an easy way to handle customer disputes.
Use the available endpoints to:
Please note that there are two ways to authenticate:
x-klarna-basic-mid
header to the merchant ID.Before you get started, please make sure you understand the disputes process.
YYYY-MM-DDTHH:mm:ss.sssZ
. Please note it includes ms.Self onboarding for merchants. Partner related merchants cannot self onboard through this API
Merchant successfully onboarded or was onboarded already
Merchant has a partner relation. Enroll is not permitted
curl -i -X POST \ https://api.klarna.com/disputes/v2/enroll \ -H 'Authorization: Bearer <YOUR_TOKEN_HERE>'
Get a list of disputes, filtered by a variety of parameters parameters
A paginated list of authorized disputes
Invalid request, check query parameters.
User not authorized to access the resource.
Dispute not found
curl -i -X GET \ 'https://api.klarna.com/disputes/v2/disputes?merchant_id=string&order_id=string&investigation_status=opened&reason=goods_not_received&sort_by=opened_at&limit=1&next_page=string&merchant_references1=string&merchant_references2=string' \ -H 'Authorization: Bearer <YOUR_TOKEN_HERE>'
{- "disputes": [
- {
- "capture_id": "6f343add-9c3d-4253-b449-fefe89d7b803",
- "deadline_expires_at": "2020-05-22T00:00:00.000Z",
- "dispute_krn": "krn:klarna:eu1:dispute:return:266091",
- "disputed_order_lines": [
- {
- "disputed_quantity": 5,
- "reference": "45aa52f387871e3a210645d4"
}
], - "investigation_status": "unresolved",
- "merchant": {
- "merchant_id": "K000000",
- "name": "Merchant"
}, - "opened_at": "2020-05-08T08:31:00.000Z",
- "order": {
- "created_at": "2020-04-14T17:42:12.512Z",
- "merchant_reference1": "f420e0e1-971b-417a-8ece-2626387eff36",
- "merchant_reference2": "3d29e0e5-3332-480b-a335-2dfe16e7ed5d",
- "order_amount": 39900,
- "order_id": "922c722-bd7a-449b-ad54-d9c2cc52dff9",
- "purchase_currency": "SEK"
}, - "reason": "goods_not_received",
- "region": "EU",
- "requests": [
- {
- "responses": [
- {
- "attachments": [
- {
- "attachment_id": 1,
- "filename": "shipment_receipt.pdf"
}
], - "comment": "Comment from merchant",
- "created_at": "2020-05-09T09:32:18.315Z",
- "requested_fields": {
- "tracking_id": "ZCFSY3ABH3G2"
}, - "response_id": 1
}
], - "attachments": [ ],
- "comment": "Please provide tracking ID of shipment",
- "created_at": "2020-05-08T08:32:14.642Z",
- "optional_requested_fields": [
- "shipping_date"
], - "request_id": 1,
- "requested_fields": [
- "tracking_id"
]
}, - {
- "attachments": [ ],
- "comment": "Follow up comment from agent requesting another field",
- "created_at": "2020-05-09T10:15:02.951Z",
- "optional_requested_fields": [ ],
- "request_id": 2,
- "requested_fields": [
- "shipping_carrier"
]
}
]
}
], - "pagination": {
- "count": 1,
- "limit": 25,
- "next_page": [
- "1636451517476",
- "283316"
], - "total": 372
}
}
Fetch a fully detailed version of a Dispute, including all the associated requests and responses.
Complete dispute with all requests and responses
Dispute not found
curl -i -X GET \ 'https://api.klarna.com/disputes/v2/disputes/{dispute_krn}' \ -H 'Authorization: Bearer <YOUR_TOKEN_HERE>'
{- "capture_id": "6f343add-9c3d-4253-b449-fefe89d7b803",
- "deadline_expires_at": "2020-05-22T00:00:00.000Z",
- "dispute_krn": "krn:klarna:eu1:dispute:return:266091",
- "investigation_status": "unresolved",
- "merchant": {
- "merchant_id": "K000000",
- "name": "Merchant"
}, - "opened_at": "2020-05-08T08:31:00.000Z",
- "order": {
- "created_at": "2020-04-14T17:42:12.512Z",
- "merchant_reference1": "f420e0e1-971b-417a-8ece-2626387eff36",
- "merchant_reference2": "3d29e0e5-3332-480b-a335-2dfe16e7ed5d",
- "order_amount": 300,
- "order_id": "922c722-bd7a-449b-ad54-d9c2cc52dff9",
- "purchase_currency": "EUR"
}, - "reason": "goods_not_received",
- "region": "EU",
- "requests": [
- {
- "attachments": [ ],
- "comment": "Please provide tracking ID of shipment",
- "created_at": "2020-05-08T08:32:14.642Z",
- "optional_requested_fields": [ ],
- "request_id": 1,
- "requested_fields": [
- "tracking_id"
]
}
]
}
Download a file attachment linked to a specific request.
File download of attachment
Attachment not found
curl -i -X GET \ 'https://api.klarna.com/disputes/v2/disputes/{dispute_krn}/requests/{request_id}/attachments/{attachment_id}' \ -H 'Authorization: Bearer <YOUR_TOKEN_HERE>'
{- "error_code": "DISPUTE_NOT_FOUND",
- "error_message": "A dispute krn 'krn:klarna:eu1:dispute:return:266091' could not be found"
}
Uploads an attachment to be linked to a dispute reponse. Accepts JPG, JPEG, PNG, PDF and DOCX with a maximum size of 7.3MB.
Attachment uploaded successfully
Incomplete request, missing required parameters.
Dispute not found
curl -i -X POST \ 'https://api.klarna.com/disputes/v2/disputes/{dispute_krn}/attachments' \ -H 'Authorization: Bearer <YOUR_TOKEN_HERE>' \ -H 'Content-Type: multipart/form-data' \ -F file=string \ -F filename=receipt.pdf
{- "attachment_id": 3,
- "filename": "receipt.pdf"
}
Respond to a dispute.
Response to add to request
Created response
Incomplete request, missing required parameters.
Dispute request not found
Dispute state incompatible
{- "attachments": [
- 1
], - "comment": "Comment from Merchant",
- "requested_fields": {
- "shipping_date": "2020-04-23T12:00:00.000Z",
- "tracking_id": "JCYPE32JAAR4"
}
}
{- "attachments": [
- {
- "attachment_id": 1,
- "filename": "shipment_receipt.pdf"
}
], - "comment": "Comment from Merchant",
- "created_at": "2020-05-08T12:32:55.697Z",
- "requested_fields": {
- "shipping_date": "2020-04-23T12:00:00.000Z",
- "tracking_id": "JCYPE32JAAR4"
}, - "response_id": 2
}
Download a file attachment linked to a specific request response.
File download of attachment
Attachment not found
curl -i -X GET \ 'https://api.klarna.com/disputes/v2/disputes/{dispute_krn}/requests/{request_id}/responses/{response_id}/attachments/{attachment_id}' \ -H 'Authorization: Bearer <YOUR_TOKEN_HERE>'
{- "error_code": "DISPUTE_NOT_FOUND",
- "error_message": "A dispute krn 'krn:klarna:eu1:dispute:return:266091' could not be found"
}
Accept the loss of a dispute, which will be closed with the chargeback activation
204 no content response
Dispute not found
Dispute state incompatible
curl -i -X POST \ 'https://api.klarna.com/disputes/v2/disputes/{dispute_krn}/accept-loss' \ -H 'Authorization: Bearer <YOUR_TOKEN_HERE>'
{- "error_code": "DISPUTE_NOT_FOUND",
- "error_message": "A dispute krn 'krn:klarna:eu1:dispute:return:266091' could not be found"
}