Webhooks

Receiving Webhooks

While creating an inscription order using Create a Direct Inscription Order or Create a Collection Order you can provide a webhook URL and you can receive updates on your orders sent directly to a publicly reachable endpoint you provide.

Here are the regular states an inscription order will go through and the format of the body of POST request your webhookUrl will receive:

Payment seen on mempool, pending confirmation

{
    "id":"4fc7b183-b06f-4cb0-b592-7bc9e9cd05ff",
    "state":"waiting-confirmation"
}

Payment confirmed, inscription data is being prepared

{
    "id":"4fc7b183-b06f-4cb0-b592-7bc9e9cd05ff",
    "state":"prep"
}

Inscription queued for processing

{
    "id":"4fc7b183-b06f-4cb0-b592-7bc9e9cd05ff",
    "state":"queued"
}

File inscribed

Note that you will get below data for each file in your order

{
    "id":"4fc7b183-b06f-4cb0-b592-7bc9e9cd05ff",
    "index":0,
    "file":{
        "iqueued":true,
        "iqueuedAt":1705530878658,
        "name":"test-ordinalsbot.com.txt",
        "s3Key":"d6642396-38eb-4578-b41f-355718723d71_test-ordinalsbot.com.txt",
        "size":15,
        "type":"text/plain",
        "url":"https://ordinalsbot-testnet.s3.amazonaws.com/d6642396-38eb-4578-b41f-355718723d71_test-ordinalsbot.com.txt"
    },
    "tx":{
        "commit":"db3f40a9a5850a7edef8cdd020743273239dbdadd4abaa5c03bf74ff6e2ea269",
        "parent":null,
        "reveal":"b0ae586b6e7d4defb6cd54c5fb87f4311cf1595a5e6674ade31c42a5011b70e0",
        "total_fees":295,
        "inscription":"b0ae586b6e7d4defb6cd54c5fb87f4311cf1595a5e6674ade31c42a5011b70e0i0",
        "updatedAt":"2024-01-17T22:34:40.766Z"
    }
}

Get in touch for any feedback/questions/issues regarding this in #developers channel on our discord: https://discord.ordinalsbot.com

Last updated