# Update merchant details

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

Send only the fields to change, as a JSON body (required for `PATCH`): `name`, `email`, `phone`, `pay_codes` (payment-code patterns extracted from transfer descriptions, array of strings up to 20 characters; `[]` removes all; the extracted code is the webhook's `code` field). Returns the updated merchant. Email already used by another Tino customer: 409 `EMAIL_TAKEN`; invalid data: 422 `VALIDATION_FAILED`. These details are not synced with the customer's Tino profile.

## HTTP request

| Item | Value |
| --- | --- |
| URL | `https://api.tino.vn/service/@id/tinopay` |
| 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 |
| `name` | body | string | — | ≤ 255 |
| `email` | body | string | — | ≤ 255 |
| `phone` | body | string | — | ≤ 20 |
| `pay_codes` | body | array | — | Cấu trúc mã thanh toán trích từ nội dung chuyển khoản, mảng chuỗi ≤ 20 ký tự; [] = bỏ hết |

## Example request

```bash
curl -X PATCH "https://api.tino.vn/service/100001/tinopay" \
  -H "Authorization: Bearer $TINO_TOKEN" \
  -H "Content-Type: application/json" \
  -d '{
  "name": "Cửa hàng ABC",
  "pay_codes": [
    "DH"
  ]
}'
```

`$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")`.

## Example response

```json
{
 "data": {
  "tino_sub": "700001",
  "account_id": 100001,
  "merchant_id": 8,
  "name": "Cửa hàng ABC",
  "email": "billing@example.com",
  "phone": "0900000000",
  "status": "active",
  "pay_codes": [
   "DH"
  ],
  "suspended_at": null,
  "created_at": "2026-10-20T15:32:24+07:00",
  "package": {
   "id": 2,
   "name": "Pro 5000",
   "limit_transactions": 5000,
   "start_at": "2026-10-20",
   "end_at": null
  },
  "bank_accounts": [
   {
    "id": "9c1e6f2a-5b7d-4e1a-9f3c-2d8b6a4e0c11",
    "bank_code": "BIDV",
    "account_no": "96240000001",
    "account_holder_name": "CONG TY ABC",
    "hint_name": "Quầy chính",
    "is_business": true,
    "first_va_number": "9624",
    "service_id": "AP0012",
    "status": "active",
    "provision_status": "active",
    "provision_note": null,
    "activated_at": "2026-10-20T10:00:00+07:00",
    "virtual_accounts_count": 3,
    "created_at": "2026-10-20T09:55:00+07:00"
   }
  ]
 }
}
```

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