Skip to main content
DELETE
/
v1
/
webhook-endpoints
/
{id}
Remover endpoint de webhook
curl --request DELETE \
  --url https://sandbox.4seletpay.com.br/api/v1/webhook-endpoints/{id} \
  --header 'Authorization: Bearer <token>' \
  --header 'account: <account>'
import requests

url = "https://sandbox.4seletpay.com.br/api/v1/webhook-endpoints/{id}"

headers = {
"account": "<account>",
"Authorization": "Bearer <token>"
}

response = requests.delete(url, headers=headers)

print(response.text)
const options = {
method: 'DELETE',
headers: {account: '<account>', Authorization: 'Bearer <token>'}
};

fetch('https://sandbox.4seletpay.com.br/api/v1/webhook-endpoints/{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://sandbox.4seletpay.com.br/api/v1/webhook-endpoints/{id}",
CURLOPT_RETURNTRANSFER => true,
CURLOPT_ENCODING => "",
CURLOPT_MAXREDIRS => 10,
CURLOPT_TIMEOUT => 30,
CURLOPT_HTTP_VERSION => CURL_HTTP_VERSION_1_1,
CURLOPT_CUSTOMREQUEST => "DELETE",
CURLOPT_HTTPHEADER => [
"Authorization: Bearer <token>",
"account: <account>"
],
]);

$response = curl_exec($curl);
$err = curl_error($curl);

curl_close($curl);

if ($err) {
echo "cURL Error #:" . $err;
} else {
echo $response;
}
package main

import (
"fmt"
"net/http"
"io"
)

func main() {

url := "https://sandbox.4seletpay.com.br/api/v1/webhook-endpoints/{id}"

req, _ := http.NewRequest("DELETE", url, nil)

req.Header.Add("account", "<account>")
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.delete("https://sandbox.4seletpay.com.br/api/v1/webhook-endpoints/{id}")
.header("account", "<account>")
.header("Authorization", "Bearer <token>")
.asString();
require 'uri'
require 'net/http'

url = URI("https://sandbox.4seletpay.com.br/api/v1/webhook-endpoints/{id}")

http = Net::HTTP.new(url.host, url.port)
http.use_ssl = true

request = Net::HTTP::Delete.new(url)
request["account"] = '<account>'
request["Authorization"] = 'Bearer <token>'

response = http.request(request)
puts response.read_body
{
  "mensagem": "Webhook deletado com sucesso",
  "erro": false,
  "mensagenserro": [],
  "codigoretorno": 200,
  "id": "00000000-0000-0000-0000-000000000000",
  "data": []
}
{
"mensagem": "Unauthenticated.",
"erro": true,
"mensagenserro": [],
"codigoretorno": 401,
"id": "00000000-0000-0000-0000-000000000000",
"data": []
}
{
"mensagem": "The charge code does not match any charge",
"erro": true,
"mensagenserro": [],
"codigoretorno": 404,
"id": "00000000-0000-0000-0000-000000000000",
"data": []
}
{
"mensagem": "Um erro aconteceu.",
"erro": true,
"mensagenserro": [
"Erro interno. Tente novamente mais tarde."
],
"codigoretorno": 500,
"id": "00000000-0000-0000-0000-000000000000",
"data": []
}
Requer o header account com o código da conta. O webhook deve pertencer à conta autenticada.
Esta operação é irreversível. O endpoint será removido permanentemente e não receberá mais notificações de eventos.

Authorizations

Authorization
string
header
required

Token JWT obtido via POST /v1/login. Envie no header Authorization: Bearer <token>.

Headers

account
string
required

Código da conta à qual a operação se aplica

Example:

"acc_abc123xyz"

Path Parameters

id
integer
required

ID do webhook a ser removido

Example:

42

Response

Webhook deletado com sucesso

mensagem
string
Example:

"Operação realizada com sucesso"

erro
boolean
Example:

false

mensagenserro
string[]
Example:
[]
codigoretorno
integer
Example:

200

id
string
Example:

"00000000-0000-0000-0000-000000000000"

data
any | null

Dados retornados pela operação (objeto, array ou vazio)