Download OpenAPI specification:Download
The Disputes API offers Klarna partners and merchants an easy way to handle their customer Disputes.
Utilizing the available endpoints, you are able to:
Klarna merchants consuming Disputes API are authenticated via the OAuth 2.0 protocol. As part of your credentials you have the possibility to specify a webhook endpoint to receive notifications when your input is needed for a dispute.
Read more on the Disputes process.
Retrieve a list of Disputes, segregated by a variety of filter 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/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: YOUR_API_KEY_HERE'
{- "disputes": [
- {
- "capture_id": "4ba29b50-be7b-44f5-a492-113e6a865e22",
- "charged_disputes_fee": {
- "amount": 100,
- "currency": "SEK"
}, - "closed_at": "2018-12-03T10:26:06Z",
- "closing_reason": "resolved",
- "closing_reason_detailed": "merchant_did_not_reply_to_dispute_request",
- "deadline_expires_at": "2018-12-03T00:00:00Z",
- "dispute_krn": "krn:klarna:eu1:dispute:faulty-goods:256947",
- "disputed_amount": {
- "amount": 0,
- "currency": "string"
}, - "disputed_order_lines": [
- {
- "disputed_quantity": 2,
- "reference": "45aa52f387871e3a210645d4"
}
], - "investigation_status": "closed",
- "merchant": {
- "merchant_id": "K000001",
- "name": "Klarna"
}, - "opened_at": "2018-12-03T10:26:06Z",
- "order": {
- "created_at": "2018-12-03T10:26:06Z",
- "merchant_data": "{'foo':'bar','baz':true }",
- "merchant_reference1": "45aa52f387871e3a210645d4",
- "merchant_reference2": "45aa52f387871e3a210645d4",
- "order_amount": 1947,
- "order_id": "8922c722-bd7a-449b-ad54-d9c2cc52dff9",
- "purchase_currency": "SEK"
}, - "reason": "goods_not_received",
- "region": "EU",
- "requests": [
- {
- "responses": [
- {
- "attachments": [
- null
], - "comment": "All the requested fields are addressed as requested",
- "created_at": "2018-12-03T10:26:06Z",
- "requested_fields": {
- "capture_id": null,
- "customer_has_been_contacted": null,
- "delivered_with_proof": null,
- "delivery_address": null,
- "goods_returned": null,
- "is_order_shipped": null,
- "is_shipping_company_contacted": null,
- "is_travel_order": null,
- "last_digits_of_phone_for_delivery_notification": null,
- "list_of_shipments": [ ],
- "order_already_shipped": null,
- "order_already_used": null,
- "order_is_cancellable": null,
- "order_is_refundable": null,
- "order_type": null,
- "proof_of_delivery": [ ],
- "received_payment": null,
- "return_info": null,
- "service_already_used": null,
- "service_delivered_by": null,
- "shipment": null,
- "shipment_country": null,
- "shipping_carrier": null,
- "shipping_date": null,
- "tracking_id": null
}, - "response_id": 2
}
], - "attachments": [
- {
- "attachment_id": 3,
- "filename": "receipt.pdf"
}
], - "comment": "Consumer claimed delivered goods were faulty",
- "created_at": "2018-12-03T10:26:06Z",
- "optional_requested_fields": [
- "tracking_id",
- "shipping_date"
], - "request_id": 1,
- "requested_fields": [
- "tracking_id",
- "shipping_date"
]
}
], - "status": "open"
}
], - "pagination": {
- "count": 10,
- "limit": 30,
- "next_page": [
- "1636451517476",
- "283316"
], - "total": 100
}
}
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/v2/disputes/{dispute_krn}' \ -H 'Authorization: YOUR_API_KEY_HERE'
{- "capture_id": "4ba29b50-be7b-44f5-a492-113e6a865e22",
- "charged_disputes_fee": {
- "amount": 100,
- "currency": "SEK"
}, - "closed_at": "2018-12-03T10:26:06Z",
- "closing_reason": "resolved",
- "closing_reason_detailed": "merchant_did_not_reply_to_dispute_request",
- "deadline_expires_at": "2018-12-03T00:00:00Z",
- "dispute_krn": "krn:klarna:eu1:dispute:faulty-goods:256947",
- "disputed_amount": {
- "amount": 0,
- "currency": "string"
}, - "disputed_order_lines": [
- {
- "disputed_quantity": 2,
- "reference": "45aa52f387871e3a210645d4"
}
], - "investigation_status": "closed",
- "merchant": {
- "merchant_id": "K000001",
- "name": "Klarna"
}, - "opened_at": "2018-12-03T10:26:06Z",
- "order": {
- "created_at": "2018-12-03T10:26:06Z",
- "merchant_data": "{'foo':'bar','baz':true }",
- "merchant_reference1": "45aa52f387871e3a210645d4",
- "merchant_reference2": "45aa52f387871e3a210645d4",
- "order_amount": 1947,
- "order_id": "8922c722-bd7a-449b-ad54-d9c2cc52dff9",
- "purchase_currency": "SEK"
}, - "reason": "goods_not_received",
- "region": "EU",
- "requests": [
- {
- "responses": [
- {
- "attachments": [
- {
- "attachment_id": 3,
- "filename": "receipt.pdf"
}
], - "comment": "All the requested fields are addressed as requested",
- "created_at": "2018-12-03T10:26:06Z",
- "requested_fields": {
- "capture_id": "244e011b-aa7f-45b2-8d51-a18c2d6aab08",
- "customer_has_been_contacted": "yes",
- "delivered_with_proof": "yes",
- "delivery_address": "Sveavägen 46, 111 34 Stockholm",
- "goods_returned": "yes_in_full",
- "is_order_shipped": "yes_in_full",
- "is_shipping_company_contacted": "yes_and_the_shipping_company_is_currently_attempting_to_recall_the_order",
- "is_travel_order": "yes_will_cancel",
- "last_digits_of_phone_for_delivery_notification": "123",
- "list_of_shipments": [
- {
- "capture_id": null,
- "is_shipping_company_contacted": null,
- "shipping_carrier": null,
- "shipping_date": null,
- "tracking_id": null
}
], - "order_already_shipped": "yes_in_full",
- "order_already_used": "yes_in_full",
- "order_is_cancellable": "yes_will_cancel",
- "order_is_refundable": "yes_in_full",
- "order_type": "services",
- "proof_of_delivery": [
- null
], - "received_payment": "yes_will_make_changes_to_order",
- "return_info": "yes_will_make_changes_to_order",
- "service_already_used": "yes",
- "service_delivered_by": "email",
- "shipment": {
- "capture_id": "244e011b-aa7f-45b2-8d51-a18c2d6aab08",
- "is_shipping_company_contacted": "yes_and_the_shipping_company_is_currently_attempting_to_recall_the_order",
- "shipping_carrier": "postnord",
- "shipping_date": "2020-07-27T21:30:00Z",
- "tracking_id": "15505460368542E"
}, - "shipment_country": "at",
- "shipping_carrier": "postnord",
- "shipping_date": "2020-07-27T21:30:00Z",
- "tracking_id": "15505460368542E"
}, - "response_id": 2
}
], - "attachments": [
- {
- "attachment_id": 3,
- "filename": "receipt.pdf"
}
], - "comment": "Consumer claimed delivered goods were faulty",
- "created_at": "2018-12-03T10:26:06Z",
- "optional_requested_fields": [
- "tracking_id",
- "shipping_date"
], - "request_id": 1,
- "requested_fields": [
- "tracking_id",
- "shipping_date"
]
}
], - "status": "open"
}
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/v2/disputes/{dispute_krn}/accept-loss' \ -H 'Authorization: YOUR_API_KEY_HERE'
{- "error_code": "MISSING_PARAMETER",
- "error_message": "Invalid request received, missing request body"
}
Uploads an attachment to be linked to a dispute reponse
Attachment uploaded successfully
Incomplete request, missing required parameters.
Dispute not found
curl -i -X POST \ 'https://api.klarna.com/v2/disputes/{dispute_krn}/attachments' \ -H 'Authorization: YOUR_API_KEY_HERE' \ -H 'Content-Type: multipart/form-data' \ -F filename=string \ -F file=string
{- "attachment_id": 3,
- "filename": "receipt.pdf"
}
Download a file attachment linked to a specific request.
File download of attachment
Attachment not found
curl -i -X GET \ 'https://api.klarna.com/v2/disputes/{dispute_krn}/requests/{request_id}/attachments/{attachment_id}' \ -H 'Authorization: YOUR_API_KEY_HERE'
Respond to a Dispute request.
Response to add to request
Created response
Incomplete request, missing required parameters.
Dispute request not found
Dispute state incompatible
{- "attachments": [
- 0
], - "comment": "All the requested fields are addressed as requested",
- "requested_fields": {
- "capture_id": "244e011b-aa7f-45b2-8d51-a18c2d6aab08",
- "customer_has_been_contacted": "yes",
- "delivered_with_proof": "yes",
- "delivery_address": "Sveavägen 46, 111 34 Stockholm",
- "goods_returned": "yes_in_full",
- "is_order_shipped": "yes_in_full",
- "is_shipping_company_contacted": "yes_and_the_shipping_company_is_currently_attempting_to_recall_the_order",
- "is_travel_order": "yes_will_cancel",
- "last_digits_of_phone_for_delivery_notification": "123",
- "list_of_shipments": [
- {
- "capture_id": "244e011b-aa7f-45b2-8d51-a18c2d6aab08",
- "is_shipping_company_contacted": "yes_and_the_shipping_company_is_currently_attempting_to_recall_the_order",
- "shipping_carrier": "postnord",
- "shipping_date": "2020-07-27T21:30:00Z",
- "tracking_id": "15505460368542E"
}
], - "order_already_shipped": "yes_in_full",
- "order_already_used": "yes_in_full",
- "order_is_cancellable": "yes_will_cancel",
- "order_is_refundable": "yes_in_full",
- "order_type": "services",
- "proof_of_delivery": [
- null
], - "received_payment": "yes_will_make_changes_to_order",
- "return_info": "yes_will_make_changes_to_order",
- "service_already_used": "yes",
- "service_delivered_by": "email",
- "shipment": {
- "capture_id": "244e011b-aa7f-45b2-8d51-a18c2d6aab08",
- "is_shipping_company_contacted": "yes_and_the_shipping_company_is_currently_attempting_to_recall_the_order",
- "shipping_carrier": "postnord",
- "shipping_date": "2020-07-27T21:30:00Z",
- "tracking_id": "15505460368542E"
}, - "shipment_country": "at",
- "shipping_carrier": "postnord",
- "shipping_date": "2020-07-27T21:30:00Z",
- "tracking_id": "15505460368542E"
}
}
{- "attachments": [
- {
- "attachment_id": 3,
- "filename": "receipt.pdf"
}
], - "comment": "All the requested fields are addressed as requested",
- "created_at": "2018-12-03T10:26:06Z",
- "requested_fields": {
- "capture_id": "244e011b-aa7f-45b2-8d51-a18c2d6aab08",
- "customer_has_been_contacted": "yes",
- "delivered_with_proof": "yes",
- "delivery_address": "Sveavägen 46, 111 34 Stockholm",
- "goods_returned": "yes_in_full",
- "is_order_shipped": "yes_in_full",
- "is_shipping_company_contacted": "yes_and_the_shipping_company_is_currently_attempting_to_recall_the_order",
- "is_travel_order": "yes_will_cancel",
- "last_digits_of_phone_for_delivery_notification": "123",
- "list_of_shipments": [
- {
- "capture_id": "244e011b-aa7f-45b2-8d51-a18c2d6aab08",
- "is_shipping_company_contacted": "yes_and_the_shipping_company_is_currently_attempting_to_recall_the_order",
- "shipping_carrier": "postnord",
- "shipping_date": "2020-07-27T21:30:00Z",
- "tracking_id": "15505460368542E"
}
], - "order_already_shipped": "yes_in_full",
- "order_already_used": "yes_in_full",
- "order_is_cancellable": "yes_will_cancel",
- "order_is_refundable": "yes_in_full",
- "order_type": "services",
- "proof_of_delivery": [
- null
], - "received_payment": "yes_will_make_changes_to_order",
- "return_info": "yes_will_make_changes_to_order",
- "service_already_used": "yes",
- "service_delivered_by": "email",
- "shipment": {
- "capture_id": "244e011b-aa7f-45b2-8d51-a18c2d6aab08",
- "is_shipping_company_contacted": "yes_and_the_shipping_company_is_currently_attempting_to_recall_the_order",
- "shipping_carrier": "postnord",
- "shipping_date": "2020-07-27T21:30:00Z",
- "tracking_id": "15505460368542E"
}, - "shipment_country": "at",
- "shipping_carrier": "postnord",
- "shipping_date": "2020-07-27T21:30:00Z",
- "tracking_id": "15505460368542E"
}, - "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/v2/disputes/{dispute_krn}/requests/{request_id}/responses/{response_id}/attachments/{attachment_id}' \ -H 'Authorization: YOUR_API_KEY_HERE'