Account Abstraction
Webhook

Account Abstraction Webhook

Why Use a Webhook?

User operations in Xellar's Account Abstraction system are asynchronous. This means that after you initiate an operation (such as a transaction or signature request), the result is not immediately available. Instead, the operation progresses through several states until it reaches a final outcome.

To keep your application updated in real time, Xellar provides a webhook mechanism. This allows your backend to receive notifications about important lifecycle events for user operations, so you can update your UI, trigger business logic, or notify users as soon as the status changes.

🔄

Webhooks are essential for tracking the status of user operations without polling the API.

User Operation Lifecycle Events

The following diagram illustrates the lifecycle of a user operation. Orange-highlighted states are the events that will trigger a webhook notification:

User Operation Lifecycle

  • expired: No signature was submitted before the time limit (validUntil).
  • success: The user operation was processed successfully.
  • failed: The user operation failed during processing or after signature submission.

You will receive a webhook event when the user operation reaches any of these states.

How to Set Up the Webhook

You can configure your webhook endpoint in the Xellar Dashboard.

⚠️

Ensure your webhook endpoint is publicly accessible and can handle POST requests.

Webhook Event Data

When a user operation reaches a terminal state (expired, success, or failed), Xellar will send a POST request to your configured webhook URL with the following JSON payload:

{
  "accountId": "68027beb6a1ae347d38563d7",
  "ownerId": "0x123...abc",
  "clientId": "client-xyz",
  "appId": "app-abc",
  "signature": null,
  "userOpHash": "0xabc...def",
  "status": "success",
  "type": "transfer_erc20",
  "network": "polygon",
  "chainId": 137,
  "payer": "organization",
  "validUntil": "2024-06-01T12:00:00Z",
  "failedReason": null,
  "bundlerVersion": "1.2.3",
  "successAt": "2024-06-01T12:01:00Z",
  "failedAt": null,
  "sentAt": "2024-06-01T12:00:10Z"
}
FieldTypeDescription
accountIdstringThe ID of the smart account involved.
ownerIdstring or objectThe owner identifier (may be a string or object depending on context).
clientIdstringThe client ID associated with the operation.
appIdstringThe app ID associated with the operation.
signaturestring or nullThe signature submitted for the operation, if any.
userOpHashstringThe unique hash of the user operation.
statusstringThe status of the user operation (success, failed, expired).
typestringThe type of user operation (e.g., transfer_erc20).
networkstringThe network name (e.g., polygon).
chainIdintegerThe blockchain network identifier.
payerstringWho paid for the operation (e.g., organization, owner).
validUntilstring (ISO 8601)The time until which the operation is valid.
failedReasonstring or nullThe reason for failure, if any.
bundlerVersionstringThe version of the bundler that processed the operation.
successAtstring or null (ISO 8601)The timestamp when the operation succeeded.
failedAtstring or null (ISO 8601)The timestamp when the operation failed.
sentAtstring or null (ISO 8601)The timestamp when the operation was sent.
ℹ️

Fields such as Data and Receipt are not included in the webhook payload.

ℹ️

Always verify the authenticity of incoming webhook requests and handle them idempotently.