Last updated

๐Ÿงต Send Transaction and Receive Notification via Webhook

This guide documents the full workflow for sending a blockchain transaction and receiving asynchronous status updates via webhook events. It covers how to subscribe to the necessary events and how to interpret transaction outcomes (mined or failed).

๐ŸŒŸ Objective: Ensure clients can programmatically send transactions and handle outcomes via webhook notifications.


๐Ÿ“š OpenAPI Documentation


โœจ Workflow Summary

This workflow includes the following steps:

  1. ๐Ÿ”น Subscribe to webhook events for TX_MINED and TX_FAILED.
  2. ๐Ÿ”น Send a blockchain transaction (e.g. minting an ERC3643 token).
  3. ๐Ÿ”น Receive asynchronous notification via webhook on transaction success or failure.

๐Ÿ“‹ Workflow Steps Table

StepAPI OperationMethodParametersOutputsDescription
Subscribe to All TX EventsPOST /subscriptions/webhooks-eventTypes, callbackUrl, filterByClientsubscriptionIdSubscribes to TX_MINED and TX_FAILED for all transactions by the client
OR: Subscribe by TokenPOST /tokens/{tokenId}/subscriptions/webhook-tokenId, eventTypes, callbackUrlsubscriptionIdSubscribes to TX_MINED and TX_FAILED for a specific token only
Mint Token (example tx)POST /erc3643/{tokenId}/mint-recipient, amount, tokenIdtransactionIdSends a token mint transaction
Receive Webhook EventCallback to callbackUrl-eventType, txHash, status-Event TX_MINED or TX_FAILED sent to the registered callback URL

๐ŸŽจ Workflow Visualizations

๐ŸŒŠ Mermaid Sequence Diagram

ClientAPIBlockchainalt[Transaction mined][Transaction failed]POST /subscriptions/webhooks (or /tokens/{tokenId}/subscriptions/webhook)subscriptionIdPOST /erc3643/{tokenId}/minttransactionIdProcess transactionTX_MINED (with txHash)TX_MINED (with txHash)TX_FAILED (with txHash)TX_FAILED (with txHash)ClientAPIBlockchain