{
"ContestedFunds": {
"Currency": "EUR",
"Amount": 1200
}
}
<?php
require_once 'vendor/autoload.php';
use MangoPay\MangoPayApi;
use MangoPay\Libraries\ResponseException as MGPResponseException;
use MangoPay\Libraries\Exception as MGPException;
$api = new MangoPayApi();
$api->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);
}
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)
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])
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);
}
}
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)
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);
}
}
{
"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": {
"DisputeReasonMessage": "This is a test dispute",
"DisputeReasonType": "UNKNOWN"
},
"ResultCode": "",
"ResultMessage": null,
"Id": "159102965",
"Tag": null,
"CreationDate": 1672411848,
"ClosedDate": null,
"RepudiationId": "159102966"
}
Disputes
Submit a Dispute
PUT
/
v2.01
/
{ClientId}
/
disputes
/
{DisputeId}
/
submit
{
"ContestedFunds": {
"Currency": "EUR",
"Amount": 1200
}
}
<?php
require_once 'vendor/autoload.php';
use MangoPay\MangoPayApi;
use MangoPay\Libraries\ResponseException as MGPResponseException;
use MangoPay\Libraries\Exception as MGPException;
$api = new MangoPayApi();
$api->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);
}
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)
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])
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);
}
}
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)
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);
}
}
{
"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": {
"DisputeReasonMessage": "This is a test dispute",
"DisputeReasonType": "UNKNOWN"
},
"ResultCode": "",
"ResultMessage": null,
"Id": "159102965",
"Tag": null,
"CreationDate": 1672411848,
"ClosedDate": null,
"RepudiationId": "159102966"
}
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).
Path parameters
string
required
The unique identifier of the dispute.
Body parameters
object
required
Information about the contested funds, in other words, the amount that you wish to contest.
Note: This amount can be lower than the disputed funds amount.
Note: This amount can be lower than the disputed funds amount.
Show properties
Show properties
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 funds.
integer
required
An amount of money in the smallest sub-division of the currency (e.g., EUR 12.60 would be represented as
1260 whereas JPY 12 would be represented as just 12).Responses
200
200
string
The unique identifier of the initial pay-in being disputed.
string
Returned values:
PAYINThe type of the initial transaction being disputed.string
Returned values:
REGULARThe nature of the initial transaction being disputed.string
Returned values:
CONTESTABLE, NOT_CONTESTABLE, RETRIEVALThe 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.
Unix timestamp
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.string
Information about the disputed funds.
Note: This amount can be lower than the initial transaction amount.
Note: This amount can be lower than the initial transaction amount.
Show properties
Show properties
string
Returned 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 funds.
integer
An amount of money in the smallest sub-division of the currency (e.g., EUR 12.60 would be represented as
1260 whereas JPY 12 would be represented as just 12).object
Information about the contested funds, in other words, the amount that you wish to contest.
Note: This amount can be lower than the disputed funds amount.
Note: This amount can be lower than the disputed funds amount.
Show properties
Show properties
string
Returned 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 funds.
integer
An amount of money in the smallest sub-division of the currency (e.g., EUR 12.60 would be represented as
1260 whereas JPY 12 would be represented as just 12).string
Returned values:
CREATED, PENDING_CLIENT_ACTION, SUBMITTED, PENDING_BANK_ACTION, REOPENED_PENDING_CLIENT_ACTION, CLOSEDThe 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.
string
Additional information about the dispute
Status communicated by Mangopay teams.object
string
Returned values:
LOST, WON, VOIDThe 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.
string
The explanation of the result code.
string
Max length: 128 characters (see data formats for details)The unique identifier of the object.
string
Max. length: 255 charactersCustom data that you can add to this object.
Unix timestamp
The date and time at which the object was created.
Unix timestamp
The date and time the dispute was closed (i.e., its
Note: This value will be
Status is set to CLOSED).Note: This value will be
null for any Dispute closed before February 16th, 2023.string
The unique identifier of the repudiation.
400 - ContestedFunds required
400 - ContestedFunds required
{
"Message":"One or several required parameters are missing or incorrect. An incorrect resource ID also raises this kind of error.",
"Type":"param_error",
"Id":"994a6ed2-bca5-4673-a37f-16c01e9ad065#1673365608",
"Date":1673365609,
"errors":{
"ContestedFunds":"This field is required"
}
}
400 - ContestedFunds higher than DisputedFunds
400 - ContestedFunds higher than DisputedFunds
{
"Message": "One or several required parameters are missing or incorrect. An incorrect resource ID also raises this kind of error.",
"Type": "param_error",
"Id": "d37b150a-6238-4298-9da4-2540e6d46bd5#1672669956",
"Date": 1672669957.0,
"errors": {
"ContestedFunds": "The ContestedFunds amount must be less than or equal to the DisputedFunds amount"
}
}
400 - ContestDeadlineDate in the past
400 - ContestDeadlineDate in the past
{
"Message": "The ContestDeadlineDate has now passed and this Dispute is no longer contestable",
"Type": "dispute_contest_deadline_passed",
"Id": "9544eb52-8ae4-41ac-99e0-1215f17e3859#1673434106",
"Date": 1673434107.0,
"errors": null
}
{
"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": {
"DisputeReasonMessage": "This is a test dispute",
"DisputeReasonType": "UNKNOWN"
},
"ResultCode": "",
"ResultMessage": null,
"Id": "159102965",
"Tag": null,
"CreationDate": 1672411848,
"ClosedDate": null,
"RepudiationId": "159102966"
}
{
"ContestedFunds": {
"Currency": "EUR",
"Amount": 1200
}
}
<?php
require_once 'vendor/autoload.php';
use MangoPay\MangoPayApi;
use MangoPay\Libraries\ResponseException as MGPResponseException;
use MangoPay\Libraries\Exception as MGPException;
$api = new MangoPayApi();
$api->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);
}
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)
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])
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);
}
}
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)
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);
}
}
Was this page helpful?