Dispute a Transaction
const options = {
method: 'POST',
headers: {Authorization: 'Bearer <token>', 'Content-Type': 'application/json'},
body: JSON.stringify({disputeReason: 'purchase_cancelled_but_no_refund_received'})
};
fetch('https://api.gnosispay.com/api/v1/transactions/{threadId}/dispute', options)
.then(res => res.json())
.then(res => console.log(res))
.catch(err => console.error(err));curl --request POST \
--url https://api.gnosispay.com/api/v1/transactions/{threadId}/dispute \
--header 'Authorization: Bearer <token>' \
--header 'Content-Type: application/json' \
--data '
{
"disputeReason": "purchase_cancelled_but_no_refund_received"
}
'import requests
url = "https://api.gnosispay.com/api/v1/transactions/{threadId}/dispute"
payload = { "disputeReason": "purchase_cancelled_but_no_refund_received" }
headers = {
"Authorization": "Bearer <token>",
"Content-Type": "application/json"
}
response = requests.post(url, json=payload, headers=headers)
print(response.text)package main
import (
"fmt"
"strings"
"net/http"
"io"
)
func main() {
url := "https://api.gnosispay.com/api/v1/transactions/{threadId}/dispute"
payload := strings.NewReader("{\n \"disputeReason\": \"purchase_cancelled_but_no_refund_received\"\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://api.gnosispay.com/api/v1/transactions/{threadId}/dispute")
.header("Authorization", "Bearer <token>")
.header("Content-Type", "application/json")
.body("{\n \"disputeReason\": \"purchase_cancelled_but_no_refund_received\"\n}")
.asString();require 'uri'
require 'net/http'
url = URI("https://api.gnosispay.com/api/v1/transactions/{threadId}/dispute")
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 \"disputeReason\": \"purchase_cancelled_but_no_refund_received\"\n}"
response = http.request(request)
puts response.read_body{
"message": "Dispute submitted for review"
}{
"error": "Valid dispute reason is required",
"validReasons": [
"purchase_cancelled_but_no_refund_received",
"problem_with_the_product_chargeback_"
]
}{
"message": "<string>"
}{
"error": "Transaction not found or does not belong to user"
}{
"error": "Transaction has already been disputed",
"message": "This transaction has already been disputed and is being reviewed"
}{
"error": "Internal server error"
}Transactions
Dispute a Transaction
Create a ticket to dispute a transaction. The list of available dispute reason keys can be found in the GET /api/v1/transactions/dispute endpoint.
If the dispute reason is unrecognized_transaction_report_fraudulent, the user’s card will be restricted.
POST
/
api
/
v1
/
transactions
/
{threadId}
/
dispute
Dispute a Transaction
const options = {
method: 'POST',
headers: {Authorization: 'Bearer <token>', 'Content-Type': 'application/json'},
body: JSON.stringify({disputeReason: 'purchase_cancelled_but_no_refund_received'})
};
fetch('https://api.gnosispay.com/api/v1/transactions/{threadId}/dispute', options)
.then(res => res.json())
.then(res => console.log(res))
.catch(err => console.error(err));curl --request POST \
--url https://api.gnosispay.com/api/v1/transactions/{threadId}/dispute \
--header 'Authorization: Bearer <token>' \
--header 'Content-Type: application/json' \
--data '
{
"disputeReason": "purchase_cancelled_but_no_refund_received"
}
'import requests
url = "https://api.gnosispay.com/api/v1/transactions/{threadId}/dispute"
payload = { "disputeReason": "purchase_cancelled_but_no_refund_received" }
headers = {
"Authorization": "Bearer <token>",
"Content-Type": "application/json"
}
response = requests.post(url, json=payload, headers=headers)
print(response.text)package main
import (
"fmt"
"strings"
"net/http"
"io"
)
func main() {
url := "https://api.gnosispay.com/api/v1/transactions/{threadId}/dispute"
payload := strings.NewReader("{\n \"disputeReason\": \"purchase_cancelled_but_no_refund_received\"\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://api.gnosispay.com/api/v1/transactions/{threadId}/dispute")
.header("Authorization", "Bearer <token>")
.header("Content-Type", "application/json")
.body("{\n \"disputeReason\": \"purchase_cancelled_but_no_refund_received\"\n}")
.asString();require 'uri'
require 'net/http'
url = URI("https://api.gnosispay.com/api/v1/transactions/{threadId}/dispute")
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 \"disputeReason\": \"purchase_cancelled_but_no_refund_received\"\n}"
response = http.request(request)
puts response.read_body{
"message": "Dispute submitted for review"
}{
"error": "Valid dispute reason is required",
"validReasons": [
"purchase_cancelled_but_no_refund_received",
"problem_with_the_product_chargeback_"
]
}{
"message": "<string>"
}{
"error": "Transaction not found or does not belong to user"
}{
"error": "Transaction has already been disputed",
"message": "This transaction has already been disputed and is being reviewed"
}{
"error": "Internal server error"
}Authorizations
Bearer authentication header of the form Bearer <token>, where <token> is your auth token.
Path Parameters
The thread ID of the transaction to dispute
Body
application/json
The reason for disputing the transaction
Available options:
purchase_cancelled_but_no_refund_received, problem_with_the_product_chargeback_, problem_with_service_subscription_chargeback, wrong_installment_number, wrong_value, charged_more_than_once, unrecognized_transaction_report_fraudulent Example:
"purchase_cancelled_but_no_refund_received"
Response
Dispute submitted for review
Example:
"Dispute submitted for review"