> For the complete documentation index, see [llms.txt](https://docs.v2.like.co/llms.txt). Markdown versions of documentation pages are available by appending `.md` to page URLs; this page is available as [Markdown](https://docs.v2.like.co/developer/like-pay/web-widget/webhook.md).

# Webhook

{% hint style="warning" %}
The documentation is designed for Liker Land and LikeCoin v2. For information on [3ook.com](https://3ook.com/) and LikeCoin v3, please visit [docs.3ook.com](https://docs.3ook.com) and [dao.like.co](https://dao.like.co/).
{% endhint %}

### Setup:

Please contact us for setting up the webhook for your agent account. You must set the parameter `via` when using LIKE pay to be able to receive notification

### Specification:

#### Transaction Information (tx):

| Key        | Description                                                       |
| ---------- | ----------------------------------------------------------------- |
| from       | Sender cosmos wallet                                              |
| fromId     | Sender Liker ID                                                   |
| to         | Receiver cosmos wallet                                            |
| toId       | Receiver Liker ID                                                 |
| ts         | Originating timestamp                                             |
| completeTs | Transaction complete timestamp                                    |
| txHash     | Transaction hash                                                  |
| remarks    | Transaction remarks/memo                                          |
| status     | Transaction status, possible values: pending/success/fail/timeout |
| type       | Transaction type                                                  |
| amount     | Transfer amount                                                   |

#### Transaction Metadata(metadata):

| Key         | Description                                   |
| ----------- | --------------------------------------------- |
| likePay     | Parameters entered when using LIKE pay widget |
| toIds       | Receiver Liker IDs                            |
| amounts     | Receiver LIKE amounts in string               |
| agentID     | The \`via\` parameter Liker ID                |
| agentFee    | Agent fee if set                              |
| redirectUri | Redirect URI if set                           |
| remarks     | LIKE pay transaction remarks                  |
| blocking    | if `blocking` flag was set                    |
| state       | `state` parameters if set                     |

### Example event:

```
{
  "tx": {
    "from": "cosmos1wfu97hwfv5ukc0xjyutajq9e6w5xkcdprlmyhj",
    "ts": 1611659587189,
    "to": "cosmos1rcgfvhgvc6r066w9gzvkt74qx5uk9zj8yr6yf3",
    "amount": {
      "amount": "1000000000",
      "denom": "nanolike"
    },
    "completeTs": 1611659583719,
    "txHash": "30A19D04DEFFF62BC3BC268EE3E391C691231EBA87ADC032A2D99D56AC401959",
    "toId": "ckxpress",
    "fromId": "williamchong-du",
    "remarks": "LIKE pay via developer",
    "status": "success",
    "type": "cosmosTransfer"
  },
  "metadata": {
    "likePay": {
      "agentId": "developer",
      "amounts": [
        "1"
      ],
      "remarks": "LIKE pay via developer",
      "agentFee": "0",
      "toIds": [
        "ckxpress"
      ]
    }
  }
}
```


---

# Agent Instructions
This documentation is published with GitBook. GitBook is the documentation platform designed so that both humans and AI agents can read, navigate, and reason over technical content effectively. Learn more at gitbook.com.

## Querying This Documentation
If you need additional information that is not directly available in this page, you can query the documentation dynamically by asking a question.

Perform an HTTP GET request on the current page URL with the `ask` query parameter:

```
GET https://docs.v2.like.co/developer/like-pay/web-widget/webhook.md?ask=<question>
```

The question should be specific, self-contained, and written in natural language.
The response will contain a direct answer to the question and relevant excerpts and sources from the documentation.

Use this mechanism when the answer is not explicitly present in the current page, you need clarification or additional context, or you want to retrieve related documentation sections.
