Reenviar entrega de webhook
curl --request POST \
--url https://api.alphagateway.com.br/v1/webhook-deliveries/{id}/resend \
--header 'x-api-key: <api-key>'const options = {method: 'POST', headers: {'x-api-key': '<api-key>'}};
fetch('https://api.alphagateway.com.br/v1/webhook-deliveries/{id}/resend', options)
.then(res => res.json())
.then(res => console.log(res))
.catch(err => console.error(err));import requests
url = "https://api.alphagateway.com.br/v1/webhook-deliveries/{id}/resend"
headers = {"x-api-key": "<api-key>"}
response = requests.post(url, headers=headers)
print(response.text)<?php
$curl = curl_init();
curl_setopt_array($curl, [
CURLOPT_URL => "https://api.alphagateway.com.br/v1/webhook-deliveries/{id}/resend",
CURLOPT_RETURNTRANSFER => true,
CURLOPT_ENCODING => "",
CURLOPT_MAXREDIRS => 10,
CURLOPT_TIMEOUT => 30,
CURLOPT_HTTP_VERSION => CURL_HTTP_VERSION_1_1,
CURLOPT_CUSTOMREQUEST => "POST",
CURLOPT_HTTPHEADER => [
"x-api-key: <api-key>"
],
]);
$response = curl_exec($curl);
$err = curl_error($curl);
curl_close($curl);
if ($err) {
echo "cURL Error #:" . $err;
} else {
echo $response;
}{
"message": "Webhook será reprocessado em breve",
"response": {
"id": "01961234-abcd-7000-8000-0000000000f1"
}
}{
"response": null,
"errors": [
"O valor da transação deve ser maior ou igual a R$1,00"
]
}{
"response": null,
"errors": [
"API key inválida ou expirada"
]
}{
"response": null,
"errors": [
"Credencial não possui permissão para esta funcionalidade, ajuste o escopo da credencial."
]
}{
"response": null,
"errors": [
"Transação não encontrada"
]
}{
"response": null,
"errors": [
"Limite de requisições excedido"
]
}{
"response": null,
"errors": [
"Erro interno"
]
}{
"response": null,
"errors": [
"Este serviço está temporariamente indisponível devido a manutenção"
]
}Webhooks
Reenviar entrega de webhook
Coloca de novo na fila uma entrega com status FAILED (tentativas esgotadas). O envio sai em instantes, para a mesma URL e assinado com a mesma credencial da notificação original (o header Alpha-Signature é recalculado com o horário do reenvio), e recomeça a contagem de tentativas.
POST
/
v1
/
webhook-deliveries
/
{id}
/
resend
Reenviar entrega de webhook
curl --request POST \
--url https://api.alphagateway.com.br/v1/webhook-deliveries/{id}/resend \
--header 'x-api-key: <api-key>'const options = {method: 'POST', headers: {'x-api-key': '<api-key>'}};
fetch('https://api.alphagateway.com.br/v1/webhook-deliveries/{id}/resend', options)
.then(res => res.json())
.then(res => console.log(res))
.catch(err => console.error(err));import requests
url = "https://api.alphagateway.com.br/v1/webhook-deliveries/{id}/resend"
headers = {"x-api-key": "<api-key>"}
response = requests.post(url, headers=headers)
print(response.text)<?php
$curl = curl_init();
curl_setopt_array($curl, [
CURLOPT_URL => "https://api.alphagateway.com.br/v1/webhook-deliveries/{id}/resend",
CURLOPT_RETURNTRANSFER => true,
CURLOPT_ENCODING => "",
CURLOPT_MAXREDIRS => 10,
CURLOPT_TIMEOUT => 30,
CURLOPT_HTTP_VERSION => CURL_HTTP_VERSION_1_1,
CURLOPT_CUSTOMREQUEST => "POST",
CURLOPT_HTTPHEADER => [
"x-api-key: <api-key>"
],
]);
$response = curl_exec($curl);
$err = curl_error($curl);
curl_close($curl);
if ($err) {
echo "cURL Error #:" . $err;
} else {
echo $response;
}{
"message": "Webhook será reprocessado em breve",
"response": {
"id": "01961234-abcd-7000-8000-0000000000f1"
}
}{
"response": null,
"errors": [
"O valor da transação deve ser maior ou igual a R$1,00"
]
}{
"response": null,
"errors": [
"API key inválida ou expirada"
]
}{
"response": null,
"errors": [
"Credencial não possui permissão para esta funcionalidade, ajuste o escopo da credencial."
]
}{
"response": null,
"errors": [
"Transação não encontrada"
]
}{
"response": null,
"errors": [
"Limite de requisições excedido"
]
}{
"response": null,
"errors": [
"Erro interno"
]
}{
"response": null,
"errors": [
"Este serviço está temporariamente indisponível devido a manutenção"
]
}Autorizações
API Key da organização
Parâmetros de caminho
ID da entrega (campo id em GET /v1/webhook-deliveries).