Resend transaction webhook
POST /api/resend-webhook/{transactionIdentifier}
POST https://<api-host>/api/resend-webhook/{transactionIdentifier}Requires a Bearer token in the Authorization header. See Generate Token to obtain one.
Resends the webhook of a specific transaction to the configured URL(s) or to a temporary URL (override).
The transaction identifier can be:
- Numeric transaction ID: The ID returned by Gateways (
transactionIdfield in webhooks) - Your reference ID: The identifier you provided when creating the transaction (
externalId) - PIX End-to-End ID: The
e2eIdreturned in webhooks (format: E/D + 32 chars)
Authentication
Requires a Bearer token in the Authorization header.
Path Parameters
| Parameter | Type | Required | Description |
|---|---|---|---|
transactionIdentifier | string | Yes | Transaction identifier: numeric id, externalId, or endToEndId |
Request Body (optional)
| Field | Type | Required | Description |
|---|---|---|---|
url | string | No | Temporary URL for this specific resend. If not provided, the resend goes to all active URLs configured for the event. If a URL is provided, it uses the headers and payload version of the first active URL for the event. The URL is not persisted |
{
"url": "https://meu-servidor.com/webhooks/pix"
}URL Behavior
- If
urlis not provided, the resend is sent to all active URLs configured for the event, each with its own custom headers and payload version - If
urlis provided in the body, uses that URL temporarily (not persisted), with the custom headers and payload version of the first active URL configured for the event - If no URL is available, returns error 400
The resend goes through the same pipeline as the original send: the payload is rebuilt from the transaction's current state and signed with the account's current HMAC secret in the X-Avista-Signature header (until the signing key is generated in the dashboard, the resend is sent without that header).
Code Examples
curl -X POST "https://<api-host>/api/resend-webhook/PAG-2024-0001" \
-H "Authorization: Bearer $PIX_API_TOKEN" \
-H "Content-Type: application/json" \
-d '{
"url": "https://meu-servidor.com/webhooks/pix"
}'const axios = require('axios');
const response = await axios.post('https://<api-host>/api/resend-webhook/PAG-2024-0001',
{
"url": "https://meu-servidor.com/webhooks/pix"
},
{
headers: {
'Authorization': `Bearer ${process.env.PIX_API_TOKEN}`,
'Content-Type': 'application/json',
},
}
);
console.log(response.data);Response (200)
| Field | Type | Description |
|---|---|---|
message | string | Descriptive message of the result |
webhookLogId | number | Webhook log ID generated for auditing |
sentAt | string | Webhook send date/time (ISO 8601) |
statusCode | number | HTTP status code returned by the destination URL |
{
"message": "Webhook resent successfully",
"webhookLogId": 12345,
"sentAt": "2024-01-15T10:30:00.000Z",
"statusCode": 200
}Errors
| Status | Description |
|---|---|
| 400 | No webhook URL available. Configure a webhook for this transaction's operation type or provide a temporary URL in the url field |
| 401 | Invalid, expired, or missing token |
| 404 | Transaction not found or does not belong to the authenticated account |
| 429 | Limit of 60 requests per minute per account exceeded. Wait for the window to reset (Retry-After header) |
| 502 | The target URL responded with a non-2xx status. The body includes message, webhookLogId and sentAt |
| 504 | The target URL did not respond within 10 seconds. The body includes message, webhookLogId and sentAt |