Remove
curl --request DELETE \
--url https://api.sandbox.wepayout.com.br/v2/register/companies/webhooks \
--header 'Authorization: Bearer <token>' \
--header 'Content-Type: application/json' \
--data '
{
"url": "<string>",
"account_id": 123
}
'import requests
url = "https://api.sandbox.wepayout.com.br/v2/register/companies/webhooks"
payload = {
"url": "<string>",
"account_id": 123
}
headers = {
"Authorization": "Bearer <token>",
"Content-Type": "application/json"
}
response = requests.delete(url, json=payload, headers=headers)
print(response.text)const options = {
method: 'DELETE',
headers: {Authorization: 'Bearer <token>', 'Content-Type': 'application/json'},
body: JSON.stringify({url: '<string>', account_id: 123})
};
fetch('https://api.sandbox.wepayout.com.br/v2/register/companies/webhooks', 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.sandbox.wepayout.com.br/v2/register/companies/webhooks",
CURLOPT_RETURNTRANSFER => true,
CURLOPT_ENCODING => "",
CURLOPT_MAXREDIRS => 10,
CURLOPT_TIMEOUT => 30,
CURLOPT_HTTP_VERSION => CURL_HTTP_VERSION_1_1,
CURLOPT_CUSTOMREQUEST => "DELETE",
CURLOPT_POSTFIELDS => json_encode([
'url' => '<string>',
'account_id' => 123
]),
CURLOPT_HTTPHEADER => [
"Authorization: Bearer <token>",
"Content-Type: application/json"
],
]);
$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.sandbox.wepayout.com.br/v2/register/companies/webhooks"
payload := strings.NewReader("{\n \"url\": \"<string>\",\n \"account_id\": 123\n}")
req, _ := http.NewRequest("DELETE", 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.delete("https://api.sandbox.wepayout.com.br/v2/register/companies/webhooks")
.header("Authorization", "Bearer <token>")
.header("Content-Type", "application/json")
.body("{\n \"url\": \"<string>\",\n \"account_id\": 123\n}")
.asString();require 'uri'
require 'net/http'
url = URI("https://api.sandbox.wepayout.com.br/v2/register/companies/webhooks")
http = Net::HTTP.new(url.host, url.port)
http.use_ssl = true
request = Net::HTTP::Delete.new(url)
request["Authorization"] = 'Bearer <token>'
request["Content-Type"] = 'application/json'
request.body = "{\n \"url\": \"<string>\",\n \"account_id\": 123\n}"
response = http.request(request)
puts response.read_body{
"message": "Webhook deleted successfully"
}
{
"message": "Webhook not found."
}
{
"error_code": "validation",
"error_description": "Validation error",
"fields": {
"account_id": ["The account does not exist or is not linked to your merchant."]
},
"field_errors": [
{
"field": "account_id",
"code": "invalid_account",
"params": [],
"message": "The account does not exist or is not linked to your merchant."
}
]
}
Webhook
Remove
Remove a registered webhook
DELETE
/
v2
/
register
/
companies
/
webhooks
Remove
curl --request DELETE \
--url https://api.sandbox.wepayout.com.br/v2/register/companies/webhooks \
--header 'Authorization: Bearer <token>' \
--header 'Content-Type: application/json' \
--data '
{
"url": "<string>",
"account_id": 123
}
'import requests
url = "https://api.sandbox.wepayout.com.br/v2/register/companies/webhooks"
payload = {
"url": "<string>",
"account_id": 123
}
headers = {
"Authorization": "Bearer <token>",
"Content-Type": "application/json"
}
response = requests.delete(url, json=payload, headers=headers)
print(response.text)const options = {
method: 'DELETE',
headers: {Authorization: 'Bearer <token>', 'Content-Type': 'application/json'},
body: JSON.stringify({url: '<string>', account_id: 123})
};
fetch('https://api.sandbox.wepayout.com.br/v2/register/companies/webhooks', 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.sandbox.wepayout.com.br/v2/register/companies/webhooks",
CURLOPT_RETURNTRANSFER => true,
CURLOPT_ENCODING => "",
CURLOPT_MAXREDIRS => 10,
CURLOPT_TIMEOUT => 30,
CURLOPT_HTTP_VERSION => CURL_HTTP_VERSION_1_1,
CURLOPT_CUSTOMREQUEST => "DELETE",
CURLOPT_POSTFIELDS => json_encode([
'url' => '<string>',
'account_id' => 123
]),
CURLOPT_HTTPHEADER => [
"Authorization: Bearer <token>",
"Content-Type: application/json"
],
]);
$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.sandbox.wepayout.com.br/v2/register/companies/webhooks"
payload := strings.NewReader("{\n \"url\": \"<string>\",\n \"account_id\": 123\n}")
req, _ := http.NewRequest("DELETE", 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.delete("https://api.sandbox.wepayout.com.br/v2/register/companies/webhooks")
.header("Authorization", "Bearer <token>")
.header("Content-Type", "application/json")
.body("{\n \"url\": \"<string>\",\n \"account_id\": 123\n}")
.asString();require 'uri'
require 'net/http'
url = URI("https://api.sandbox.wepayout.com.br/v2/register/companies/webhooks")
http = Net::HTTP.new(url.host, url.port)
http.use_ssl = true
request = Net::HTTP::Delete.new(url)
request["Authorization"] = 'Bearer <token>'
request["Content-Type"] = 'application/json'
request.body = "{\n \"url\": \"<string>\",\n \"account_id\": 123\n}"
response = http.request(request)
puts response.read_body{
"message": "Webhook deleted successfully"
}
{
"message": "Webhook not found."
}
{
"error_code": "validation",
"error_description": "Validation error",
"fields": {
"account_id": ["The account does not exist or is not linked to your merchant."]
},
"field_errors": [
{
"field": "account_id",
"code": "invalid_account",
"params": [],
"message": "The account does not exist or is not linked to your merchant."
}
]
}
Remove Webhook URL
This endpoint allows removing a registered webhook URL, together with every event it receives.- The webhook is identified by its
urland the optionalaccount_id, both sent in the request body. The path never carries the URL - To stop a single event and keep the others, use Update and send
eventswithout it - Once deleted, none of the webhook’s events are sent to the URL anymore. Each event then goes to the next destination:
- On a subaccount, the main account’s webhook for that event, if there is one (
payin,payoutandkyc— see Subaccounts without a webhook) - Otherwise, for
payinandpayout, thenotification_urlof each transaction, signed with the deprecated API key signature (see Webhook Signature); forkyc, the KYC callback URL previously configured by our Customer Experience team, if any, without thex-webhook-wp-*headers (see KYC Webhook)
- On a subaccount, the main account’s webhook for that event, if there is one (
Registering, updating or removing a webhook may take up to 5 minutes to take effect. Until then, webhooks keep being delivered to the previous destination.
Request Body
string
required
URL of the webhook that will be removed. Together with
account_id, it identifies the webhook.Example: https://my-url.requestcatcher.com/testinteger
ID of the account whose webhook will be removed: your own merchant or one of its subaccounts.When omitted, the webhook of your merchant (the authenticated account) is removed.If the account does not exist or is not linked to your merchant, the request fails with
422 and the invalid_account code. If the account has no webhook with this URL, the request fails with 404.Example: 4521Without
account_id, the removal always targets your merchant, even if the webhook you want to remove was listed by Query under a subaccount. Send the account_id returned with the webhook to remove the right one.Response
Returns 200 OK with a confirmation message on successful deletion.string
Confirmation message.Example:
Webhook deleted successfullyRequest Example
curl --request DELETE \
--url https://api.sandbox.wepayout.com.br/v2/register/companies/webhooks \
--header 'Authorization: Bearer {token}' \
--header 'Content-Type: application/json' \
--data '{
"account_id": 4521,
"url": "https://my-url.requestcatcher.com/test"
}'
const response = await fetch('https://api.sandbox.wepayout.com.br/v2/register/companies/webhooks', {
method: 'DELETE',
headers: {
'Authorization': 'Bearer YOUR_TOKEN',
'Content-Type': 'application/json'
},
body: JSON.stringify({
account_id: 4521,
url: 'https://my-url.requestcatcher.com/test'
})
});
if (response.status === 200) {
console.log('Webhook removed successfully');
}
import requests
url = 'https://api.sandbox.wepayout.com.br/v2/register/companies/webhooks'
headers = {
'Authorization': 'Bearer YOUR_TOKEN',
'Content-Type': 'application/json'
}
data = {
'account_id': 4521,
'url': 'https://my-url.requestcatcher.com/test'
}
response = requests.delete(url, json=data, headers=headers)
if response.status_code == 200:
print('Webhook removed successfully')
{
"message": "Webhook deleted successfully"
}
{
"message": "Webhook not found."
}
{
"error_code": "validation",
"error_description": "Validation error",
"fields": {
"account_id": ["The account does not exist or is not linked to your merchant."]
},
"field_errors": [
{
"field": "account_id",
"code": "invalid_account",
"params": [],
"message": "The account does not exist or is not linked to your merchant."
}
]
}
Was this page helpful?

