Atualizar webhook
curl --request PUT \
--url https://api.uvvipay.com.br/v1/webhooks/{id} \
--header 'Content-Type: application/json' \
--header 'client-id: <api-key>' \
--header 'client-secret: <api-key>' \
--data '
{
"webhook_url": "https://minhaloja.com.br/webhooks/uvvipay-v2",
"events": [
"transaction.status.updated"
],
"hmac_secret": "seu-segredo-compartilhado"
}
'import requests
url = "https://api.uvvipay.com.br/v1/webhooks/{id}"
payload = {
"webhook_url": "https://minhaloja.com.br/webhooks/uvvipay-v2",
"events": ["transaction.status.updated"],
"hmac_secret": "seu-segredo-compartilhado"
}
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({
webhook_url: 'https://minhaloja.com.br/webhooks/uvvipay-v2',
events: ['transaction.status.updated'],
hmac_secret: 'seu-segredo-compartilhado'
})
};
fetch('https://api.uvvipay.com.br/v1/webhooks/{id}', 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/webhooks/{id}",
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([
'webhook_url' => 'https://minhaloja.com.br/webhooks/uvvipay-v2',
'events' => [
'transaction.status.updated'
],
'hmac_secret' => 'seu-segredo-compartilhado'
]),
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/webhooks/{id}"
payload := strings.NewReader("{\n \"webhook_url\": \"https://minhaloja.com.br/webhooks/uvvipay-v2\",\n \"events\": [\n \"transaction.status.updated\"\n ],\n \"hmac_secret\": \"seu-segredo-compartilhado\"\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/webhooks/{id}")
.header("client-id", "<api-key>")
.header("client-secret", "<api-key>")
.header("Content-Type", "application/json")
.body("{\n \"webhook_url\": \"https://minhaloja.com.br/webhooks/uvvipay-v2\",\n \"events\": [\n \"transaction.status.updated\"\n ],\n \"hmac_secret\": \"seu-segredo-compartilhado\"\n}")
.asString();require 'uri'
require 'net/http'
url = URI("https://api.uvvipay.com.br/v1/webhooks/{id}")
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 \"webhook_url\": \"https://minhaloja.com.br/webhooks/uvvipay-v2\",\n \"events\": [\n \"transaction.status.updated\"\n ],\n \"hmac_secret\": \"seu-segredo-compartilhado\"\n}"
response = http.request(request)
puts response.read_body{
"data": {
"id": "3c90c3cc-0d44-4b50-8888-8dd25736052a",
"endpoint": "https://minhaloja.com.br/webhooks/uvvipay",
"status": "active",
"created_at": "2023-11-07T05:31:56Z",
"events": [
"transaction.status.updated"
],
"hmac_configured": true
}
}Webhooks
Atualizar webhook
Atualiza a URL e os eventos de um endpoint de webhook existente. O id é o identificador retornado na listagem. events é obrigatório (ao menos um).
PUT
/
v1
/
webhooks
/
{id}
Atualizar webhook
curl --request PUT \
--url https://api.uvvipay.com.br/v1/webhooks/{id} \
--header 'Content-Type: application/json' \
--header 'client-id: <api-key>' \
--header 'client-secret: <api-key>' \
--data '
{
"webhook_url": "https://minhaloja.com.br/webhooks/uvvipay-v2",
"events": [
"transaction.status.updated"
],
"hmac_secret": "seu-segredo-compartilhado"
}
'import requests
url = "https://api.uvvipay.com.br/v1/webhooks/{id}"
payload = {
"webhook_url": "https://minhaloja.com.br/webhooks/uvvipay-v2",
"events": ["transaction.status.updated"],
"hmac_secret": "seu-segredo-compartilhado"
}
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({
webhook_url: 'https://minhaloja.com.br/webhooks/uvvipay-v2',
events: ['transaction.status.updated'],
hmac_secret: 'seu-segredo-compartilhado'
})
};
fetch('https://api.uvvipay.com.br/v1/webhooks/{id}', 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/webhooks/{id}",
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([
'webhook_url' => 'https://minhaloja.com.br/webhooks/uvvipay-v2',
'events' => [
'transaction.status.updated'
],
'hmac_secret' => 'seu-segredo-compartilhado'
]),
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/webhooks/{id}"
payload := strings.NewReader("{\n \"webhook_url\": \"https://minhaloja.com.br/webhooks/uvvipay-v2\",\n \"events\": [\n \"transaction.status.updated\"\n ],\n \"hmac_secret\": \"seu-segredo-compartilhado\"\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/webhooks/{id}")
.header("client-id", "<api-key>")
.header("client-secret", "<api-key>")
.header("Content-Type", "application/json")
.body("{\n \"webhook_url\": \"https://minhaloja.com.br/webhooks/uvvipay-v2\",\n \"events\": [\n \"transaction.status.updated\"\n ],\n \"hmac_secret\": \"seu-segredo-compartilhado\"\n}")
.asString();require 'uri'
require 'net/http'
url = URI("https://api.uvvipay.com.br/v1/webhooks/{id}")
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 \"webhook_url\": \"https://minhaloja.com.br/webhooks/uvvipay-v2\",\n \"events\": [\n \"transaction.status.updated\"\n ],\n \"hmac_secret\": \"seu-segredo-compartilhado\"\n}"
response = http.request(request)
puts response.read_body{
"data": {
"id": "3c90c3cc-0d44-4b50-8888-8dd25736052a",
"endpoint": "https://minhaloja.com.br/webhooks/uvvipay",
"status": "active",
"created_at": "2023-11-07T05:31:56Z",
"events": [
"transaction.status.updated"
],
"hmac_configured": true
}
}Use o
id retornado na listagem de webhooks. Informe webhook_url e events
(ao menos um) para atualizar o endpoint. Se enviar hmac_secret (de 16 a 256 caracteres), o secret é
substituído; se omitir, o atual é mantido; se enviar hmac_secret: null, a assinatura HMAC é desligada.Headers
ID público da credencial do merchant
Secret da credencial do merchant
Path Parameters
Identificador (UUID) do endpoint de webhook
Body
application/json
Nova URL HTTPS do endpoint de webhook
Pattern:
^https://.+Example:
"https://minhaloja.com.br/webhooks/uvvipay-v2"
Eventos em que o endpoint será inscrito
Minimum array length:
1Available options:
transaction.status.updated, transaction.waiting_payment, transaction.paid, transaction.refused, transaction.refunded, transaction.chargedback, transaction.cancelled, transaction.expired, transaction.in_analysis, submerchant.status.updated, subscription.created, subscription.trial_started, subscription.activated, subscription.past_due, subscription.cancelled, subscription.reactivated, subscription.completed, subscription.renewed Example:
["transaction.status.updated"]
Novo secret HMAC opcional. Se omitido, o secret atual é mantido. Se null, a assinatura HMAC é desligada. Nunca é devolvido nas respostas.
Required string length:
16 - 256Example:
"seu-segredo-compartilhado"
Response
Webhook atualizado com sucesso
Show child attributes
Show child attributes

