> For clean Markdown of any page, append .md to the page URL. > For a complete documentation index, see https://docs.mangopay.com/api-reference/disputes/list-disputes-user/llms.txt. > For AI client integration (Claude Code, Cursor, etc.), connect to the MCP server at https://docs.mangopay.com/_mcp/server. # List Disputes for a User GET https://api.sandbox.mangopay.com/v2.01/{ClientId}/users/{UserId}/disputes List Disputes for a User Reference: https://docs.mangopay.com/api-reference/disputes/list-disputes-user ## Authentication - `Authorization` header (bearer token, required) — Bearer authentication of the form `Bearer `, where token is your auth token. If your platform is using a [proxy](/guides/sca/proxy-management) to take SCA-triggering action on behalf of users, you also need to integrate [mTLS authentication](/guides/sca/platform) and use the `api-mtls` base URL. ## Servers - `https://api.sandbox.mangopay.com` (Sandbox, default) - `https://api.mangopay.com` (Production) - `https://api-mtls.sandbox.mangopay.com` (mTLS Sandbox) - `https://api-mtls.mangopay.com` (mTLS Production) ## Request ### Path parameters - `ClientId` (string, required) — Platform's API account identifier, associated with the API key. - `UserId` (string, required) — The unique identifier of the user. ### Query parameters - `BeforeDate` (integer, optional) — The date before which the object was created (based on the object's `CreationDate` parameter). You can filter on a specific time range by using both the `AfterDate` and `BeforeDate` query parameters. - `AfterDate` (integer, optional) — The date after which the object was created (based on the object's `CreationDate` parameter). You can filter on a specific time range by using both the `AfterDate` and `BeforeDate` query parameters. - `Status` (string, optional) — **Allowed values:** `CREATED`, `PENDING_CLIENT_ACTION`, `SUBMITTED`, `PENDING_BANK_ACTION`, `CLOSED`, `REOPENED_PENDING_CLIENT_ACTION` The status of the Dispute. You can filter on multiple values by separating them with a comma. - `DisputeType` (string, optional) — **Allowed values:** `CONTESTABLE`, `NOT_CONTESTABLE`, `RETRIEVAL` The type of the Dispute. You can filter on multiple values by separating them with a comma. ## Response ### 200 Success - `Array (Disputes)` (list of ListAllDisputesResponseArrayDisputesItems, optional) — The list of disputes automatically created by Mangopay. ## Types ### ListAllDisputesResponseArrayDisputesItems - `Object (Dispute)` (ListAllDisputesResponseArrayDisputesItemsObjectDispute, optional) — The dispute automatically created by Mangopay. ### ListAllDisputesResponseArrayDisputesItemsObjectDispute The dispute automatically created by Mangopay. - `InitialTransactionId` (string, optional) — The unique identifier of the initial pay-in being disputed. - `InitialTransactionType` (string, optional) — **Returned values:** `PAYIN` The type of the initial transaction being disputed. - `InitialTransactionNature` (string, optional) — **Returned values:** `REGULAR`, `REPUDIATION`, `REFUND`, `SETTLEMENT` The nature of the initial transaction being refunded, providing more information about the context in which the transaction occurred: - REGULAR – Relative to most of the transactions (pay-ins, payouts, and transfers) in a usual workflow. - REPUDIATION – Automatic withdrawal of funds from the platform's repudiation wallet as part of the dispute process (when the user requested a chargeback). - REFUND – Reimbursement of a transaction to the user (pay-in refund), to a wallet (transfer refund), or of a payout (payout refund, only initiated by Mangopay). - SETTLEMENT – Transfer made to the repudiation wallet by the platform to settle the credit from a repudiation following a lost dispute. - `DisputeType` (string, optional) — **Returned values:** `CONTESTABLE`, `NOT_CONTESTABLE`, `RETRIEVAL` The type of dispute: - `CONTESTABLE` – Dispute for which the chargeback can be contested by providing proof (i.e., Dispute Documents) justifying the original transaction. - `NOT_CONTESTABLE` – Dispute that is automatically closed after its creation, without any action possible for the platform. - `RETRIEVAL` – Dispute that is actually a chargeback warning issued by the bank. The platform is required to provide documents, but no funds will be taken from the Repudiation Wallet. - `ContestDeadlineDate` (integer, optional) — The date and time until which the platform can contest the dispute (i.e., the `Status` is set to `SUBMITTED`). This date is defined by the issuing bank of the initial transaction and may usually vary between 7 to 18 days. Once the deadline passes, the dispute `Status` is automatically set to `CLOSED`. - `DisputedFunds` (ListAllDisputesResponseArrayDisputesItemsObjectDisputeDisputedFunds, optional) — Information about the amount the disputed funds. This amount can be lower than the initial transaction amount. - `ContestedFunds` (ListAllDisputesResponseArrayDisputesItemsObjectDisputeContestedFunds, optional) — Information about the contested funds, in other words, the amount that you wish to contest. This amount can be lower than the disputed funds amount. - `Status` (string, optional) — **Returned values:** `CREATED`, `PENDING_CLIENT_ACTION`, `SUBMITTED`, `PENDING_BANK_ACTION`, `REOPENED_PENDING_CLIENT_ACTION`, `CLOSED` The status of the dispute: - `CREATED` – The dispute is created. - `PENDING_CLIENT_ACTION` – The dispute was not closed automatically upon its creation, it now requires some actions from the platform (either submission after providing the relevant proofs or closing). - `SUBMITTED` – The dispute is submitted by the platform for the Mangopay team to review the documents. - `PENDING_BANK_ACTION` – Mangopay accepted the documents and passed them on to the bank for them to review the dispute contestation. They will either reject or accept the contestation, or require further documents. - `REOPENED_PENDING_CLIENT_ACTION` – Mangopay didn't accept the documents and requires more information or documents before sending the documents to the bank. - `CLOSED` – The dispute is closed. - `StatusMessage` (string, optional) — Additional information about the dispute `Status` communicated by Mangopay teams. - `DisputeReason` (ListAllDisputesResponseArrayDisputesItemsObjectDisputeDisputeReason, optional) — Information about the reasons for the dispute. - `ResultCode` (string, optional) — **Returned values:** `LOST`, `WON`, `VOID` The result of the dispute for the platform, which can be: - `LOST` – The platform lost the dispute and must settle its debt to Mangopay with a Settlement Transfer. - `WON` – The platform won the dispute, the disputed funds will be credited back to the Repudiation Wallet. - `VOID` – The dispute has been canceled. - `ResultMessage` (string, optional) — The explanation of the result code. - `Id` (string, optional) — Max length: 128 characters (see [data formats](/api-reference/overview/data-formats) for details) The unique identifier of the object. - `Tag` (string, optional) — Max. length: 255 characters Custom data that you can add to this object, such as unique identifiers in your system. To store multiple values, you can serialize them into a single string, for example a JSON object: `"{\"id_1\":AB123,\"id_2\":DE456}"`. - `CreationDate` (integer, optional) — Unix timestamp (UTC) of the date and time the object was created. - `ClosedDate` (integer, optional) — The date and time the dispute was closed (i.e., its `Status` is set to `CLOSED`). **Note:** This value will be `null` for any Dispute closed before February 16th, 2023. - `RepudiationId` (string, optional) — The unique identifier of the repudiation. ### ListAllDisputesResponseArrayDisputesItemsObjectDisputeDisputedFunds Information about the amount the disputed funds. This amount can be lower than the initial transaction amount. - `Currency` (string, optional) — **Allowed values:** The three-letter ISO 4217 code (EUR, GBP, etc.) of a supported currency (depends on feature, contract, and activation settings). The currency of the amount. - `Amount` (integer, optional) — The amount of the currency in its minor unit. For example, EUR 12.60 would be represented as `1260` whereas JPY 12 would be represented as just `12`. ### ListAllDisputesResponseArrayDisputesItemsObjectDisputeContestedFunds Information about the contested funds, in other words, the amount that you wish to contest. This amount can be lower than the disputed funds amount. - `Currency` (string, optional) — **Allowed values:** The three-letter ISO 4217 code (EUR, GBP, etc.) of a supported currency (depends on feature, contract, and activation settings). The currency of the amount. - `Amount` (integer, optional) — The amount of the currency in its minor unit. For example, EUR 12.60 would be represented as `1260` whereas JPY 12 would be represented as just `12`. ### ListAllDisputesResponseArrayDisputesItemsObjectDisputeDisputeReason Information about the reasons for the dispute. - `DisputeReasonType` (string, optional) — The reason for the dispute. - `DisputeReasonMessage` (string, optional) — Additional information about the reason for the dispute sent by Mangopay teams. ## Examples **Response** ```json [ { "ClosedDate": null, "ContestDeadlineDate": 1673049599, "ContestedFunds": { "Amount": 1200, "Currency": "EUR" }, "CreationDate": 1672411848, "DisputeReason": { "DisputeReasonMessage": "This is a test dispute", "DisputeReasonType": "UNKNOWN" }, "DisputeType": "CONTESTABLE", "DisputedFunds": { "Amount": 1200, "Currency": "EUR" }, "Id": "159102965", "InitialTransactionId": "158596153", "InitialTransactionNature": "REGULAR", "InitialTransactionType": "PAYIN", "RepudiationId": "159102966", "ResultCode": "", "ResultMessage": null, "Status": "PENDING_CLIENT_ACTION", "StatusMessage": null, "Tag": null } ] ``` **SDK Code** ```python from pprint import pprint import mangopay mangopay.client_id='your-client-id' mangopay.apikey='your-api-key' from mangopay.api import APIRequest handler = APIRequest(sandbox=True) from mangopay.resources import NaturalUser, Dispute natural_user = NaturalUser.get('user_m_01HQK25M6KVHKDV0S36JY9NRKR') disputes = Dispute.all(user_id = natural_user.id) for dispute in disputes: print() pprint(dispute._data) ``` ```javascript const mangopayInstance = require('mangopay4-nodejs-sdk') const mangopay = new mangopayInstance({ clientId: 'your-client-id', clientApiKey: 'your-api-key', }) let myUser = { Id: '146476890', } const listDisputesUser = async (userId) => { return await mangopay.Disputes.getDisputesForUser(userId) .then((response) => { console.info(response) return response }) .catch((err) => { console.log(err) return false }) } listDisputesUser(myUser.Id) ``` ```java import com.google.gson.Gson; import com.google.gson.GsonBuilder; import com.mangopay.MangoPayApi; import com.mangopay.entities.Dispute; import java.util.List; public class ListUserDisputes { public static void main(String[] args) throws Exception { MangoPayApi mangopay = new MangoPayApi(); mangopay.getConfig().setClientId("your-client-id"); mangopay.getConfig().setClientPassword("your-api-key"); var userId = "user_m_01HQK25M6KVHKDV0S36JY9NRKR"; List disputes = mangopay.getDisputeApi().getDisputesForUser(userId, null, null, null); for (Dispute dispute : disputes) { Gson prettyPrint = new GsonBuilder().setPrettyPrinting().create(); String prettyJson = prettyPrint.toJson(dispute); System.out.println(prettyJson); } } } ``` ```csharp using MangoPay.SDK; using MangoPay.SDK.Entities; using Newtonsoft.Json; class Program { static async Task Main(string[] args) { MangoPayApi api = new MangoPayApi(); api.Config.ClientId = "your-client-id"; api.Config.ClientPassword = "your-api-key"; var userId = "user_m_01J2TZ261WZNDM0ZDRWGDYA4GN"; var disputes = await api.Disputes.GetDisputesForUserAsync(userId, new Pagination(1, 100), null); string prettyPrint = JsonConvert.SerializeObject(disputes, Formatting.Indented); Console.WriteLine(prettyPrint); } } ``` ```php Config->ClientId = 'your-client-id'; $api->Config->ClientPassword = 'your-api-key'; $api->Config->TemporaryFolder = 'tmp/'; try { $userId = '146476890'; $response = $api->Disputes->GetDisputesForUser($userId); print_r($response); } catch(MGPResponseException $e) { print_r($e); } catch(MGPException $e) { print_r($e); } ``` ```ruby require 'mangopay' MangoPay.configure do |client| client.preproduction = true client.client_id = 'your-client-id' client.client_apiKey = 'your-api-key' client.log_file = File.join(Dir.pwd, 'mangopay.log') end def listUserDisputes(userId) begin response = MangoPay::Dispute.fetch_for_user(userId) puts response return response rescue MangoPay::ResponseError => error puts "Failed to fetch Dispute: #{error.message}" puts "Error details: #{error.details}" return false end end myUser = { Id: '146476890' } listUserDisputes(myUser[:Id]) ```