> 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/submit-dispute/llms.txt. > For AI client integration (Claude Code, Cursor, etc.), connect to the MCP server at https://docs.mangopay.com/_mcp/server. # Submit a Dispute PUT https://api.sandbox.mangopay.com/v2.01/{ClientId}/disputes/{DisputeId}/submit Content-Type: application/json Submit a Dispute This call is used both for the initial submission of the dispute and any resubmission made afterwards (in case more documents are required for instance). Reference: https://docs.mangopay.com/api-reference/disputes/submit-dispute ## 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. - `DisputeId` (string, required) — The unique identifier of the dispute. ### Body (application/json) This endpoint expects a SubmitADisputeRequest. - `ContestedFunds` (SubmitADisputeRequestContestedFunds, required) — Information about the debited funds. ## Response ### 200 Success - `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` The nature of the initial transaction being disputed. - `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` (DisputeResponseDisputedFunds, optional) — Information about the amount the disputed funds. This amount can be lower than the initial transaction amount. - `ContestedFunds` (DisputeResponseContestedFunds, 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` (DisputeResponseDisputeReason, 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. ## Errors ### 400 Bad Request Error Bad Request - `Message` (string, optional) — Description of the error. - `Type` (string, optional) — The category of the error. - `Id` (string, optional) — Unique identifier of the error instance, useful when contacting Mangopay for support. - `Date` (double, optional) — Unix timestamp (UTC) of the date and time the error was triggered. - `errors` (map from string to string, optional, nullable) — Object containing one or more field-level errors. ## Types ### SubmitADisputeRequestContestedFunds Information about the debited funds. - `Currency` (string, required) — **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, required) — 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`. ### DisputeResponseDisputedFunds 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`. ### DisputeResponseContestedFunds 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`. ### DisputeResponseDisputeReason 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 **Request** ```json { "body": { "ContestedFunds": { "Amount": 1200, "Currency": "EUR" } } } ``` **Response** ```json { "InitialTransactionId": "158596153", "InitialTransactionType": "PAYIN", "InitialTransactionNature": "REGULAR", "DisputeType": "CONTESTABLE", "ContestDeadlineDate": 1673049599, "DisputedFunds": { "Currency": "EUR", "Amount": 1200 }, "ContestedFunds": { "Currency": "EUR", "Amount": 1200 }, "Status": "SUBMITTED", "StatusMessage": null, "DisputeReason": { "DisputeReasonType": "UNKNOWN", "DisputeReasonMessage": "This is a test dispute" }, "ResultCode": "", "ResultMessage": null, "Id": "159102965", "Tag": null, "CreationDate": 1672411848, "ClosedDate": null, "RepudiationId": "159102966" } ``` **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 Dispute from mangopay.utils import Money dispute = Dispute( id = 'dispute_m_01HQT6F2162Q1791CZR5RM4WSD' ) submit_dispute = Dispute.contest(self = dispute, money=Money(amount=2000, currency='EUR')) pprint(submit_dispute) ``` ```javascript const mangopayInstance = require('mangopay4-nodejs-sdk') const mangopay = new mangopayInstance({ clientId: 'your-client-id', clientApiKey: 'your-api-key', }) // When submitting a dispute for the first time let myDispute = { Id: '193572349', contestedFunds: { Currency: 'EUR', Amount: '10', }, } const submitDispute = async (disputeId, contestedFunds) => { return await mangopay.Disputes.contestDispute(disputeId, contestedFunds) .then((response) => { console.info(response) return response }) .catch((err) => { console.log(err) return false }) } submitDispute(myDispute.Id, myDispute.contestedFunds) // When resubmitting the dispute (in case more documents are required) let myDispute = { Id: '192746554', } const resubmitDispute = async (disputeId) => { return await mangopay.Disputes.resubmitDispute(disputeId) .then((response) => { console.info(response) return response }) .catch((err) => { console.log(err) return false }) } resubmitDispute(myDispute.Id) ``` ```java import com.google.gson.Gson; import com.google.gson.GsonBuilder; import com.mangopay.MangoPayApi; import com.mangopay.core.Money; import com.mangopay.core.enumerations.CurrencyIso; import com.mangopay.entities.Dispute; public class SubmitDispute { 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 disputeId = "dispute_m_01J2H7DQES2T3NH0QEN3HV3MED"; Dispute submitDispute = mangopay.getDisputeApi().contestDispute(new Money(CurrencyIso.EUR, 500), disputeId); Gson prettyPrint = new GsonBuilder().setPrettyPrinting().create(); String prettyJson = prettyPrint.toJson(submitDispute); System.out.println(prettyJson); } } ``` ```csharp using MangoPay.SDK; using MangoPay.SDK.Core.Enumerations; 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 disputeId = "dispute_m_01J41GEVRQN3W1C4YRK7NC04QT"; Money contestedFunds = new Money { Amount = 1000, Currency = CurrencyIso.EUR }; var submitDispute = await api.Disputes.ContestDisputeAsync(contestedFunds, disputeId); string prettyPrint = JsonConvert.SerializeObject(submitDispute, Formatting.Indented); Console.WriteLine(prettyPrint); } } ``` ```php Config->ClientId = 'your-client-id'; $api->Config->ClientPassword = 'your-api-key'; $api->Config->TemporaryFolder = 'tmp/'; // To submit a dispute for the first time try { $disputeId = '199385842'; $contestedFunds = new \MangoPay\Money(); $contestedFunds->Amount = 500; $contestedFunds->Currency = 'EUR'; $response = $api->Disputes->ContestDispute($disputeId, $contestedFunds); print_r($response); } catch(MGPResponseException $e) { print_r($e); } catch(MGPException $e) { print_r($e); } // To submit a reopened dispute try { $disputeId = '199385842'; $response = $api->Disputes->ResubmitDispute($disputeId); 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 # When submitting a dispute for the first time def submitDispute(disputeId, contestedFunds) begin response = MangoPay::Dispute.contest(disputeId, contestedFunds) puts response return response rescue MangoPay::ResponseError => error puts "Failed to submit Dispute: #{error.message}" puts "Error details: #{error.details}" return false end end myDispute = { Id:'194413022' } myContestedFunds = { Currency: 'EUR', Amount: 250 } submitDispute(myDispute[:Id], myContestedFunds) # When resubmitting the dispute (in case more documents are required) def resubmitDispute(disputeId) begin response = MangoPay::Dispute.resubmit(disputeId) puts response return response rescue MangoPay::ResponseError => error puts "Failed to submit Dispute: #{error.message}" puts "Error details: #{error.details}" return false end end myDispute = { Id: '194413022' } resubmitDispute(myDispute[:Id]) ```