Obter disputa
curl --request GET \
--url https://api-payment.safefypay.com.br/v1/disputes/{id} \
--header 'Authorization: Bearer <token>'import requests
url = "https://api-payment.safefypay.com.br/v1/disputes/{id}"
headers = {"Authorization": "Bearer <token>"}
response = requests.get(url, headers=headers)
print(response.text)const options = {method: 'GET', headers: {Authorization: 'Bearer <token>'}};
fetch('https://api-payment.safefypay.com.br/v1/disputes/{id}', options)
.then(res => res.json())
.then(res => console.log(res))
.catch(err => console.error(err));package main
import (
"fmt"
"net/http"
"io"
)
func main() {
url := "https://api-payment.safefypay.com.br/v1/disputes/{id}"
req, _ := http.NewRequest("GET", url, nil)
req.Header.Add("Authorization", "Bearer <token>")
res, _ := http.DefaultClient.Do(req)
defer res.Body.Close()
body, _ := io.ReadAll(res.Body)
fmt.Println(string(body))
}HttpResponse<String> response = Unirest.get("https://api-payment.safefypay.com.br/v1/disputes/{id}")
.header("Authorization", "Bearer <token>")
.asString();{
"data": {
"id": "3c90c3cc-0d44-4b50-8888-8dd25736052a",
"status": "Open",
"reason": "Fraud",
"amount": 123,
"currency": "BRL",
"paymentId": "3c90c3cc-0d44-4b50-8888-8dd25736052a",
"orderId": "3c90c3cc-0d44-4b50-8888-8dd25736052a",
"customer": {
"id": "3c90c3cc-0d44-4b50-8888-8dd25736052a",
"name": "<string>",
"email": "jsmith@example.com"
},
"openedAt": "2023-11-07T05:31:56Z",
"responseDeadline": "2023-11-07T05:31:56Z",
"hasResponse": true,
"evidencesCount": 123,
"holdState": "None",
"heldAmount": 123,
"createdAt": "2023-11-07T05:31:56Z",
"reasonDescription": "<string>",
"disputant": {
"name": "<string>",
"email": "jsmith@example.com",
"phone": "<string>"
},
"closedAt": "2023-11-07T05:31:56Z",
"holdAmount": 123,
"holdReleasedAt": "2023-11-07T05:31:56Z",
"holdDebitedAt": "2023-11-07T05:31:56Z",
"responseText": "<string>",
"respondedAt": "2023-11-07T05:31:56Z",
"evidences": [
{
"id": "3c90c3cc-0d44-4b50-8888-8dd25736052a",
"fileName": "<string>",
"contentType": "<string>",
"size": 123,
"url": "<string>",
"expiresAt": "2023-11-07T05:31:56Z",
"description": "<string>",
"createdAt": "2023-11-07T05:31:56Z"
}
],
"events": [
{
"type": "MerchantResponded",
"actorType": "Merchant",
"description": "<string>",
"createdAt": "2023-11-07T05:31:56Z"
}
],
"updatedAt": "2023-11-07T05:31:56Z"
},
"message": "<string>",
"error": {
"message": "Token invalido ou expirado.",
"code": "unauthorized"
}
}{
"data": null,
"message": "<string>",
"error": {
"message": "Token invalido ou expirado.",
"code": "unauthorized"
}
}{
"data": null,
"message": "<string>",
"error": {
"message": "Token invalido ou expirado.",
"code": "unauthorized"
}
}{
"data": null,
"message": "<string>",
"error": {
"message": "Token invalido ou expirado.",
"code": "unauthorized"
}
}Disputes
Get a dispute
Retrieve a dispute’s deadline, response, and evidence
GET
/
v1
/
disputes
/
{id}
Obter disputa
curl --request GET \
--url https://api-payment.safefypay.com.br/v1/disputes/{id} \
--header 'Authorization: Bearer <token>'import requests
url = "https://api-payment.safefypay.com.br/v1/disputes/{id}"
headers = {"Authorization": "Bearer <token>"}
response = requests.get(url, headers=headers)
print(response.text)const options = {method: 'GET', headers: {Authorization: 'Bearer <token>'}};
fetch('https://api-payment.safefypay.com.br/v1/disputes/{id}', options)
.then(res => res.json())
.then(res => console.log(res))
.catch(err => console.error(err));package main
import (
"fmt"
"net/http"
"io"
)
func main() {
url := "https://api-payment.safefypay.com.br/v1/disputes/{id}"
req, _ := http.NewRequest("GET", url, nil)
req.Header.Add("Authorization", "Bearer <token>")
res, _ := http.DefaultClient.Do(req)
defer res.Body.Close()
body, _ := io.ReadAll(res.Body)
fmt.Println(string(body))
}HttpResponse<String> response = Unirest.get("https://api-payment.safefypay.com.br/v1/disputes/{id}")
.header("Authorization", "Bearer <token>")
.asString();{
"data": {
"id": "3c90c3cc-0d44-4b50-8888-8dd25736052a",
"status": "Open",
"reason": "Fraud",
"amount": 123,
"currency": "BRL",
"paymentId": "3c90c3cc-0d44-4b50-8888-8dd25736052a",
"orderId": "3c90c3cc-0d44-4b50-8888-8dd25736052a",
"customer": {
"id": "3c90c3cc-0d44-4b50-8888-8dd25736052a",
"name": "<string>",
"email": "jsmith@example.com"
},
"openedAt": "2023-11-07T05:31:56Z",
"responseDeadline": "2023-11-07T05:31:56Z",
"hasResponse": true,
"evidencesCount": 123,
"holdState": "None",
"heldAmount": 123,
"createdAt": "2023-11-07T05:31:56Z",
"reasonDescription": "<string>",
"disputant": {
"name": "<string>",
"email": "jsmith@example.com",
"phone": "<string>"
},
"closedAt": "2023-11-07T05:31:56Z",
"holdAmount": 123,
"holdReleasedAt": "2023-11-07T05:31:56Z",
"holdDebitedAt": "2023-11-07T05:31:56Z",
"responseText": "<string>",
"respondedAt": "2023-11-07T05:31:56Z",
"evidences": [
{
"id": "3c90c3cc-0d44-4b50-8888-8dd25736052a",
"fileName": "<string>",
"contentType": "<string>",
"size": 123,
"url": "<string>",
"expiresAt": "2023-11-07T05:31:56Z",
"description": "<string>",
"createdAt": "2023-11-07T05:31:56Z"
}
],
"events": [
{
"type": "MerchantResponded",
"actorType": "Merchant",
"description": "<string>",
"createdAt": "2023-11-07T05:31:56Z"
}
],
"updatedAt": "2023-11-07T05:31:56Z"
},
"message": "<string>",
"error": {
"message": "Token invalido ou expirado.",
"code": "unauthorized"
}
}{
"data": null,
"message": "<string>",
"error": {
"message": "Token invalido ou expirado.",
"code": "unauthorized"
}
}{
"data": null,
"message": "<string>",
"error": {
"message": "Token invalido ou expirado.",
"code": "unauthorized"
}
}{
"data": null,
"message": "<string>",
"error": {
"message": "Token invalido ou expirado.",
"code": "unauthorized"
}
}Evidence URLs are temporary. Retrieve the dispute again to obtain a refreshed URL after it expires.