Webhooks

Vessel can make server-to-server notification callbacks to your external server. The goal of the callbacks is to provide a convenient method to notify developers of changes to the state of NFT transactions on the block chain.

Add a Webhook

Click Webhooks on the top menu. Enter your own endpoint URL to get Vessel's callbacks and click ADD WEBHOOK button. You need to enter the full path of the callback URL like http://yourserver.com/callbacks

How it works

Vessel sends POST requests with a JSON body payload once the NFT transaction is completed on the blockchain. Vessel makes these callbacks as soon as the transaction is processed but it may be delayed.

If the callback gets non-200 HTTP response code, Vessel will retry the callback multiple times with an exponential delay.

JSON body

JSON body payload has the following fields:

Field NameDescription

fqTn

Fully Qualified Token Name

from

Wallet address from which the NFT is transferred

to

Wallet address to which the NFT is transferred

amount

Amount of the token

type

NFT transaction types. The following types are supported: TOKEN_MINTED TOKEN_MARKETPLACE_ADD_BUY_OFFER TOKEN_MARKETPLACE_REMOVE_BUY_OFFER TOKEN_MARKETPLACE_TAKE_BUY_OFFER TOKEN_MARKETPLACE_ADD_SELL_OFFER TOKEN_MARKETPLACE_REMOVE_SELL_OFFER TOKEN_MARKETPLACE_TAKE_SELL_OFFER

messageSignature

The unique message signature

messageDigest

sha256(messageSignature + Your_Webhook_Salt), Your_Webhook_Salt can be found on the Webhooks page in the Vessel dashboard.

The example of the JSON payload:

{
  "fqTn":"com.develop.collections.my-collection.best-token",
  "amount":9,
  "from":"0x96c8d60cb56755deced90787766415a1d3b0807b",
  "to":"0x629393a107306bdf3e11212945ace6ce640e62ce",
  "type":"TOKEN_MINTED",
  "messageSignature":"token_event_com.develop.collections.my-collection.best-tojken_948a41aa-82fb-3a46-a833-ce838071d2e3",
  "messageDigest":"RXQN5GHx4M5xyHizK5nUw9V9PPOPZ7c8QmZ3g6T2/1o=",
}

Last updated