Create a dispute for a transaction
curl --request POST \
--url https://api-dev.rain.xyz/v1/issuing/transactions/{transactionId}/disputes \
--header 'Api-Key: <api-key>' \
--header 'Content-Type: application/json' \
--data '
{
"textEvidence": "<string>",
"disputeAmount": 2
}
'import requests
url = "https://api-dev.rain.xyz/v1/issuing/transactions/{transactionId}/disputes"
payload = {
"textEvidence": "<string>",
"disputeAmount": 2
}
headers = {
"Api-Key": "<api-key>",
"Content-Type": "application/json"
}
response = requests.post(url, json=payload, headers=headers)
print(response.text)const options = {
method: 'POST',
headers: {'Api-Key': '<api-key>', 'Content-Type': 'application/json'},
body: JSON.stringify({textEvidence: '<string>', disputeAmount: 2})
};
fetch('https://api-dev.rain.xyz/v1/issuing/transactions/{transactionId}/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://api-dev.rain.xyz/v1/issuing/transactions/{transactionId}/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([
'textEvidence' => '<string>',
'disputeAmount' => 2
]),
CURLOPT_HTTPHEADER => [
"Api-Key: <api-key>",
"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://api-dev.rain.xyz/v1/issuing/transactions/{transactionId}/disputes"
payload := strings.NewReader("{\n \"textEvidence\": \"<string>\",\n \"disputeAmount\": 2\n}")
req, _ := http.NewRequest("POST", url, payload)
req.Header.Add("Api-Key", "<api-key>")
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://api-dev.rain.xyz/v1/issuing/transactions/{transactionId}/disputes")
.header("Api-Key", "<api-key>")
.header("Content-Type", "application/json")
.body("{\n \"textEvidence\": \"<string>\",\n \"disputeAmount\": 2\n}")
.asString();require 'uri'
require 'net/http'
url = URI("https://api-dev.rain.xyz/v1/issuing/transactions/{transactionId}/disputes")
http = Net::HTTP.new(url.host, url.port)
http.use_ssl = true
request = Net::HTTP::Post.new(url)
request["Api-Key"] = '<api-key>'
request["Content-Type"] = 'application/json'
request.body = "{\n \"textEvidence\": \"<string>\",\n \"disputeAmount\": 2\n}"
response = http.request(request)
puts response.read_body{
"id": "3c90c3cc-0d44-4b50-8888-8dd25736052a",
"transactionId": "3c90c3cc-0d44-4b50-8888-8dd25736052a",
"status": "pending",
"disputeAmount": 123,
"createdAt": "2023-11-07T05:31:56Z",
"disputeType": "fraud",
"textEvidence": "<string>",
"resolvedAt": "2023-11-07T05:31:56Z",
"transaction": {
"id": "3c90c3cc-0d44-4b50-8888-8dd25736052a",
"amount": 123,
"cardholderUserId": "3c90c3cc-0d44-4b50-8888-8dd25736052a",
"cardholderFirstName": "<string>",
"cardholderLastName": "<string>",
"merchantName": "<string>",
"postedAt": "2023-11-07T05:31:56Z"
},
"hasFileEvidence": true,
"attachmentCount": 1
}Disputes
Create a dispute for a transaction
POST
/
issuing
/
transactions
/
{transactionId}
/
disputes
Create a dispute for a transaction
curl --request POST \
--url https://api-dev.rain.xyz/v1/issuing/transactions/{transactionId}/disputes \
--header 'Api-Key: <api-key>' \
--header 'Content-Type: application/json' \
--data '
{
"textEvidence": "<string>",
"disputeAmount": 2
}
'import requests
url = "https://api-dev.rain.xyz/v1/issuing/transactions/{transactionId}/disputes"
payload = {
"textEvidence": "<string>",
"disputeAmount": 2
}
headers = {
"Api-Key": "<api-key>",
"Content-Type": "application/json"
}
response = requests.post(url, json=payload, headers=headers)
print(response.text)const options = {
method: 'POST',
headers: {'Api-Key': '<api-key>', 'Content-Type': 'application/json'},
body: JSON.stringify({textEvidence: '<string>', disputeAmount: 2})
};
fetch('https://api-dev.rain.xyz/v1/issuing/transactions/{transactionId}/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://api-dev.rain.xyz/v1/issuing/transactions/{transactionId}/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([
'textEvidence' => '<string>',
'disputeAmount' => 2
]),
CURLOPT_HTTPHEADER => [
"Api-Key: <api-key>",
"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://api-dev.rain.xyz/v1/issuing/transactions/{transactionId}/disputes"
payload := strings.NewReader("{\n \"textEvidence\": \"<string>\",\n \"disputeAmount\": 2\n}")
req, _ := http.NewRequest("POST", url, payload)
req.Header.Add("Api-Key", "<api-key>")
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://api-dev.rain.xyz/v1/issuing/transactions/{transactionId}/disputes")
.header("Api-Key", "<api-key>")
.header("Content-Type", "application/json")
.body("{\n \"textEvidence\": \"<string>\",\n \"disputeAmount\": 2\n}")
.asString();require 'uri'
require 'net/http'
url = URI("https://api-dev.rain.xyz/v1/issuing/transactions/{transactionId}/disputes")
http = Net::HTTP.new(url.host, url.port)
http.use_ssl = true
request = Net::HTTP::Post.new(url)
request["Api-Key"] = '<api-key>'
request["Content-Type"] = 'application/json'
request.body = "{\n \"textEvidence\": \"<string>\",\n \"disputeAmount\": 2\n}"
response = http.request(request)
puts response.read_body{
"id": "3c90c3cc-0d44-4b50-8888-8dd25736052a",
"transactionId": "3c90c3cc-0d44-4b50-8888-8dd25736052a",
"status": "pending",
"disputeAmount": 123,
"createdAt": "2023-11-07T05:31:56Z",
"disputeType": "fraud",
"textEvidence": "<string>",
"resolvedAt": "2023-11-07T05:31:56Z",
"transaction": {
"id": "3c90c3cc-0d44-4b50-8888-8dd25736052a",
"amount": 123,
"cardholderUserId": "3c90c3cc-0d44-4b50-8888-8dd25736052a",
"cardholderFirstName": "<string>",
"cardholderLastName": "<string>",
"merchantName": "<string>",
"postedAt": "2023-11-07T05:31:56Z"
},
"hasFileEvidence": true,
"attachmentCount": 1
}Authorizations
Path Parameters
Id of the transaction to create a dispute for
Body
application/json
The dispute to create
The type of dispute being filed
Available options:
fraud, creditNotProcessed, serviceNotReceived, merchandiseIssue, other The textual evidence for the dispute
Maximum string length:
65535Disputed amount in cents. Must be less than or equal to the transaction amount. If omitted, defaults to the full transaction amount.
Required range:
x >= 1Response
Successful operation
The dispute's unique identifier
The transaction's unique identifier
The status of the dispute
Available options:
pending, inReview, accepted, rejected, canceled, resolvedByMerchant Disputed amount in cents
The time at which the dispute was created
The type of dispute
Available options:
fraud, creditNotProcessed, serviceNotReceived, merchandiseIssue, other The textual evidence for the dispute
Maximum string length:
65535The time at which the dispute was resolved
Details of the transaction associated with the dispute
Show child attributes
Show child attributes
Indicates whether file evidence has been uploaded for the dispute
The number of attachments uploaded for the dispute
Required range:
x >= 0