> For the complete documentation index, see [llms.txt](https://developers.vinid.net/llms.txt). Markdown versions of documentation pages are available by appending `.md` to page URLs; this page is available as [Markdown](https://developers.vinid.net/tai-lieu-tich-hop/tich-hop-voi-vinid-loyalty/dich-vu-topup-vinid-point/deprecated-apis.md).

# Deprecated APIs

## APIs

## Get user info by phone number

<mark style="color:blue;">`GET`</mark> `{API-HOST}/merchant-integration/v1/loyalty/topup/member?{parameters}`

API cho merchant để kiểm tra thông tin của số điện thoại người dùng.

#### Path Parameters

| Name          | Type   | Description                                                                               |
| ------------- | ------ | ----------------------------------------------------------------------------------------- |
| phone\_number | string | Số điện thoại của người dùng theo định dạng 0xxxxxxx. Tối thiểu 10 ký tự. Tối đa 11 ký tự |
| store\_code   | string | Mã cửa hàng của merchant tại VinID                                                        |
| pos\_code     | string | Mã máy POS của merchant tại VinID                                                         |

{% tabs %}
{% tab title="200 " %}

```
{
  "meta": {
    "code": int,
    "message": "string"
  },
  "data": {
    "full_name":        string,
    "phone_number":     string,
    "dob":              string,
    "gender":           string,
    "identify":         string,  // Số điện thoại cá nhân
    "status":           string,  // A: Active | I: Inactive | B: Block
    "card_status":      string   // A: Active | I: Inactive
  }
}
```

{% endtab %}
{% endtabs %}

{% code title="REQUEST TEMPLATE" %}

```
{API-HOST}/merchant-integration/v1/loyalty/topup/member?phone_number=string&store_code=string&pos_code=string
```

{% endcode %}

## Top-up points to phone number

<mark style="color:green;">`POST`</mark> `{API-HOST}/merchant-integration/v1/loyalty/topup`

API để nạp điểm cho số điện thoại người dùng

#### Request Body

| Name          | Type    | Description                                                                                                                                      |
| ------------- | ------- | ------------------------------------------------------------------------------------------------------------------------------------------------ |
| phone\_number | string  | <p>Số điện thoại nhận điểm theo định dạng <code>0xxxxxxx</code><br>Tối thiểu 10 ký tự. Tối đa 11 ký tự.</p>                                      |
| store\_code   | string  | Mã cửa hàng của merchant tại VinID                                                                                                               |
| pos\_code     | string  | Mã máy POS của merchant tại VinID                                                                                                                |
| point\_amount | integer | <p>Số điểm cần nạp. Tối thiểu <code>50</code> .Tối đa <code>20000000</code> <br>Nhỏ hơn <code>20000</code> nếu xuất hóa đơn</p>                  |
| order\_id     | string  | Mã hóa đơn của merchant                                                                                                                          |
| txn\_id       | string  | <p>Mã giao dịch nạp điểm của đối tác với VinID. <br>Tối đa 23 ký tự. Merchant tự sinh unique theo định dạng <code>{{store\_code}}xxxx</code></p> |
| send\_receipt | boolean | <p>Yêu cầu xuất hóa đơn <br> <code>true</code>: có. <code>false</code> : không</p>                                                               |
| receipt\_info | object  | <p>Thông tin để xuất hóa đơn<br>Tất cả các trường thông tin bên dưới sẽ required nếu xuất hóa đơn</p>                                            |
| name          | string  | <p>Tên ghi hóa đơn<br>Tối đa 50 ký tự</p>                                                                                                        |
| address       | string  | <p>Địa chỉ ghi hóa đơn<br>Tối đa 100 ký tự</p>                                                                                                   |
| email         | string  | <p>Email ghi hóa đơn (Yêu cầu truyền đúng định dạng)<br>Tối đa 50 ký tự.</p>                                                                     |
| tax\_code     | string  | <p>Mã số thuế ghi hóa đơn.<br>Tối đa 32 ký tự</p>                                                                                                |

{% tabs %}
{% tab title="200 " %}

```
{
  "meta": {
    "code": 200,
    "message": "OK"
}
```

{% endtab %}
{% endtabs %}

{% code title="REQUEST TEMPLATE" %}

```
{
  "phone_number": "string",
  "store_code" : "string",
  "pos_code" : "string",
  "point_amount":2,
  "order_id": "string",
  "txn_id":"string",
  "send_receipt": true/false,
  "receipt_info": {
    "name": "string",
    "address": "string",
    "email": "string",
    "tax_code": "string"
    }
}
```

{% endcode %}

## Query order status

<mark style="color:blue;">`GET`</mark> `{API-HOST}/merchant-integration/v1/loyalty/topup/status?{parameters}`

API để kiểm tra trạng thái đơn hàng

#### Path Parameters

| Name        | Type   | Description                                                                          |
| ----------- | ------ | ------------------------------------------------------------------------------------ |
| txn\_id     | string | <p>Mã giao dịch nạp điểm cần kiểm tra<br>(Là mã merchant đã dùng ở API nạp điểm)</p> |
| store\_code | string | Mã cửa hàng của merchant tại VinID                                                   |
| pos\_code   | string | Mã máy POS của merchant tại VinID                                                    |

{% tabs %}
{% tab title="200 " %}

```
{
  "meta": {
    "code": int,
    "message": "string"
  },
  "data": {
    "type": "string", //TXN_SALE | TXN_EARN | TXN_BURN | TXN_REFUND
    "status": "string" //SUCCESS | ERROR
  }}
```

{% endtab %}
{% endtabs %}

{% code title="REQUEST TEMPLATE" %}

```
{API-HOST}/merchant-integration/v1/loyalty/topup/status?txn_id=string&store_code=string&pos_code=string
```

{% endcode %}

## Mã lỗi

| Code    | **Message**                                         |
| ------- | --------------------------------------------------- |
| 4000001 | Dữ liệu không hợp lệ                                |
| 4000306 | Thẻ chưa được kích hoạt hoặc tạm thời bị khóa       |
| 4000307 | TnxID đã tồn tại                                    |
| 4000315 | Tài khoản không tồn tại                             |
| 4000318 | Tài khoản có nguy cơ tiềm ẩn                        |
| 4000326 | Tài khoản chưa được kích hoạt hoặc tạm thời bị khóa |
| 4000328 | Quá giới hạn số điểm cho phép để xuất hóa đơn       |
| 4010001 | Lỗi trong quá trình chứng thực yêu cầu              |
| 4030302 | Store/POS không tồn tại                             |

Tham khảo bảng [Mã lỗi chung](/tai-lieu-tich-hop/bang-ma-loi.md)

Xem thêm:

* [API Host](/tai-lieu-tich-hop/moi-truong-tich-hop.md)
* [Quy tắc kết nối](/tai-lieu-tich-hop/quy-tac-ket-noi.md)


---

# 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://developers.vinid.net/tai-lieu-tich-hop/tich-hop-voi-vinid-loyalty/dich-vu-topup-vinid-point/deprecated-apis.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.
