Loa Heo Vàng - Đối tác thanh toán
  1. Partner
Loa Heo Vàng - Đối tác thanh toán
  • Partner
    • Get access token for partner client
      POST
    • Refresh token
      POST
    • Send verification code to speaker device
      POST
    • Register a speaker device for a partner
      POST
    • Unregister a speaker device
      POST
    • Webhook callback endpoint for payment processor to notify transaction status
      POST
    • Update status of multiple speaker devices
      PATCH
    • Create a dynamic QR code for payment
      POST
    • Get speaker device detail
      GET
  • Partner Store
    • Update store information
      PUT
  1. Partner

Register a speaker device for a partner

Develop Env
https://api-test.loaheovang.com
Develop Env
https://api-test.loaheovang.com
POST
/api/v1/partner/device/register
Last modified:2025-08-01 02:37:10
Maintainer:Not configured
Registers a new speaker device for a partner. This endpoint will:
1.
Register a new user if they don't already exist
2.
Create a new store or update existing store with the provided bank account details
3.
Associate the device with the user and store
The verification code must be obtained first by calling the /device/send-verification endpoint. This code will be displayed on the physical device's screen and must be included in the registration request. The code is valid for a limited time and helps verify:
Physical possession of the device
Device is online and functioning
Display screen is working properly
The verification code will expire after 5 minutes. You can request up to 3 verification codes within a 15 minute period. If you exceed this limit, you must wait until the 15 minute period has elapsed before requesting another code.
If the verification code has expired or is invalid, a new code must be requested before registration can proceed.

Request

Authorization
Bearer Token
Provide your bearer token in the
Authorization
header when making requests to protected resources.
Example:
Authorization: Bearer ********************
or
Header Params

Body Params application/jsonRequired

Example
{
    "phoneNumber": "0987654321",
    "deviceSerial": "PTNR2307150001",
    "staticQRCode": "00020101021238540010A00000072701240006970436011223344557802VN5925Nguyen Van A Ban Hang6009HANOI62360105Thanh toan hoa don1122334455630454D8",
    "storeName": "Cafe Milano",
    "identityNumber": "079123456789",
    "bankName": "Ngân hàng TMCP Quân đội",
    "bankCode": "MB",
    "terminalID": "123456789012",
    "bankAccountNumber": "0123456789012",
    "bankAccountName": "NGUYEN VAN A",
    "verificationCode": "123456",
    "rmCode": "SA-123"
}

Request Code Samples

Shell
JavaScript
Java
Swift
Go
PHP
Python
HTTP
C
C#
Objective-C
Ruby
OCaml
Dart
R
Request Request Example
Shell
JavaScript
Java
Swift
curl --location --request POST 'https://api-test.loaheovang.com/api/v1/partner/device/register' \
--header 'x-client-id;' \
--header 'Authorization: Bearer <token>' \
--header 'Content-Type: application/json' \
--data-raw '{
    "phoneNumber": "0987654321",
    "deviceSerial": "PTNR2307150001",
    "staticQRCode": "00020101021238540010A00000072701240006970436011223344557802VN5925Nguyen Van A Ban Hang6009HANOI62360105Thanh toan hoa don1122334455630454D8",
    "storeName": "Cafe Milano",
    "identityNumber": "079123456789",
    "bankName": "Ngân hàng TMCP Quân đội",
    "bankCode": "MB",
    "terminalID": "123456789012",
    "bankAccountNumber": "0123456789012",
    "bankAccountName": "NGUYEN VAN A",
    "verificationCode": "123456",
    "rmCode": "SA-123"
}'

Responses

🟢201Created
application/json
Device successfully registered
Body

Example
{
    "userId": "550e8400-e29b-41d4-a716-446655440000",
    "store": {
        "id": "123e4567-e89b-12d3-a456-426614174000",
        "storeName": "Cafe Milano",
        "ownerName": "Nguyen Van A",
        "identityNumber": "123456789012",
        "bankName": "Ngân hàng TMCP Quân đội (MB Bank)",
        "bankCode": "MB",
        "bankAccountNumber": "0123456789012",
        "bankAccountName": "NGUYEN VAN A",
        "phoneNumber": "0987654321",
        "terminalID": "T123456789",
        "terminalName": "MB-CafeMilano-001",
        "staticQRCode": "00020101021238...[long QR string]",
        "totalTransaction": "1250",
        "totalAmount": "25000000"
    },
    "device": {
        "id": "123e4567-e89b-12d3-a456-426614174000",
        "serial": "TV1001250416000214",
        "deviceName": "Kitchen Speaker",
        "active": true,
        "connected": false,
        "partnerClientId": "partner-123",
        "rmCode": "SA-123",
        "stores": [
            {
                "id": "123e4567-e89b-12d3-a456-426614174000",
                "storeName": "Cafe Milano",
                "ownerName": "Nguyen Van A",
                "identityNumber": "123456789012",
                "bankName": "Ngân hàng TMCP Quân đội (MB Bank)",
                "bankCode": "MB",
                "bankAccountNumber": "0123456789012",
                "bankAccountName": "NGUYEN VAN A",
                "phoneNumber": "0987654321",
                "terminalID": "T123456789",
                "terminalName": "MB-CafeMilano-001",
                "staticQRCode": "00020101021238...[long QR string]",
                "totalTransaction": "1250",
                "totalAmount": "25000000"
            }
        ]
    }
}
🟠400Bad Request
🟠401Unauthorized
Modified at 2025-08-01 02:37:10
Previous
Send verification code to speaker device
Next
Unregister a speaker device
Built with