Skip to main content

Khởi tạo thông tin máy EDC

POST 

https://api.zengi.biz/v1/oapi/config/device/init

API này được dùng để nạp các thông tin cần thiết cho máy EDC hoạt động như thông tin của hàng, store_id của MoMo, TID-MID của Ngân hàng...

Request

Bodyrequired

DeviceConfig Info

    device_config object

    Thông tin cấu hình Merchant Profile cho máy

    statestring

    Active / inactive cấu hình máy

    Example: active | inactive
    store_namestring

    Tên cửa hàng

    momo_qr_funcboolean

    Bật/tắt chức năng sử dụng MoMo QR

    Example: true
    momo_qr object

    Cấu hình thông tin sử dụng MoMo QR

    client_idstring

    Id của client do MoMo cấp

    client_secretstring

    Mật khẩu của client_id do MoMo cấp

    public_keystring

    Khóa dùng để xử lý mã hóa đồng bộ do MoMo cấp

    merchant_idstring

    Mã Merchant do MoMo cấp

    store_idstring

    Mã cửa hàng do MoMo cấp

    static_qrstring

    Mã VietQR tĩnh được MoMo cấp

    tidmid object[]
  • Array [
  • bincodestringrequired

    bincode của ngân hàng

    Example: 970431
    environmentstringrequired

    Môi trường phát triển (dev)

    Example: dev
    midstringrequired

    Merchant ID do ngân hàng cấp

    Example: 111
    tidstringrequired

    Terminal ID do ngân hàng cấp

    Example: 111
  • ]
  • property name*any

    Thông tin cấu hình Merchant Profile cho máy

    snstring

    Serial Number của máy EDC

Responses

OK

Schema
    data object
    idstring
    Example: 000634F17670D4AAF4450000DA1B0000
    errorobject
    errorCodestring
    Example: 000
    statusCodeinteger
    Example: 200

Authorization: http

name: HTTPBearertype: httpscheme: bearerdescription: Zengi sử dụng phương thức xác thực oAuth2 cho tất cả cá API cung cấp
import http.client
import json

conn = http.client.HTTPSConnection("developer.zengi.vn")
payload = ''
headers = {
'Content-Type': 'application/json',
'Accept': 'application/json',
'Authorization': 'Bearer <token>'
}
conn.request("POST", "/config/device/init", payload, headers)
res = conn.getresponse()
data = res.read()
print(data.decode("utf-8"))
Request Collapse all
Base URL
https://api.zengi.biz/v1/oapi
Auth
Body required
{
  "device_config": {
    "state": "active | inactive",
    "store_name": "string",
    "momo_qr_func": true,
    "momo_qr": {
      "client_id": "string",
      "client_secret": "string",
      "public_key": "string",
      "merchant_id": "string",
      "store_id": "string",
      "static_qr": "string"
    },
    "tidmid": [
      {
        "bincode": "970431",
        "environment": "dev",
        "mid": "111",
        "tid": "111"
      }
    ]
  },
  "sn": "string"
}
ResponseClear

Click the Send API Request button above and see the response here!