# Update a webhook

`PATCH /service/@id/tinopay/webhooks/@webhook` · TinoPay, service owner's sign-in token

Send only the fields to change, as a JSON body. A new `bank_account_id` must also belong to the merchant.

## HTTP request

| Item | Value |
| --- | --- |
| URL | `https://api.tino.vn/service/@id/tinopay/webhooks/@webhook` |
| Method | `PATCH` |
| Authentication | the TinoPay service owner's sign-in token (`Authorization: Bearer <token>`); the `/v1` gateway does not expose TinoPay yet |
| Content-Type | `application/json` |

## Parameters

| Name | In | Type | Required | Description |
| --- | --- | --- | --- | --- |
| `id` | path | int | yes | TinoPay service ID |
| `webhook` | path | int | yes | Webhook ID |
| `name` | body | string | — | — |
| `bank_account_id` | body | string | — | — |
| `url` | body | string | — | — |
| `event` | body | string | — | in \| out \| all |
| `token` | body | string | — | — |
| `skip_if_no_code` | body | bool | — | — |
| `virtual_accounts` | body | array | — | — |
| `status` | body | string | — | active \| inactive |

## Example request

```bash
curl -X PATCH "https://api.tino.vn/service/100001/tinopay/webhooks/12" \
  -H "Authorization: Bearer $TINO_TOKEN" \
  -H "Content-Type: application/json" \
  -d '{
  "status": "inactive"
}'
```

`$TINO_TOKEN` is the TinoPay service owner's sign-in token. Path parameters in the example are sample values.

SDK ([SDK & examples](/en/docs/sdk)): no dedicated function yet, use `client.request("PATCH", "/service/@id/tinopay/webhooks/@webhook")`.

## Example response

```json
{
 "data": {
  "id": 12,
  "name": "Đơn hàng website",
  "bank_account_id": "9c1e6f2a-5b7d-4e1a-9f3c-2d8b6a4e0c11",
  "url": "https://example.com/tinopay/hook",
  "token": "<token>",
  "event": "in",
  "skip_if_no_code": false,
  "virtual_accounts": [
   "9624QA01"
  ],
  "status": "inactive",
  "created_at": "2026-10-20T10:10:00+07:00",
  "updated_at": "2026-10-20T10:10:00+07:00"
 }
}
```

Sample built from the TinoPay API v1 documentation (Tino relays TinoPay data as is); values are examples.
