본문으로 건너뛰기

Webhook Events: Mint Request

The Mint Request webhook complements the Minting API by providing the status of mint requests. Successful mints include mappings for reference_id, token_id, and activity_id. Utilise this webhook to generate metadata files with filenames matching the token_id.

Mint Request webhook event details from the Minting APIMint Request webhook event details from the Minting API

💡Minting API Enablement
The Minting API is now live on mainnet.

To gain access to the minting API on mainnet, please complete the following steps in Hub. Kindly note that during the initial launch period, the minting API is exclusively available to partners under contract with Immutable.

The Minting API is available to all developers using Immutable's preset contracts on testnet.

If you are using Immutable unified SDK, the quickstart guide has a mint tokens section that can simplify your implementation.

What information does the Mint Requests webhook event provide?

The Mint Requests webhooks can be used in conjunction with the Minting API to determine the status of the mint request. This information is delivered through subscribing to imtbl_zkevm_mint_request_updated events.

The event also provides the following useful fields for successful mints:

  • Reference ID
  • Token ID
  • Activity ID
  • Transaction Hash

The Minting API currently facilitates the mintBatchByQuantity() minting function, which does not allow the minter to specify token_id at the time of mint to achieve greater gas efficencies.

The minter provides a reference_id with the Minting API request, the mapping between reference_id and token_id is notified via this webhook.

This enables the content creator to create a metadata file with a filename equal to the token_id once the Mint Requests webhooks publishes the system generated token_id.

For more information on metadata standards, see the following product page.

Example responses

Below are some examples of imtbl_zkevm_mint_request_updated events for common use-cases:

New Minting API Request (pending processing)
{
"event_name": "imtbl_zkevm_mint_request_updated",
"event_id": "018daaed-571b-9ed6-8701-941ce2e51f90",
"chain": "imtbl-zkevm-testnet",
"data": {
"chain": {
"id": "eip155:15003",
"name": "imtbl-zkevm-testnet"
},
"contract_address": "0xe8afbb0c7f7a6950b97c9d77d694a7ddea886670",
"owner_address": "0x4F807B88fD898115C6c58158599d39184Cbe5Bd2",
"reference_id": "111221",
"metadata_id": "018dc471-9d9a-aaf7-c6e6-4a2014453958",
"token_id": null,
"status": "pending",
"transaction_hash": null,
"activity_id": null,
"error": null,
"created_at": "2024-02-12T05:35:35.743242Z",
"updated_at": "2024-02-12T05:35:35.743242Z"
}
}
New Minting API Request (successful mint)
{
"event_name": "imtbl_zkevm_mint_request_updated",
"event_id": "018daaed-571b-9ed6-8701-941ce2e51f90",
"chain": "imtbl-zkevm-testnet",
"data": {
"chain": {
"id": "eip155:15003",
"name": "imtbl-zkevm-testnet"
},
"contract_address": "0xe8afbb0c7f7a6950b97c9d77d694a7ddea886670",
"owner_address": "0x4F807B88fD898115C6c58158599d39184Cbe5Bd2",
"reference_id": "111221",
"metadata_id": "018dc471-9d9a-aaf7-c6e6-4a2014453958",
"token_id": "340282366920938463463374607431768220192",
"status": "pending",
"transaction_hash": "0x6ec0f8006b8dce32322fb7939d633b23ea3dec039fd892f932dd65bcb4f547c8",
"activity_id": "018d8201-ff6e-80b8-552a-26df4e7749e3",
"error": null,
"created_at": "2024-02-12T05:35:35.743242Z",
"updated_at": "2024-02-12T05:35:35.743242Z"
}
}