๐งต 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:
- ๐น Subscribe to webhook events for TX_MINED and TX_FAILED.
- ๐น Send a blockchain transaction (e.g. minting an ERC3643 token).
- ๐น Receive asynchronous notification via webhook on transaction success or failure.
๐ Workflow Steps Table
Step | API Operation | Method | Parameters | Outputs | Description |
---|---|---|---|---|---|
Subscribe to All TX Events | POST /subscriptions/webhooks | - | eventTypes , callbackUrl , filterByClient | subscriptionId | Subscribes to TX_MINED and TX_FAILED for all transactions by the client |
OR: Subscribe by Token | POST /tokens/{tokenId}/subscriptions/webhook | - | tokenId , eventTypes , callbackUrl | subscriptionId | Subscribes to TX_MINED and TX_FAILED for a specific token only |
Mint Token (example tx) | POST /erc3643/{tokenId}/mint | - | recipient , amount , tokenId | transactionId | Sends a token mint transaction |
Receive Webhook Event | Callback to callbackUrl | - | eventType , txHash , status | - | Event TX_MINED or TX_FAILED sent to the registered callback URL |