Skip to main content
POST
/
v1
/
exceptions
/
{exceptionId}
/
disputes
Open a dispute
curl --request POST \
  --url https://matcher.sandbox.lerian.net/v1/exceptions/{exceptionId}/disputes \
  --header 'Authorization: Bearer <token>' \
  --header 'Content-Type: application/json' \
  --data '
{
  "category": "AMOUNT_MISMATCH",
  "description": "Transaction amount differs from invoice"
}
'
import requests

url = "https://matcher.sandbox.lerian.net/v1/exceptions/{exceptionId}/disputes"

payload = {
"category": "AMOUNT_MISMATCH",
"description": "Transaction amount differs from invoice"
}
headers = {
"Authorization": "Bearer <token>",
"Content-Type": "application/json"
}

response = requests.post(url, json=payload, headers=headers)

print(response.text)
const options = {
method: 'POST',
headers: {Authorization: 'Bearer <token>', 'Content-Type': 'application/json'},
body: JSON.stringify({
category: 'AMOUNT_MISMATCH',
description: 'Transaction amount differs from invoice'
})
};

fetch('https://matcher.sandbox.lerian.net/v1/exceptions/{exceptionId}/disputes', options)
.then(res => res.json())
.then(res => console.log(res))
.catch(err => console.error(err));
<?php

$curl = curl_init();

curl_setopt_array($curl, [
CURLOPT_URL => "https://matcher.sandbox.lerian.net/v1/exceptions/{exceptionId}/disputes",
CURLOPT_RETURNTRANSFER => true,
CURLOPT_ENCODING => "",
CURLOPT_MAXREDIRS => 10,
CURLOPT_TIMEOUT => 30,
CURLOPT_HTTP_VERSION => CURL_HTTP_VERSION_1_1,
CURLOPT_CUSTOMREQUEST => "POST",
CURLOPT_POSTFIELDS => json_encode([
'category' => 'AMOUNT_MISMATCH',
'description' => 'Transaction amount differs from invoice'
]),
CURLOPT_HTTPHEADER => [
"Authorization: Bearer <token>",
"Content-Type: application/json"
],
]);

$response = curl_exec($curl);
$err = curl_error($curl);

curl_close($curl);

if ($err) {
echo "cURL Error #:" . $err;
} else {
echo $response;
}
package main

import (
"fmt"
"strings"
"net/http"
"io"
)

func main() {

url := "https://matcher.sandbox.lerian.net/v1/exceptions/{exceptionId}/disputes"

payload := strings.NewReader("{\n \"category\": \"AMOUNT_MISMATCH\",\n \"description\": \"Transaction amount differs from invoice\"\n}")

req, _ := http.NewRequest("POST", url, payload)

req.Header.Add("Authorization", "Bearer <token>")
req.Header.Add("Content-Type", "application/json")

res, _ := http.DefaultClient.Do(req)

defer res.Body.Close()
body, _ := io.ReadAll(res.Body)

fmt.Println(string(body))

}
HttpResponse<String> response = Unirest.post("https://matcher.sandbox.lerian.net/v1/exceptions/{exceptionId}/disputes")
.header("Authorization", "Bearer <token>")
.header("Content-Type", "application/json")
.body("{\n \"category\": \"AMOUNT_MISMATCH\",\n \"description\": \"Transaction amount differs from invoice\"\n}")
.asString();
require 'uri'
require 'net/http'

url = URI("https://matcher.sandbox.lerian.net/v1/exceptions/{exceptionId}/disputes")

http = Net::HTTP.new(url.host, url.port)
http.use_ssl = true

request = Net::HTTP::Post.new(url)
request["Authorization"] = 'Bearer <token>'
request["Content-Type"] = 'application/json'
request.body = "{\n \"category\": \"AMOUNT_MISMATCH\",\n \"description\": \"Transaction amount differs from invoice\"\n}"

response = http.request(request)
puts response.read_body
{
  "category": "BANK_FEE_ERROR",
  "createdAt": "2025-01-15T10:30:00.000Z",
  "description": "Transaction amount differs from expected",
  "evidence": [
    {
      "comment": "Bank statement attached",
      "disputeId": "019c96a0-10d2-7193-8841-0d7347efd09a",
      "fileUrl": "https://storage.example.com/evidence/doc123.pdf",
      "id": "019c96a0-0c0d-7915-84b9-e497bfee9916",
      "submittedAt": "2025-01-15T10:30:00.000Z",
      "submittedBy": "user@example.com"
    }
  ],
  "exceptionId": "019c96a0-10d2-7134-ba5f-664142ee7052",
  "id": "019c96a0-10d2-7193-8841-0d7347efd09a",
  "openedBy": "user@example.com",
  "reopenReason": "New evidence discovered",
  "resolution": "Counterparty confirmed error",
  "state": "OPEN",
  "updatedAt": "2025-01-15T10:30:00.000Z"
}
{
"code": "MTCH-0001",
"title": "Bad Request",
"message": "context not found",
"error": "<string>",
"details": {}
}
{
"code": "MTCH-0001",
"title": "Bad Request",
"message": "context not found",
"error": "<string>",
"details": {}
}
{
"code": "MTCH-0001",
"title": "Bad Request",
"message": "context not found",
"error": "<string>",
"details": {}
}
{
"code": "MTCH-0001",
"title": "Bad Request",
"message": "context not found",
"error": "<string>",
"details": {}
}
{
"code": "MTCH-0001",
"title": "Bad Request",
"message": "context not found",
"error": "<string>",
"details": {}
}

Authorizations

Authorization
string
header
required

Bearer token authentication (format: "Bearer {token}")

Headers

X-Request-Id
string

A unique identifier for tracing the request across services.

X-Idempotency-Key
string

Optional idempotency key for safe retries. Also accepts Idempotency-Key as an alternative header name. If the same key is sent again and the original request was already processed, the cached response is returned with X-Idempotency-Replayed: true.

See Retries and idempotency for details.

Path Parameters

exceptionId
string
required

Exception ID

Body

application/json

Open dispute payload

Open dispute request payload

category
string
required

Category of the dispute

Maximum string length: 255
Example:

"AMOUNT_MISMATCH"

description
string
required

Detailed description of the dispute

Maximum string length: 5000
Example:

"Transaction amount differs from invoice"

Response

Indicates that the resource was successfully created.

The response includes the X-Idempotency-Replayed header.

If the value is false, the request was just processed. If the value is true, the response is a replay of a previously processed request.

See Retries and idempotency for more details.

Dispute details

category
enum<string>

Category of the dispute

Available options:
BANK_FEE_ERROR,
UNRECOGNIZED_CHARGE,
DUPLICATE_TRANSACTION,
OTHER
Example:

"BANK_FEE_ERROR"

createdAt
string

Creation timestamp in RFC3339 format

Example:

"2025-01-15T10:30:00.000Z"

description
string

Description of the dispute

Example:

"Transaction amount differs from expected"

evidence
object[]

Evidence submitted for this dispute

exceptionId
string

Exception ID this dispute is for

Example:

"019c96a0-10d2-7134-ba5f-664142ee7052"

id
string

Unique identifier for the dispute

Example:

"019c96a0-10d2-7193-8841-0d7347efd09a"

openedBy
string

User who opened the dispute

Example:

"user@example.com"

reopenReason
string

Reason for reopening if reopened

Example:

"New evidence discovered"

resolution
string

Resolution description when closed

Example:

"Counterparty confirmed error"

state
enum<string>

Current state

Available options:
DRAFT,
OPEN,
PENDING_EVIDENCE,
WON,
LOST
Example:

"OPEN"

updatedAt
string

Last update timestamp in RFC3339 format

Example:

"2025-01-15T10:30:00.000Z"