curl --request PUT \
--url https://api.uvvipay.com.br/v1/payments/{id}/refund \
--header 'Content-Type: application/json' \
--header 'client-id: <api-key>' \
--header 'client-secret: <api-key>' \
--data '
{
"reason": "Produto defeituoso"
}
'import requests
url = "https://api.uvvipay.com.br/v1/payments/{id}/refund"
payload = { "reason": "Produto defeituoso" }
headers = {
"client-id": "<api-key>",
"client-secret": "<api-key>",
"Content-Type": "application/json"
}
response = requests.put(url, json=payload, headers=headers)
print(response.text)const options = {
method: 'PUT',
headers: {
'client-id': '<api-key>',
'client-secret': '<api-key>',
'Content-Type': 'application/json'
},
body: JSON.stringify({reason: 'Produto defeituoso'})
};
fetch('https://api.uvvipay.com.br/v1/payments/{id}/refund', 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.uvvipay.com.br/v1/payments/{id}/refund",
CURLOPT_RETURNTRANSFER => true,
CURLOPT_ENCODING => "",
CURLOPT_MAXREDIRS => 10,
CURLOPT_TIMEOUT => 30,
CURLOPT_HTTP_VERSION => CURL_HTTP_VERSION_1_1,
CURLOPT_CUSTOMREQUEST => "PUT",
CURLOPT_POSTFIELDS => json_encode([
'reason' => 'Produto defeituoso'
]),
CURLOPT_HTTPHEADER => [
"Content-Type: application/json",
"client-id: <api-key>",
"client-secret: <api-key>"
],
]);
$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.uvvipay.com.br/v1/payments/{id}/refund"
payload := strings.NewReader("{\n \"reason\": \"Produto defeituoso\"\n}")
req, _ := http.NewRequest("PUT", url, payload)
req.Header.Add("client-id", "<api-key>")
req.Header.Add("client-secret", "<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.put("https://api.uvvipay.com.br/v1/payments/{id}/refund")
.header("client-id", "<api-key>")
.header("client-secret", "<api-key>")
.header("Content-Type", "application/json")
.body("{\n \"reason\": \"Produto defeituoso\"\n}")
.asString();require 'uri'
require 'net/http'
url = URI("https://api.uvvipay.com.br/v1/payments/{id}/refund")
http = Net::HTTP.new(url.host, url.port)
http.use_ssl = true
request = Net::HTTP::Put.new(url)
request["client-id"] = '<api-key>'
request["client-secret"] = '<api-key>'
request["Content-Type"] = 'application/json'
request.body = "{\n \"reason\": \"Produto defeituoso\"\n}"
response = http.request(request)
puts response.read_body{
"id": "547c8482-47d8-4692-a48d-54ea35384c6e",
"status": "refunded",
"amount": 9900,
"paymentMethod": "credit_card",
"card": {
"brand": "visa",
"last4": "1111"
},
"externalReference": "35d29135-f14e-4695-b9ae-ccde91676a60",
"createdAt": "2026-09-14T18:51:12.947Z"
}{
"statusCode": 404,
"message": "Pagamento 550e8400-e29b-41d4-a716-446655440000 não encontrado",
"error": "Not Found"
}{
"statusCode": 422,
"message": "Pagamento não pode ser estornado. Status atual: refused",
"error": "Unprocessable Entity"
}Estornar pagamento
Processa o estorno total de um pagamento. O valor estornado é sempre o valor integral da transação original.
curl --request PUT \
--url https://api.uvvipay.com.br/v1/payments/{id}/refund \
--header 'Content-Type: application/json' \
--header 'client-id: <api-key>' \
--header 'client-secret: <api-key>' \
--data '
{
"reason": "Produto defeituoso"
}
'import requests
url = "https://api.uvvipay.com.br/v1/payments/{id}/refund"
payload = { "reason": "Produto defeituoso" }
headers = {
"client-id": "<api-key>",
"client-secret": "<api-key>",
"Content-Type": "application/json"
}
response = requests.put(url, json=payload, headers=headers)
print(response.text)const options = {
method: 'PUT',
headers: {
'client-id': '<api-key>',
'client-secret': '<api-key>',
'Content-Type': 'application/json'
},
body: JSON.stringify({reason: 'Produto defeituoso'})
};
fetch('https://api.uvvipay.com.br/v1/payments/{id}/refund', 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.uvvipay.com.br/v1/payments/{id}/refund",
CURLOPT_RETURNTRANSFER => true,
CURLOPT_ENCODING => "",
CURLOPT_MAXREDIRS => 10,
CURLOPT_TIMEOUT => 30,
CURLOPT_HTTP_VERSION => CURL_HTTP_VERSION_1_1,
CURLOPT_CUSTOMREQUEST => "PUT",
CURLOPT_POSTFIELDS => json_encode([
'reason' => 'Produto defeituoso'
]),
CURLOPT_HTTPHEADER => [
"Content-Type: application/json",
"client-id: <api-key>",
"client-secret: <api-key>"
],
]);
$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.uvvipay.com.br/v1/payments/{id}/refund"
payload := strings.NewReader("{\n \"reason\": \"Produto defeituoso\"\n}")
req, _ := http.NewRequest("PUT", url, payload)
req.Header.Add("client-id", "<api-key>")
req.Header.Add("client-secret", "<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.put("https://api.uvvipay.com.br/v1/payments/{id}/refund")
.header("client-id", "<api-key>")
.header("client-secret", "<api-key>")
.header("Content-Type", "application/json")
.body("{\n \"reason\": \"Produto defeituoso\"\n}")
.asString();require 'uri'
require 'net/http'
url = URI("https://api.uvvipay.com.br/v1/payments/{id}/refund")
http = Net::HTTP.new(url.host, url.port)
http.use_ssl = true
request = Net::HTTP::Put.new(url)
request["client-id"] = '<api-key>'
request["client-secret"] = '<api-key>'
request["Content-Type"] = 'application/json'
request.body = "{\n \"reason\": \"Produto defeituoso\"\n}"
response = http.request(request)
puts response.read_body{
"id": "547c8482-47d8-4692-a48d-54ea35384c6e",
"status": "refunded",
"amount": 9900,
"paymentMethod": "credit_card",
"card": {
"brand": "visa",
"last4": "1111"
},
"externalReference": "35d29135-f14e-4695-b9ae-ccde91676a60",
"createdAt": "2026-09-14T18:51:12.947Z"
}{
"statusCode": 404,
"message": "Pagamento 550e8400-e29b-41d4-a716-446655440000 não encontrado",
"error": "Not Found"
}{
"statusCode": 422,
"message": "Pagamento não pode ser estornado. Status atual: refused",
"error": "Unprocessable Entity"
}Headers
ID público da credencial do merchant
Secret da credencial do merchant
Path Parameters
ID único (UUID) da transação a ser estornada
"550e8400-e29b-41d4-a716-446655440000"
Body
Dados opcionais do estorno. O corpo pode ser omitido.
Motivo do estorno (texto livre, opcional). Útil para auditoria e reconciliação interna.
255"Produto defeituoso"
Response
Estorno processado com sucesso
"d398b016-3c29-41b4-afc0-bbf8c81c683c"
waiting_payment, paid, refused, refunded, in_analysis "paid"
15680
"credit_card"
"2026-07-02T19:41:46.738Z"
Presente em pagamentos credit_card quando brand e last4 estão persistidos. Omitido em pix, boleto e wallet. Não inclui PAN, CVV, titular, validade nem BIN. Em Apple Pay inclui wallet.type.
Show child attributes
Show child attributes
{ "brand": "visa", "last4": "1111" }
Show child attributes
Show child attributes
Show child attributes
Show child attributes
Motivo da recusa (presente apenas quando status = refused). Consulte o guia Recusas de cartão para entender as categorias e como orientar o cliente.
Show child attributes
Show child attributes
Dados públicos do submerchant (owner) vinculado à transação.
Show child attributes
Show child attributes
Split resolvido da transação: valor efetivamente destinado a cada recebedor, em centavos (quando a transação possui split)
Show child attributes
Show child attributes
Dados completos do cliente (presente quando disponível).
Show child attributes
Show child attributes
Show child attributes
Show child attributes
"35d29135-f14e-4695-b9ae-ccde91676a60"
Presente apenas em pagamentos com cartão aberto (number/cvv) aprovados (status: paid) cuja emissão do token teve sucesso. Não é emitido para cobranças via cardTokenId ou upsellToken. A emissão é best-effort: a ausência do objeto não indica falha do pagamento.
Show child attributes
Show child attributes

