
This guide explains how to set up and handle callbacks from Evrotrust. Callbacks are asynchronous notifications sent by Evrotrust to your server when certain events occur (e.g., a document is signed, expires, or is rejected). These notifications allow your application to react in real-time without polling the API.
The process relies on server-to-server communication, with no built-in security headers in the callback requests. Security is achieved through IP whitelisting and proper endpoint validation. Always implement this on a secure, server-side endpoint (not client-side).
Webhook Endpoint: A publicly accessible URL on your server that can handle HTTP POST requests (e.g., https://yourdomain.com/evrotrust-callback).
Server Environment: Support for handling JSON payloads (e.g., Node.js, Python, PHP, Java).
Security: Use HTTPS for your endpoint. Whitelist Evrotrust's IP addresses to restrict access.
Logging and Error Handling: Implement logging for debugging and retries.
When making API requests to Evrotrust that support callbacks (e.g., initiating a document signing process), include a urlCallback parameter in the request body or query string.
This parameter should point to your server's webhook endpoint.
Example in JSON request body:
{
"urlCallback": "https://yourdomain.com/evrotrust-callback"
}
Evrotrust triggers a callback when an event occurs, such as:
Document signed successfully.
Document expired.
Document rejected.
Other status changes (consult Evrotrust API docs for full event list).
The callback is an HTTP POST request to your specified urlCallback.
No Security Headers: Requests do not include authentication headers. Rely on IP whitelisting (see Step 5) and validate the payload internally (e.g., check if transactionID matches an active transaction in your database).
The payload is in application/json format.
Expected fields:
transactionID: String or integer – The unique ID of the transaction (matches the one from your initial request).
status: Integer or string – The status code of the transaction (e.g., "signed", "expired", "rejected"). Refer to Evrotrust documentation for exact codes.
rejectReason: String (optional) – Only present if the status is "rejected". Describes the reason (e.g., "user declined").
Parameter | Description | Type | |
transactionID | The unique ID of the transaction (matches the one from the response of your initial request) | string | |
status |
| int | |
rejectReason | Only present if the status is 3 (rejected). Describes the reason (e.g., "user declined") | String |
Example payload:
In your endpoint, read the request body, parse the JSON, and process accordingly (e.g., update your database, notify users).
Evrotrust expects a HTTP 200 OK response to confirm receipt.
Timeout and Retries: The request times out after 30 seconds if no 200 is received. Evrotrust will retry up to 2 more times (total 3 attempts) before stopping.
Best practices:
Respond quickly (under 30 seconds) to avoid retries.
If processing takes time, acknowledge with 200 immediately and handle asynchronously (e.g., queue the task).
Return a simple empty body.
Evrotrust sends callbacks from specific IP addresses:
Test Environment: You can skip whitelisting
Production Environment: ip-ranges.amazonaws.com/ip-ranges.json
Configure your server or firewall to only accept requests from these IPs.
No Callbacks Received: Verify urlCallback is set correctly and your endpoint is accessible. Test with tools like Postman.
Retries Occurring: Ensure your endpoint responds in <30 seconds. Check server logs for delays.
Security Issues: Ensure you are whitelisting the proper IP for each environment. Check if you are still blocking requests.
API Documentation: Consult Evrotrust's official docs for exact status codes, additional fields, or event types.