# Payment code patterns

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

Patterns TinoPay uses to extract `code` from the transfer content (the webhook's `code` field), also the order code prefix of the Sapo integration. Returns `[{prefix, suffix_from, suffix_to, character_type}]`; e.g. `DH` + 6–8 digits: content `DH123456 thanh toan` gives the code `DH123456`.

## HTTP request

| Item | Value |
| --- | --- |
| URL | `https://api.tino.vn/service/@id/tinopay/pay-codes` |
| Method | `GET` |
| Authentication | the TinoPay service owner's sign-in token (`Authorization: Bearer <token>`); the `/v1` gateway does not expose TinoPay yet |
| Content-Type | — (no body) |

## Parameters

| Name | In | Type | Required | Description |
| --- | --- | --- | --- | --- |
| `id` | path | int | yes | TinoPay service ID |

## Example request

```bash
curl "https://api.tino.vn/service/100001/tinopay/pay-codes" \
  -H "Authorization: Bearer $TINO_TOKEN"
```

`$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("GET", "/service/@id/tinopay/pay-codes")`.

## Example response

```json
{
 "data": [
  {
   "prefix": "DH",
   "suffix_from": 6,
   "suffix_to": 8,
   "character_type": "NumberOnly"
  }
 ]
}
```

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