Enviar resposta à disputa
curl --request PUT \
--url https://api-payment.safefypay.com.br/v1/disputes/{id}/response \
--header 'Authorization: Bearer <token>' \
--header 'Content-Type: application/json' \
--data '
{
"text": "O pedido foi entregue em 12/08; o comprovante segue anexado."
}
'import requests
url = "https://api-payment.safefypay.com.br/v1/disputes/{id}/response"
payload = { "text": "O pedido foi entregue em 12/08; o comprovante segue anexado." }
headers = {
"Authorization": "Bearer <token>",
"Content-Type": "application/json"
}
response = requests.put(url, json=payload, headers=headers)
print(response.text)const options = {
method: 'PUT',
headers: {Authorization: 'Bearer <token>', 'Content-Type': 'application/json'},
body: JSON.stringify({text: 'O pedido foi entregue em 12/08; o comprovante segue anexado.'})
};
fetch('https://api-payment.safefypay.com.br/v1/disputes/{id}/response', options)
.then(res => res.json())
.then(res => console.log(res))
.catch(err => console.error(err));package main
import (
"fmt"
"strings"
"net/http"
"io"
)
func main() {
url := "https://api-payment.safefypay.com.br/v1/disputes/{id}/response"
payload := strings.NewReader("{\n \"text\": \"O pedido foi entregue em 12/08; o comprovante segue anexado.\"\n}")
req, _ := http.NewRequest("PUT", 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.put("https://api-payment.safefypay.com.br/v1/disputes/{id}/response")
.header("Authorization", "Bearer <token>")
.header("Content-Type", "application/json")
.body("{\n \"text\": \"O pedido foi entregue em 12/08; o comprovante segue anexado.\"\n}")
.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"
}
}{
"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
Submit a dispute response
Create or update the response text for an open dispute
PUT
/
v1
/
disputes
/
{id}
/
response
Enviar resposta à disputa
curl --request PUT \
--url https://api-payment.safefypay.com.br/v1/disputes/{id}/response \
--header 'Authorization: Bearer <token>' \
--header 'Content-Type: application/json' \
--data '
{
"text": "O pedido foi entregue em 12/08; o comprovante segue anexado."
}
'import requests
url = "https://api-payment.safefypay.com.br/v1/disputes/{id}/response"
payload = { "text": "O pedido foi entregue em 12/08; o comprovante segue anexado." }
headers = {
"Authorization": "Bearer <token>",
"Content-Type": "application/json"
}
response = requests.put(url, json=payload, headers=headers)
print(response.text)const options = {
method: 'PUT',
headers: {Authorization: 'Bearer <token>', 'Content-Type': 'application/json'},
body: JSON.stringify({text: 'O pedido foi entregue em 12/08; o comprovante segue anexado.'})
};
fetch('https://api-payment.safefypay.com.br/v1/disputes/{id}/response', options)
.then(res => res.json())
.then(res => console.log(res))
.catch(err => console.error(err));package main
import (
"fmt"
"strings"
"net/http"
"io"
)
func main() {
url := "https://api-payment.safefypay.com.br/v1/disputes/{id}/response"
payload := strings.NewReader("{\n \"text\": \"O pedido foi entregue em 12/08; o comprovante segue anexado.\"\n}")
req, _ := http.NewRequest("PUT", 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.put("https://api-payment.safefypay.com.br/v1/disputes/{id}/response")
.header("Authorization", "Bearer <token>")
.header("Content-Type", "application/json")
.body("{\n \"text\": \"O pedido foi entregue em 12/08; o comprovante segue anexado.\"\n}")
.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"
}
}{
"data": null,
"message": "<string>",
"error": {
"message": "Token invalido ou expirado.",
"code": "unauthorized"
}
}{
"data": null,
"message": "<string>",
"error": {
"message": "Token invalido ou expirado.",
"code": "unauthorized"
}
}This endpoint is idempotent: call it again before the deadline to replace the response text. Use the evidence endpoint to attach documents.