curl --request POST \
--url https://sandbox.mx.ntxpay.com/api/webhooks-config/test \
--header 'Authorization: Bearer <token>' \
--header 'Content-Type: application/json' \
--data '
{
"status": "LIQUIDATED",
"overrideUrl": "<string>",
"amountCentavos": 1000
}
'import requests
url = "https://sandbox.mx.ntxpay.com/api/webhooks-config/test"
payload = {
"status": "LIQUIDATED",
"overrideUrl": "<string>",
"amountCentavos": 1000
}
headers = {
"Authorization": "Bearer <token>",
"Content-Type": "application/json"
}
response = requests.post(url, json=payload, headers=headers)
print(response.text)const options = {
method: 'POST',
headers: {Authorization: 'Bearer <token>', 'Content-Type': 'application/json'},
body: JSON.stringify({status: 'LIQUIDATED', overrideUrl: '<string>', amountCentavos: 1000})
};
fetch('https://sandbox.mx.ntxpay.com/api/webhooks-config/test', 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.mx.ntxpay.com/api/webhooks-config/test",
CURLOPT_RETURNTRANSFER => true,
CURLOPT_ENCODING => "",
CURLOPT_MAXREDIRS => 10,
CURLOPT_TIMEOUT => 30,
CURLOPT_HTTP_VERSION => CURL_HTTP_VERSION_1_1,
CURLOPT_CUSTOMREQUEST => "POST",
CURLOPT_POSTFIELDS => json_encode([
'status' => 'LIQUIDATED',
'overrideUrl' => '<string>',
'amountCentavos' => 1000
]),
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://sandbox.mx.ntxpay.com/api/webhooks-config/test"
payload := strings.NewReader("{\n \"status\": \"LIQUIDATED\",\n \"overrideUrl\": \"<string>\",\n \"amountCentavos\": 1000\n}")
req, _ := http.NewRequest("POST", 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.post("https://sandbox.mx.ntxpay.com/api/webhooks-config/test")
.header("Authorization", "Bearer <token>")
.header("Content-Type", "application/json")
.body("{\n \"status\": \"LIQUIDATED\",\n \"overrideUrl\": \"<string>\",\n \"amountCentavos\": 1000\n}")
.asString();require 'uri'
require 'net/http'
url = URI("https://sandbox.mx.ntxpay.com/api/webhooks-config/test")
http = Net::HTTP.new(url.host, url.port)
http.use_ssl = true
request = Net::HTTP::Post.new(url)
request["Authorization"] = 'Bearer <token>'
request["Content-Type"] = 'application/json'
request.body = "{\n \"status\": \"LIQUIDATED\",\n \"overrideUrl\": \"<string>\",\n \"amountCentavos\": 1000\n}"
response = http.request(request)
puts response.read_body{
"delivered": true,
"url": "<string>",
"eventId": "<string>",
"status": "<string>",
"signed": true,
"statusCode": 123,
"timeMs": 123,
"signatureHeader": "<string>",
"payloadSent": {},
"merchantResponse": "<unknown>"
}Enviar webhook de teste
Requer Bearer JWT. Dispara um webhook de teste assinado (X-NTXPay-Signature) no webhook configurado para o eventType escolhido — ou numa overrideUrl (ex.: webhook.site). Use status REJECTED/RETURNED para simular estados de ERRO. One-shot (sem retry).
curl --request POST \
--url https://sandbox.mx.ntxpay.com/api/webhooks-config/test \
--header 'Authorization: Bearer <token>' \
--header 'Content-Type: application/json' \
--data '
{
"status": "LIQUIDATED",
"overrideUrl": "<string>",
"amountCentavos": 1000
}
'import requests
url = "https://sandbox.mx.ntxpay.com/api/webhooks-config/test"
payload = {
"status": "LIQUIDATED",
"overrideUrl": "<string>",
"amountCentavos": 1000
}
headers = {
"Authorization": "Bearer <token>",
"Content-Type": "application/json"
}
response = requests.post(url, json=payload, headers=headers)
print(response.text)const options = {
method: 'POST',
headers: {Authorization: 'Bearer <token>', 'Content-Type': 'application/json'},
body: JSON.stringify({status: 'LIQUIDATED', overrideUrl: '<string>', amountCentavos: 1000})
};
fetch('https://sandbox.mx.ntxpay.com/api/webhooks-config/test', 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.mx.ntxpay.com/api/webhooks-config/test",
CURLOPT_RETURNTRANSFER => true,
CURLOPT_ENCODING => "",
CURLOPT_MAXREDIRS => 10,
CURLOPT_TIMEOUT => 30,
CURLOPT_HTTP_VERSION => CURL_HTTP_VERSION_1_1,
CURLOPT_CUSTOMREQUEST => "POST",
CURLOPT_POSTFIELDS => json_encode([
'status' => 'LIQUIDATED',
'overrideUrl' => '<string>',
'amountCentavos' => 1000
]),
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://sandbox.mx.ntxpay.com/api/webhooks-config/test"
payload := strings.NewReader("{\n \"status\": \"LIQUIDATED\",\n \"overrideUrl\": \"<string>\",\n \"amountCentavos\": 1000\n}")
req, _ := http.NewRequest("POST", 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.post("https://sandbox.mx.ntxpay.com/api/webhooks-config/test")
.header("Authorization", "Bearer <token>")
.header("Content-Type", "application/json")
.body("{\n \"status\": \"LIQUIDATED\",\n \"overrideUrl\": \"<string>\",\n \"amountCentavos\": 1000\n}")
.asString();require 'uri'
require 'net/http'
url = URI("https://sandbox.mx.ntxpay.com/api/webhooks-config/test")
http = Net::HTTP.new(url.host, url.port)
http.use_ssl = true
request = Net::HTTP::Post.new(url)
request["Authorization"] = 'Bearer <token>'
request["Content-Type"] = 'application/json'
request.body = "{\n \"status\": \"LIQUIDATED\",\n \"overrideUrl\": \"<string>\",\n \"amountCentavos\": 1000\n}"
response = http.request(request)
puts response.read_body{
"delivered": true,
"url": "<string>",
"eventId": "<string>",
"status": "<string>",
"signed": true,
"statusCode": 123,
"timeMs": 123,
"signatureHeader": "<string>",
"payloadSent": {},
"merchantResponse": "<unknown>"
}Authorizations
JWT obtido em POST /api/auth/token
Body
Evento a simular (qual webhook recebe).
cash_in, cash_out, refund_in, refund_out, internal_transfer Status no payload. REJECTED/RETURNED simulam estados de ERRO.
LIQUIDATED, PENDING, REJECTED, RETURNED URL temporária de teste (ex.: webhook.site). Se omitida, entrega na URL configurada. A assinatura usa o secret do webhook configurado.
Valor em centavos (default 1000 = $10).
x >= 1Response
Resultado da entrega (delivered, statusCode, payloadSent, assinatura).
true = o endpoint do integrador respondeu 2xx.
URL para onde o webhook de teste foi enviado.
ID do evento (header x-event-id) — use para idempotência.
true = payload assinado (X-NTXPay-Signature).
Status HTTP que o endpoint do integrador respondeu (0 = erro de conexão).
Header X-NTXPay-Signature enviado (sha256=).
Payload enviado — compare com o que seu endpoint recebeu.
Trecho da resposta do seu endpoint.