Khởi tạo lệnh chi hộ
Khởi tạo lệnh chi hộ theo mô hình Maker/Checker (dành riêng cho BIDV)
Header Request
| Header | Bắt buộc | Mô tả |
|---|---|---|
Content-Type | ✓ | application/json |
x-client-id | ✓ | Mã định danh của đối tác do TINGEE cung cấp. |
x-signature | ✓ | Chữ ký xác thực HMAC SHA512. |
x-request-timestamp | ✓ | Thời gian gửi request (format: yyyyMMddHHmmssSSS, múi giờ UTC+7) |
Body Parameter
💡 Cơ chế áp dụng thông số giao dịch (Global vs Record-level)
Hệ thống hỗ trợ truyền tham số theo hai cấp độ để tối ưu hóa việc tạo lệnh chi đơn và chi lô:
- Cấp độ chung (Global): Các trường như
transactionType,feeMethod,paymentMethod, vàeffectiveDatekhi được truyền ở cấu trúc ngoài cùng của payload sẽ đóng vai trò là giá trị mặc định áp dụng cho tất cả các giao dịch bên trong danh sách `records`.- Cấp độ chi tiết (Record-level): Nếu các trường trên được chỉ định cụ thể cho từng phần tử trong mảng `records`, hệ thống sẽ ưu tiên sử dụng giá trị này, ghi đè lên giá trị mặc định ở cấp độ chung.
| Trường | Kiểu | Bắt buộc | Mô tả |
|---|---|---|---|
bankBin | string | ✓ | Mã BIN ngân hàng. Truyền cố định 970418 (Mã BIN của BIDV) |
action | string | ✓ | Loại thao tác của người tạo lệnh Chi hộ - REQUEST_APPROVAL: Lưu và Đẩy duyệt giao dịch chi hộ ngay lập tức - INIT: Lưu nháp giao dịch chi hộ để đẩy duyệt sau |
actionType | string | ✓ | Mục đích của lệnh Chi hộ - INTERNAL_TRANSFER: Chuyển tiền trong nước - SALARY: Thanh toán Lương - BILL_PAYMENT: Thanh toán Hóa đơn-Bảng kê |
senderAccountNumber | string | ✓ | Số tài khoản thanh toán (trích nợ) |
senderAccountName | string | ✕ | Tên chủ tài khoản thanh toán. |
transactionType | string | ~ | Loại giao dịch (áp dụng chung) - in-bank : Nội bộ ngân hàng - fast-out: Chuyển nhanh NAPAS 247 - regular-out: Chuyển thường liên ngân hàng Bắt buộc nếu không truyền ở cấp chi tiết. |
feeMethod | string | ~ | Cách thức thu phí (áp dụng chung) - O : Tài khoản thanh toán chịu phí - B: Tài khoản nhận tiền chịu phí Bắt buộc nếu không truyền ở cấp chi tiết. |
paymentMethod | string | ~ | Cách thức hạch toán (áp dụng chung) - to-acc : Hạch toán đến STK người nhận - to-id: Hạch toán đến GTTT người nhận Bắt buộc nếu không truyền ở cấp chi tiết. |
effectiveDate | string | ~ | Ngày hạch toán giao dịch phía Ngân hàng (format: yyyy-MM-dd) (áp dụng chung) Bắt buộc nếu không truyền ở cấp chi tiết. |
remark | string | ~ | Nội dung chuyển tiền / diễn giải giao dịch chung Bắt buộc truyền với giao dịch chi lô. Với chi đơn lẻ không bắt buộc. |
approvalNote | string | ~ | Ghi chú của người tạo lệnh Bắt buộc khi truyền thao tác action là: REQUEST_APPROVAL |
currency | string | ✕ | Loại tiền tệ hạch toán của tài khoản thanh toán (mặc định: VND) |
records | array | ✓ | Danh sách bản ghi giao dịch cần tạo - Lệnh chi đơn: mảng gồm 1 phần tử - Lệnh chi lô: mảng gồm n phần tử |
Chi tiết phần tử trong records
| Trường | Kiểu | Bắt buộc | Mô tả |
|---|---|---|---|
requestId | string | ✓ | Mã tham chiếu giao dịch do đối tác tự sinh, dùng để đối chiếu kết quả. Phải là duy nhất với mỗi giao dịch |
receiverAccountNumber | string | ~ | Số tài khoản của người nhận tiền Bắt buộc khi paymentMethod là to-acc |
receiverId | string | ~ | Số giấy tờ tùy thân (CMND/CCCD/Hộ chiếu) của người nhận Bắt buộc khi paymentMethod là to-id |
receiverIdIssueDate | string | ~ | Ngày cấp GTTT (Định dạng: yyyy-MM-dd) Bắt buộc khi paymentMethod là to-id |
receiverIdIssueAddress | string | ~ | Nơi cấp GTTT Bắt buộc khi paymentMethod là to-id |
receiverBranchCode | string | ~ | Mã chi nhánh ngân hàng nhận tiền Bắt buộc khi paymentMethod là to-id |
receiverAccountName | string | ✓ | Tên chủ tài khoản người nhận (không dấu, viết IN HOA) |
amount | number | ✓ | Số tiền giao dịch |
receiverBankBin | string | ✓ | Mã BIN ngân hàng nhận tiền. Xem tại Danh sách ngân hàng hỗ trợ |
remark | string | ~ | Nội dung chuyển tiền / diễn giải giao dịch Bắt buộc khi khởi tạo giao dịch chi theo lô. Với chi đơn lẻ không bắt buộc. |
receiverCurrency | string | ✕ | Loại tiền tệ của tài khoản người nhận (mặc định: VND) |
transactionType | string | ~ | Loại giao dịch (áp dụng riêng) - in-bank: Nội bộ ngân hàng - fast-out: Chuyển nhanh NAPAS 247 - regular-out: Chuyển thường liên ngân hàng Nếu truyền sẽ ưu tiên sử dụng (ghi đè giá trị chung). Bắt buộc nếu chưa cấu hình ở cấp độ chung. |
paymentMethod | string | ~ | Cách thức hạch toán (áp dụng riêng) - to-acc: Hạch toán đến STK người nhận - to-id: Hạch toán đến GTTT người nhận Nếu truyền sẽ ưu tiên sử dụng (ghi đè giá trị chung). Bắt buộc nếu chưa cấu hình ở cấp độ chung. |
effectiveDate | string | ~ | Ngày hạch toán giao dịch (áp dụng riêng) Định dạng: yyyy-MM-dd. Nếu truyền sẽ ưu tiên sử dụng (ghi đè giá trị chung). |
feeMethod | string | ~ | Cách thức thu phí (áp dụng riêng) - O: Tài khoản thanh toán chịu phí - B: Tài khoản nhận tiền chịu phí Nếu truyền sẽ ưu tiên sử dụng (ghi đè giá trị chung). Bắt buộc nếu chưa cấu hình ở cấp độ chung. |
Payload Request mẫu
Để tương thích với 4 kịch bản ở phần Response, dưới đây là các cấu trúc Payload tương ứng mà bạn cần gửi lên (sự khác biệt chỉ nằm ở trường action và mảng records).
Bạn có thể click chọn từng Tab dưới đây, toàn bộ Ví dụ mã nguồn và Response mẫu bên dưới sẽ tự động đồng bộ theo kịch bản mà bạn chọn!
- INIT (Chi đơn)
- INIT (Chi lô)
- REQUEST_APPROVAL (Chi đơn)
- REQUEST_APPROVAL (Chi lô)
{
"actionType": "INTERNAL_TRANSFER",
"transactionType": "in-bank",
"action": "INIT",
"bankBin": "970418",
"senderAccountNumber": "8600007007",
"currency": "VND",
"feeMethod": "O",
"paymentMethod": "to-acc",
"effectiveDate": "2026-06-04",
"records": [
{
"requestId": "TRANS_1006_A04",
"receiverAccountNumber": "2220366666",
"receiverAccountName": "NGUYEN VAN A",
"amount": 32987,
"receiverBankBin": "970418",
"remark": "Chuyen tien"
}
]
}
{
"actionType": "INTERNAL_TRANSFER",
"action": "INIT",
"bankBin": "970418",
"senderAccountNumber": "8600007007",
"currency": "VND",
"feeMethod": "O",
"paymentMethod": "to-acc",
"effectiveDate": "2026-06-04",
"remark": "Chuyen tien nhieu nguoi",
"records": [
{
"requestId": "TRANS_0406_A04",
"receiverAccountNumber": "2220366666",
"receiverAccountName": "NGUYEN VAN A",
"amount": 32987,
"receiverBankBin": "970418",
"transactionType": "in-bank",
"remark": "Thanh toan 1"
},
{
"requestId": "TRANS_0406_A05",
"receiverAccountNumber": "6666688822",
"receiverAccountName": "NGUYEN LOC PHAT",
"amount": 12098,
"receiverBankBin": "970406",
"transactionType": "fast-out",
"remark": "Thanh toan 2"
},
{
"requestId": "TRANS_0406_A06",
"receiverId": "034201000243",
"receiverAccountName": "TRAN NHAT LE",
"amount": 32987,
"receiverBankBin": "970406",
"transactionType": "fast-out",
"paymentMethod": "to-id",
"receiverIdIssueDate": "2022-06-02",
"receiverIdIssueAddress": "Ha Noi",
"receiverBranchCode": "96304004",
"remark": "Thanh toan 3"
}
]
}
{
"actionType": "INTERNAL_TRANSFER",
"action": "REQUEST_APPROVAL",
"bankBin": "970418",
"senderAccountNumber": "8600007007",
"currency": "VND",
"feeMethod": "O",
"paymentMethod": "to-acc",
"approvalNote": "Duyet gap",
"effectiveDate": "2026-06-04",
"records": [
{
"requestId": "TRANS_1006_A04",
"receiverAccountNumber": "2220366666",
"receiverAccountName": "NGUYEN VAN A",
"amount": 32987,
"receiverBankBin": "970418",
"remark": "Chuyen tien"
}
]
}
{
"actionType": "INTERNAL_TRANSFER",
"action": "REQUEST_APPROVAL",
"bankBin": "970418",
"senderAccountNumber": "8600007007",
"currency": "VND",
"feeMethod": "O",
"paymentMethod": "to-acc",
"approvalNote": "Duyet gap",
"effectiveDate": "2026-06-04",
"remark": "Chuyen tien nhieu nguoi",
"records": [
{
"requestId": "TRANS_0406_A04",
"receiverAccountNumber": "2220366666",
"receiverAccountName": "NGUYEN VAN A",
"amount": 32987,
"receiverBankBin": "970418",
"transactionType": "in-bank",
"remark": "Thanh toan 1"
},
{
"requestId": "TRANS_0406_A05",
"receiverAccountNumber": "6666688822",
"receiverAccountName": "NGUYEN LOC PHAT",
"amount": 12098,
"receiverBankBin": "970406",
"transactionType": "fast-out",
"remark": "Thanh toan 2"
},
{
"requestId": "TRANS_0406_A06",
"receiverId": "034201000243",
"receiverAccountName": "TRAN NHAT LE",
"amount": 32987,
"receiverBankBin": "970406",
"transactionType": "fast-out",
"paymentMethod": "to-id",
"receiverIdIssueDate": "2022-06-02",
"receiverIdIssueAddress": "Ha Noi",
"receiverBranchCode": "96304004",
"remark": "Thanh toan 3"
}
]
}
Ví dụ mã nguồn
- cURL
- NestJS
- C#
- Java
- PHP
- INIT (Chi đơn)
- INIT (Chi lô)
- REQUEST_APPROVAL (Chi đơn)
- REQUEST_APPROVAL (Chi lô)
curl --location --request POST 'https://open-api.tingee.vn/v1/direct-link/create-transfer' \
--header 'accept: application/json' \
--header 'x-signature: YOUR_SIGNATURE' \
--header 'x-request-timestamp: 20251110175110111' \
--header 'x-client-id: YOUR_CLIENT_ID' \
--header 'Content-Type: application/json' \
--data '{
"actionType": "INTERNAL_TRANSFER",
"action": "INIT",
"bankBin": "970418",
"senderAccountNumber": "8600007007",
"currency": "VND",
"feeMethod": "O",
"paymentMethod": "to-acc",
"effectiveDate": "2026-06-04",
"records": [
{
"requestId": "TRANS_1006_A04",
"receiverAccountNumber": "2220366666",
"receiverAccountName": "NGUYEN VAN A",
"amount": 32987,
"receiverBankBin": "970418",
"remark": "Chuyen tien"
}
]
}'
curl --location --request POST 'https://open-api.tingee.vn/v1/direct-link/create-transfer' \
--header 'accept: application/json' \
--header 'x-signature: YOUR_SIGNATURE' \
--header 'x-request-timestamp: 20251110175110111' \
--header 'x-client-id: YOUR_CLIENT_ID' \
--header 'Content-Type: application/json' \
--data '{
"actionType": "INTERNAL_TRANSFER",
"action": "INIT",
"bankBin": "970418",
"senderAccountNumber": "8600007007",
"currency": "VND",
"feeMethod": "O",
"paymentMethod": "to-acc",
"effectiveDate": "2026-06-04",
"remark": "Chuyen tien nhieu nguoi",
"records": [
{
"requestId": "TRANS_0406_A04",
"receiverAccountNumber": "2220366666",
"receiverAccountName": "NGUYEN VAN A",
"amount": 32987,
"receiverBankBin": "970418",
"transactionType": "in-bank",
"remark": "Thanh toan 1"
},
{
"requestId": "TRANS_0406_A05",
"receiverAccountNumber": "6666688822",
"receiverAccountName": "NGUYEN LOC PHAT",
"amount": 12098,
"receiverBankBin": "970406",
"transactionType": "fast-out",
"remark": "Thanh toan 2"
},
{
"requestId": "TRANS_0406_A06",
"receiverId": "034201000243",
"receiverAccountName": "TRAN NHAT LE",
"amount": 32987,
"receiverBankBin": "970406",
"transactionType": "fast-out",
"paymentMethod": "to-id",
"receiverIdIssueDate": "2022-06-02",
"receiverIdIssueAddress": "Ha Noi",
"receiverBranchCode": "96304004",
"remark": "Thanh toan 3"
}
]
}'
curl --location --request POST 'https://open-api.tingee.vn/v1/direct-link/create-transfer' \
--header 'accept: application/json' \
--header 'x-signature: YOUR_SIGNATURE' \
--header 'x-request-timestamp: 20251110175110111' \
--header 'x-client-id: YOUR_CLIENT_ID' \
--header 'Content-Type: application/json' \
--data '{
"actionType": "INTERNAL_TRANSFER",
"action": "REQUEST_APPROVAL",
"bankBin": "970418",
"senderAccountNumber": "8600007007",
"currency": "VND",
"feeMethod": "O",
"paymentMethod": "to-acc",
"approvalNote": "Duyet gap",
"effectiveDate": "2026-06-04",
"records": [
{
"requestId": "TRANS_1006_A04",
"receiverAccountNumber": "2220366666",
"receiverAccountName": "NGUYEN VAN A",
"amount": 32987,
"receiverBankBin": "970418",
"remark": "Chuyen tien"
}
]
}'
curl --location --request POST 'https://open-api.tingee.vn/v1/direct-link/create-transfer' \
--header 'accept: application/json' \
--header 'x-signature: YOUR_SIGNATURE' \
--header 'x-request-timestamp: 20251110175110111' \
--header 'x-client-id: YOUR_CLIENT_ID' \
--header 'Content-Type: application/json' \
--data '{
"actionType": "INTERNAL_TRANSFER",
"action": "REQUEST_APPROVAL",
"bankBin": "970418",
"senderAccountNumber": "8600007007",
"currency": "VND",
"feeMethod": "O",
"paymentMethod": "to-acc",
"approvalNote": "Duyet gap",
"effectiveDate": "2026-06-04",
"remark": "Chuyen tien nhieu nguoi",
"records": [
{
"requestId": "TRANS_0406_A04",
"receiverAccountNumber": "2220366666",
"receiverAccountName": "NGUYEN VAN A",
"amount": 32987,
"receiverBankBin": "970418",
"transactionType": "in-bank",
"remark": "Thanh toan 1"
},
{
"requestId": "TRANS_0406_A05",
"receiverAccountNumber": "6666688822",
"receiverAccountName": "NGUYEN LOC PHAT",
"amount": 12098,
"receiverBankBin": "970406",
"transactionType": "fast-out",
"remark": "Thanh toan 2"
},
{
"requestId": "TRANS_0406_A06",
"receiverId": "034201000243",
"receiverAccountName": "TRAN NHAT LE",
"amount": 32987,
"receiverBankBin": "970406",
"transactionType": "fast-out",
"paymentMethod": "to-id",
"receiverIdIssueDate": "2022-06-02",
"receiverIdIssueAddress": "Ha Noi",
"receiverBranchCode": "96304004",
"remark": "Thanh toan 3"
}
]
}'
- INIT (Chi đơn)
- INIT (Chi lô)
- REQUEST_APPROVAL (Chi đơn)
- REQUEST_APPROVAL (Chi lô)
import axios from "axios";
import { createHmac } from "crypto";
import { format } from 'date-fns';
async function makeRequest() {
const timestamp = format(new Date(), "yyyyMMddHHmmssSSS");
const secretKey = "YOUR_SECRET_KEY";
const body = {
"actionType": "INTERNAL_TRANSFER",
"action": "INIT",
"bankBin": "970418",
"senderAccountNumber": "8600007007",
"currency": "VND",
"feeMethod": "O",
"paymentMethod": "to-acc",
"effectiveDate": "2026-06-04",
"records": [
{
"requestId": "TRANS_1006_A04",
"receiverAccountNumber": "2220366666",
"receiverAccountName": "NGUYEN VAN A",
"amount": 32987,
"receiverBankBin": "970418",
"remark": "Chuyen tien"
}
]
};
const message = `${timestamp}:${JSON.stringify(body)}`;
const signature = createHmac('sha512', secretKey).update(message).digest('hex');
const res = await axios({
method: 'POST',
url: 'https://open-api.tingee.vn/v1/direct-link/create-transfer',
data: body,
headers: {
"x-client-id": "YOUR_CLIENT_ID",
"x-request-timestamp": timestamp,
"x-signature": signature,
"Content-Type": "application/json",
}
});
console.log(res.data);
}
import axios from "axios";
import { createHmac } from "crypto";
import { format } from 'date-fns';
async function makeRequest() {
const timestamp = format(new Date(), "yyyyMMddHHmmssSSS");
const secretKey = "YOUR_SECRET_KEY";
const body = {
"actionType": "INTERNAL_TRANSFER",
"action": "INIT",
"bankBin": "970418",
"senderAccountNumber": "8600007007",
"currency": "VND",
"feeMethod": "O",
"paymentMethod": "to-acc",
"effectiveDate": "2026-06-04",
"remark": "Chuyen tien nhieu nguoi",
"records": [
{
"requestId": "TRANS_0406_A04",
"receiverAccountNumber": "2220366666",
"receiverAccountName": "NGUYEN VAN A",
"amount": 32987,
"receiverBankBin": "970418",
"transactionType": "in-bank",
"remark": "Thanh toan 1"
},
{
"requestId": "TRANS_0406_A05",
"receiverAccountNumber": "6666688822",
"receiverAccountName": "NGUYEN LOC PHAT",
"amount": 12098,
"receiverBankBin": "970406",
"transactionType": "fast-out",
"remark": "Thanh toan 2"
},
{
"requestId": "TRANS_0406_A06",
"receiverId": "034201000243",
"receiverAccountName": "TRAN NHAT LE",
"amount": 32987,
"receiverBankBin": "970406",
"transactionType": "fast-out",
"paymentMethod": "to-id",
"receiverIdIssueDate": "2022-06-02",
"receiverIdIssueAddress": "Ha Noi",
"receiverBranchCode": "96304004",
"remark": "Thanh toan 3"
}
]
};
const message = `${timestamp}:${JSON.stringify(body)}`;
const signature = createHmac('sha512', secretKey).update(message).digest('hex');
const res = await axios({
method: 'POST',
url: 'https://open-api.tingee.vn/v1/direct-link/create-transfer',
data: body,
headers: {
"x-client-id": "YOUR_CLIENT_ID",
"x-request-timestamp": timestamp,
"x-signature": signature,
"Content-Type": "application/json",
}
});
console.log(res.data);
}
import axios from "axios";
import { createHmac } from "crypto";
import { format } from 'date-fns';
async function makeRequest() {
const timestamp = format(new Date(), "yyyyMMddHHmmssSSS");
const secretKey = "YOUR_SECRET_KEY";
const body = {
"actionType": "INTERNAL_TRANSFER",
"action": "REQUEST_APPROVAL",
"bankBin": "970418",
"senderAccountNumber": "8600007007",
"currency": "VND",
"feeMethod": "O",
"paymentMethod": "to-acc",
"approvalNote": "Duyet gap",
"effectiveDate": "2026-06-04",
"records": [
{
"requestId": "TRANS_1006_A04",
"receiverAccountNumber": "2220366666",
"receiverAccountName": "NGUYEN VAN A",
"amount": 32987,
"receiverBankBin": "970418",
"remark": "Chuyen tien"
}
]
};
const message = `${timestamp}:${JSON.stringify(body)}`;
const signature = createHmac('sha512', secretKey).update(message).digest('hex');
const res = await axios({
method: 'POST',
url: 'https://open-api.tingee.vn/v1/direct-link/create-transfer',
data: body,
headers: {
"x-client-id": "YOUR_CLIENT_ID",
"x-request-timestamp": timestamp,
"x-signature": signature,
"Content-Type": "application/json",
}
});
console.log(res.data);
}
import axios from "axios";
import { createHmac } from "crypto";
import { format } from 'date-fns';
async function makeRequest() {
const timestamp = format(new Date(), "yyyyMMddHHmmssSSS");
const secretKey = "YOUR_SECRET_KEY";
const body = {
"actionType": "INTERNAL_TRANSFER",
"action": "REQUEST_APPROVAL",
"bankBin": "970418",
"senderAccountNumber": "8600007007",
"currency": "VND",
"feeMethod": "O",
"paymentMethod": "to-acc",
"approvalNote": "Duyet gap",
"effectiveDate": "2026-06-04",
"remark": "Chuyen tien nhieu nguoi",
"records": [
{
"requestId": "TRANS_0406_A04",
"receiverAccountNumber": "2220366666",
"receiverAccountName": "NGUYEN VAN A",
"amount": 32987,
"receiverBankBin": "970418",
"transactionType": "in-bank",
"remark": "Thanh toan 1"
},
{
"requestId": "TRANS_0406_A05",
"receiverAccountNumber": "6666688822",
"receiverAccountName": "NGUYEN LOC PHAT",
"amount": 12098,
"receiverBankBin": "970406",
"transactionType": "fast-out",
"remark": "Thanh toan 2"
},
{
"requestId": "TRANS_0406_A06",
"receiverId": "034201000243",
"receiverAccountName": "TRAN NHAT LE",
"amount": 32987,
"receiverBankBin": "970406",
"transactionType": "fast-out",
"paymentMethod": "to-id",
"receiverIdIssueDate": "2022-06-02",
"receiverIdIssueAddress": "Ha Noi",
"receiverBranchCode": "96304004",
"remark": "Thanh toan 3"
}
]
};
const message = `${timestamp}:${JSON.stringify(body)}`;
const signature = createHmac('sha512', secretKey).update(message).digest('hex');
const res = await axios({
method: 'POST',
url: 'https://open-api.tingee.vn/v1/direct-link/create-transfer',
data: body,
headers: {
"x-client-id": "YOUR_CLIENT_ID",
"x-request-timestamp": timestamp,
"x-signature": signature,
"Content-Type": "application/json",
}
});
console.log(res.data);
}
- INIT (Chi đơn)
- INIT (Chi lô)
- REQUEST_APPROVAL (Chi đơn)
- REQUEST_APPROVAL (Chi lô)
using System;
using System.Net.Http;
using System.Text;
using System.Security.Cryptography;
using System.Threading.Tasks;
public class TingeeApiExample
{
private static readonly HttpClient client = new HttpClient();
public static async Task Main()
{
var timestamp = DateTime.Now.ToString("yyyyMMddHHmmssfff");
var secretKey = "YOUR_SECRET_KEY";
var bodyJson = "{"actionType":"INTERNAL_TRANSFER","action":"INIT","bankBin":"970418","senderAccountNumber":"8600007007","currency":"VND","feeMethod":"O","paymentMethod":"to-acc","effectiveDate":"2026-06-04","records":[{"requestId":"TRANS_1006_A04","receiverAccountNumber":"2220366666","receiverAccountName":"NGUYEN VAN A","amount":32987,"receiverBankBin":"970418","remark":"Chuyen tien"}]}";
var message = $"{timestamp}:{bodyJson}";
var signature = CreateHmacSha512(secretKey, message);
var request = new HttpRequestMessage(HttpMethod.Post, "https://open-api.tingee.vn/v1/direct-link/create-transfer");
request.Headers.Add("x-signature", signature);
request.Headers.Add("x-request-timestamp", timestamp);
request.Headers.Add("x-client-id", "YOUR_CLIENT_ID");
request.Content = new StringContent(bodyJson, Encoding.UTF8, "application/json");
var response = await client.SendAsync(request);
string result = await response.Content.ReadAsStringAsync();
Console.WriteLine(result);
}
private static string CreateHmacSha512(string key, string message)
{
using var hmac = new HMACSHA512(Encoding.UTF8.GetBytes(key));
var hash = hmac.ComputeHash(Encoding.UTF8.GetBytes(message));
return BitConverter.ToString(hash).Replace("-", "").ToLower();
}
}
using System;
using System.Net.Http;
using System.Text;
using System.Security.Cryptography;
using System.Threading.Tasks;
public class TingeeApiExample
{
private static readonly HttpClient client = new HttpClient();
public static async Task Main()
{
var timestamp = DateTime.Now.ToString("yyyyMMddHHmmssfff");
var secretKey = "YOUR_SECRET_KEY";
var bodyJson = "{"actionType":"INTERNAL_TRANSFER","action":"INIT","bankBin":"970418","senderAccountNumber":"8600007007","currency":"VND","feeMethod":"O","paymentMethod":"to-acc","effectiveDate":"2026-06-04","remark":"Chuyen tien nhieu nguoi","records":[{"requestId":"TRANS_0406_A04","receiverAccountNumber":"2220366666","receiverAccountName":"NGUYEN VAN A","amount":32987,"receiverBankBin":"970418"},{"requestId":"TRANS_0406_A05","receiverAccountNumber":"6666688822","receiverAccountName":"NGUYEN LOC PHAT","amount":12098,"receiverBankBin":"970406"}]}";
var message = $"{timestamp}:{bodyJson}";
var signature = CreateHmacSha512(secretKey, message);
var request = new HttpRequestMessage(HttpMethod.Post, "https://open-api.tingee.vn/v1/direct-link/create-transfer");
request.Headers.Add("x-signature", signature);
request.Headers.Add("x-request-timestamp", timestamp);
request.Headers.Add("x-client-id", "YOUR_CLIENT_ID");
request.Content = new StringContent(bodyJson, Encoding.UTF8, "application/json");
var response = await client.SendAsync(request);
string result = await response.Content.ReadAsStringAsync();
Console.WriteLine(result);
}
private static string CreateHmacSha512(string key, string message)
{
using var hmac = new HMACSHA512(Encoding.UTF8.GetBytes(key));
var hash = hmac.ComputeHash(Encoding.UTF8.GetBytes(message));
return BitConverter.ToString(hash).Replace("-", "").ToLower();
}
}
using System;
using System.Net.Http;
using System.Text;
using System.Security.Cryptography;
using System.Threading.Tasks;
public class TingeeApiExample
{
private static readonly HttpClient client = new HttpClient();
public static async Task Main()
{
var timestamp = DateTime.Now.ToString("yyyyMMddHHmmssfff");
var secretKey = "YOUR_SECRET_KEY";
var bodyJson = "{"actionType":"INTERNAL_TRANSFER","action":"REQUEST_APPROVAL","bankBin":"970418","senderAccountNumber":"8600007007","currency":"VND","feeMethod":"O","paymentMethod":"to-acc","approvalNote":"Duyet gap","effectiveDate":"2026-06-04","records":[{"requestId":"TRANS_1006_A04","receiverAccountNumber":"2220366666","receiverAccountName":"NGUYEN VAN A","amount":32987,"receiverBankBin":"970418","remark":"Chuyen tien"}]}";
var message = $"{timestamp}:{bodyJson}";
var signature = CreateHmacSha512(secretKey, message);
var request = new HttpRequestMessage(HttpMethod.Post, "https://open-api.tingee.vn/v1/direct-link/create-transfer");
request.Headers.Add("x-signature", signature);
request.Headers.Add("x-request-timestamp", timestamp);
request.Headers.Add("x-client-id", "YOUR_CLIENT_ID");
request.Content = new StringContent(bodyJson, Encoding.UTF8, "application/json");
var response = await client.SendAsync(request);
string result = await response.Content.ReadAsStringAsync();
Console.WriteLine(result);
}
private static string CreateHmacSha512(string key, string message)
{
using var hmac = new HMACSHA512(Encoding.UTF8.GetBytes(key));
var hash = hmac.ComputeHash(Encoding.UTF8.GetBytes(message));
return BitConverter.ToString(hash).Replace("-", "").ToLower();
}
}
using System;
using System.Net.Http;
using System.Text;
using System.Security.Cryptography;
using System.Threading.Tasks;
public class TingeeApiExample
{
private static readonly HttpClient client = new HttpClient();
public static async Task Main()
{
var timestamp = DateTime.Now.ToString("yyyyMMddHHmmssfff");
var secretKey = "YOUR_SECRET_KEY";
var bodyJson = "{"actionType":"INTERNAL_TRANSFER","action":"REQUEST_APPROVAL","bankBin":"970418","senderAccountNumber":"8600007007","currency":"VND","feeMethod":"O","paymentMethod":"to-acc","approvalNote":"Duyet gap","effectiveDate":"2026-06-04","remark":"Chuyen tien nhieu nguoi","records":[{"requestId":"TRANS_0406_A04","receiverAccountNumber":"2220366666","receiverAccountName":"NGUYEN VAN A","amount":32987,"receiverBankBin":"970418"},{"requestId":"TRANS_0406_A05","receiverAccountNumber":"6666688822","receiverAccountName":"NGUYEN LOC PHAT","amount":12098,"receiverBankBin":"970406"}]}";
var message = $"{timestamp}:{bodyJson}";
var signature = CreateHmacSha512(secretKey, message);
var request = new HttpRequestMessage(HttpMethod.Post, "https://open-api.tingee.vn/v1/direct-link/create-transfer");
request.Headers.Add("x-signature", signature);
request.Headers.Add("x-request-timestamp", timestamp);
request.Headers.Add("x-client-id", "YOUR_CLIENT_ID");
request.Content = new StringContent(bodyJson, Encoding.UTF8, "application/json");
var response = await client.SendAsync(request);
string result = await response.Content.ReadAsStringAsync();
Console.WriteLine(result);
}
private static string CreateHmacSha512(string key, string message)
{
using var hmac = new HMACSHA512(Encoding.UTF8.GetBytes(key));
var hash = hmac.ComputeHash(Encoding.UTF8.GetBytes(message));
return BitConverter.ToString(hash).Replace("-", "").ToLower();
}
}
- INIT (Chi đơn)
- INIT (Chi lô)
- REQUEST_APPROVAL (Chi đơn)
- REQUEST_APPROVAL (Chi lô)
import java.net.http.*;
import java.net.URI;
import java.nio.charset.StandardCharsets;
import javax.crypto.Mac;
import javax.crypto.spec.SecretKeySpec;
import java.time.LocalDateTime;
import java.time.format.DateTimeFormatter;
public class TingeeApiExample {
public static void main(String[] args) throws Exception {
String secretKey = "YOUR_SECRET_KEY";
String timestamp = LocalDateTime.now().format(DateTimeFormatter.ofPattern("yyyyMMddHHmmssSSS"));
String bodyJson = "{"actionType":"INTERNAL_TRANSFER","action":"INIT","bankBin":"970418","senderAccountNumber":"8600007007","currency":"VND","feeMethod":"O","paymentMethod":"to-acc","effectiveDate":"2026-06-04","records":[{"requestId":"TRANS_1006_A04","receiverAccountNumber":"2220366666","receiverAccountName":"NGUYEN VAN A","amount":32987,"receiverBankBin":"970418","remark":"Chuyen tien"}]}";
String message = timestamp + ":" + bodyJson;
String signature = hmacSha512(secretKey, message);
HttpClient client = HttpClient.newHttpClient();
HttpRequest request = HttpRequest.newBuilder()
.uri(URI.create("https://open-api.tingee.vn/v1/direct-link/create-transfer"))
.header("accept", "application/json")
.header("x-signature", signature)
.header("x-request-timestamp", timestamp)
.header("x-client-id", "YOUR_CLIENT_ID")
.header("Content-Type", "application/json")
.POST(HttpRequest.BodyPublishers.ofString(bodyJson))
.build();
HttpResponse<String> response = client.send(request, HttpResponse.BodyHandlers.ofString());
System.out.println(response.body());
}
private static String hmacSha512(String key, String data) throws Exception {
Mac mac = Mac.getInstance("HmacSHA512");
SecretKeySpec secretKeySpec = new SecretKeySpec(key.getBytes(StandardCharsets.UTF_8), "HmacSHA512");
mac.init(secretKeySpec);
byte[] hash = mac.doFinal(data.getBytes(StandardCharsets.UTF_8));
return toHex(hash);
}
private static String toHex(byte[] bytes) {
StringBuilder hex = new StringBuilder(bytes.length * 2);
for (byte b : bytes) {
hex.append(String.format("%02x", b));
}
return hex.toString();
}
}
import java.net.http.*;
import java.net.URI;
import java.nio.charset.StandardCharsets;
import javax.crypto.Mac;
import javax.crypto.spec.SecretKeySpec;
import java.time.LocalDateTime;
import java.time.format.DateTimeFormatter;
public class TingeeApiExample {
public static void main(String[] args) throws Exception {
String secretKey = "YOUR_SECRET_KEY";
String timestamp = LocalDateTime.now().format(DateTimeFormatter.ofPattern("yyyyMMddHHmmssSSS"));
String bodyJson = "{"actionType":"INTERNAL_TRANSFER","action":"INIT","bankBin":"970418","senderAccountNumber":"8600007007","currency":"VND","feeMethod":"O","paymentMethod":"to-acc","effectiveDate":"2026-06-04","remark":"Chuyen tien nhieu nguoi","records":[{"requestId":"TRANS_0406_A04","receiverAccountNumber":"2220366666","receiverAccountName":"NGUYEN VAN A","amount":32987,"receiverBankBin":"970418"},{"requestId":"TRANS_0406_A05","receiverAccountNumber":"6666688822","receiverAccountName":"NGUYEN LOC PHAT","amount":12098,"receiverBankBin":"970406"}]}";
String message = timestamp + ":" + bodyJson;
String signature = hmacSha512(secretKey, message);
HttpClient client = HttpClient.newHttpClient();
HttpRequest request = HttpRequest.newBuilder()
.uri(URI.create("https://open-api.tingee.vn/v1/direct-link/create-transfer"))
.header("accept", "application/json")
.header("x-signature", signature)
.header("x-request-timestamp", timestamp)
.header("x-client-id", "YOUR_CLIENT_ID")
.header("Content-Type", "application/json")
.POST(HttpRequest.BodyPublishers.ofString(bodyJson))
.build();
HttpResponse<String> response = client.send(request, HttpResponse.BodyHandlers.ofString());
System.out.println(response.body());
}
private static String hmacSha512(String key, String data) throws Exception {
Mac mac = Mac.getInstance("HmacSHA512");
SecretKeySpec secretKeySpec = new SecretKeySpec(key.getBytes(StandardCharsets.UTF_8), "HmacSHA512");
mac.init(secretKeySpec);
byte[] hash = mac.doFinal(data.getBytes(StandardCharsets.UTF_8));
return toHex(hash);
}
private static String toHex(byte[] bytes) {
StringBuilder hex = new StringBuilder(bytes.length * 2);
for (byte b : bytes) {
hex.append(String.format("%02x", b));
}
return hex.toString();
}
}
import java.net.http.*;
import java.net.URI;
import java.nio.charset.StandardCharsets;
import javax.crypto.Mac;
import javax.crypto.spec.SecretKeySpec;
import java.time.LocalDateTime;
import java.time.format.DateTimeFormatter;
public class TingeeApiExample {
public static void main(String[] args) throws Exception {
String secretKey = "YOUR_SECRET_KEY";
String timestamp = LocalDateTime.now().format(DateTimeFormatter.ofPattern("yyyyMMddHHmmssSSS"));
String bodyJson = "{"actionType":"INTERNAL_TRANSFER","action":"REQUEST_APPROVAL","bankBin":"970418","senderAccountNumber":"8600007007","currency":"VND","feeMethod":"O","paymentMethod":"to-acc","approvalNote":"Duyet gap","effectiveDate":"2026-06-04","records":[{"requestId":"TRANS_1006_A04","receiverAccountNumber":"2220366666","receiverAccountName":"NGUYEN VAN A","amount":32987,"receiverBankBin":"970418","remark":"Chuyen tien"}]}";
String message = timestamp + ":" + bodyJson;
String signature = hmacSha512(secretKey, message);
HttpClient client = HttpClient.newHttpClient();
HttpRequest request = HttpRequest.newBuilder()
.uri(URI.create("https://open-api.tingee.vn/v1/direct-link/create-transfer"))
.header("accept", "application/json")
.header("x-signature", signature)
.header("x-request-timestamp", timestamp)
.header("x-client-id", "YOUR_CLIENT_ID")
.header("Content-Type", "application/json")
.POST(HttpRequest.BodyPublishers.ofString(bodyJson))
.build();
HttpResponse<String> response = client.send(request, HttpResponse.BodyHandlers.ofString());
System.out.println(response.body());
}
private static String hmacSha512(String key, String data) throws Exception {
Mac mac = Mac.getInstance("HmacSHA512");
SecretKeySpec secretKeySpec = new SecretKeySpec(key.getBytes(StandardCharsets.UTF_8), "HmacSHA512");
mac.init(secretKeySpec);
byte[] hash = mac.doFinal(data.getBytes(StandardCharsets.UTF_8));
return toHex(hash);
}
private static String toHex(byte[] bytes) {
StringBuilder hex = new StringBuilder(bytes.length * 2);
for (byte b : bytes) {
hex.append(String.format("%02x", b));
}
return hex.toString();
}
}
import java.net.http.*;
import java.net.URI;
import java.nio.charset.StandardCharsets;
import javax.crypto.Mac;
import javax.crypto.spec.SecretKeySpec;
import java.time.LocalDateTime;
import java.time.format.DateTimeFormatter;
public class TingeeApiExample {
public static void main(String[] args) throws Exception {
String secretKey = "YOUR_SECRET_KEY";
String timestamp = LocalDateTime.now().format(DateTimeFormatter.ofPattern("yyyyMMddHHmmssSSS"));
String bodyJson = "{"actionType":"INTERNAL_TRANSFER","action":"REQUEST_APPROVAL","bankBin":"970418","senderAccountNumber":"8600007007","currency":"VND","feeMethod":"O","paymentMethod":"to-acc","approvalNote":"Duyet gap","effectiveDate":"2026-06-04","remark":"Chuyen tien nhieu nguoi","records":[{"requestId":"TRANS_0406_A04","receiverAccountNumber":"2220366666","receiverAccountName":"NGUYEN VAN A","amount":32987,"receiverBankBin":"970418"},{"requestId":"TRANS_0406_A05","receiverAccountNumber":"6666688822","receiverAccountName":"NGUYEN LOC PHAT","amount":12098,"receiverBankBin":"970406"}]}";
String message = timestamp + ":" + bodyJson;
String signature = hmacSha512(secretKey, message);
HttpClient client = HttpClient.newHttpClient();
HttpRequest request = HttpRequest.newBuilder()
.uri(URI.create("https://open-api.tingee.vn/v1/direct-link/create-transfer"))
.header("accept", "application/json")
.header("x-signature", signature)
.header("x-request-timestamp", timestamp)
.header("x-client-id", "YOUR_CLIENT_ID")
.header("Content-Type", "application/json")
.POST(HttpRequest.BodyPublishers.ofString(bodyJson))
.build();
HttpResponse<String> response = client.send(request, HttpResponse.BodyHandlers.ofString());
System.out.println(response.body());
}
private static String hmacSha512(String key, String data) throws Exception {
Mac mac = Mac.getInstance("HmacSHA512");
SecretKeySpec secretKeySpec = new SecretKeySpec(key.getBytes(StandardCharsets.UTF_8), "HmacSHA512");
mac.init(secretKeySpec);
byte[] hash = mac.doFinal(data.getBytes(StandardCharsets.UTF_8));
return toHex(hash);
}
private static String toHex(byte[] bytes) {
StringBuilder hex = new StringBuilder(bytes.length * 2);
for (byte b : bytes) {
hex.append(String.format("%02x", b));
}
return hex.toString();
}
}
- INIT (Chi đơn)
- INIT (Chi lô)
- REQUEST_APPROVAL (Chi đơn)
- REQUEST_APPROVAL (Chi lô)
function makeApiRequest() {
$timestamp = date("YmdHis") . substr((string)microtime(true), -3);
$secretKey = "YOUR_SECRET_KEY";
$jsonBody = '{"actionType":"INTERNAL_TRANSFER","action":"INIT","bankBin":"970418","senderAccountNumber":"8600007007","currency":"VND","feeMethod":"O","paymentMethod":"to-acc","effectiveDate":"2026-06-04","records":[{"requestId":"TRANS_1006_A04","receiverAccountNumber":"2220366666","receiverAccountName":"NGUYEN VAN A","amount":32987,"receiverBankBin":"970418","remark":"Chuyen tien"}]}';
$message = $timestamp . ":" . $jsonBody;
$signature = hash_hmac("sha512", $message, $secretKey);
$ch = curl_init();
curl_setopt_array($ch, [
CURLOPT_URL => "https://open-api.tingee.vn/v1/direct-link/create-transfer",
CURLOPT_RETURNTRANSFER => true,
CURLOPT_POST => true,
CURLOPT_POSTFIELDS => $jsonBody,
CURLOPT_HTTPHEADER => [
"Accept: application/json",
"Content-Type: application/json",
"x-client-id: YOUR_CLIENT_ID",
"x-request-timestamp: " . $timestamp,
"x-signature: " . $signature
]
]);
$response = curl_exec($ch);
curl_close($ch);
echo $response;
}
makeApiRequest();
function makeApiRequest() {
$timestamp = date("YmdHis") . substr((string)microtime(true), -3);
$secretKey = "YOUR_SECRET_KEY";
$jsonBody = '{"actionType":"INTERNAL_TRANSFER","action":"INIT","bankBin":"970418","senderAccountNumber":"8600007007","currency":"VND","feeMethod":"O","paymentMethod":"to-acc","effectiveDate":"2026-06-04","remark":"Chuyen tien nhieu nguoi","records":[{"requestId":"TRANS_0406_A04","receiverAccountNumber":"2220366666","receiverAccountName":"NGUYEN VAN A","amount":32987,"receiverBankBin":"970418"},{"requestId":"TRANS_0406_A05","receiverAccountNumber":"6666688822","receiverAccountName":"NGUYEN LOC PHAT","amount":12098,"receiverBankBin":"970406"}]}';
$message = $timestamp . ":" . $jsonBody;
$signature = hash_hmac("sha512", $message, $secretKey);
$ch = curl_init();
curl_setopt_array($ch, [
CURLOPT_URL => "https://open-api.tingee.vn/v1/direct-link/create-transfer",
CURLOPT_RETURNTRANSFER => true,
CURLOPT_POST => true,
CURLOPT_POSTFIELDS => $jsonBody,
CURLOPT_HTTPHEADER => [
"Accept: application/json",
"Content-Type: application/json",
"x-client-id: YOUR_CLIENT_ID",
"x-request-timestamp: " . $timestamp,
"x-signature: " . $signature
]
]);
$response = curl_exec($ch);
curl_close($ch);
echo $response;
}
makeApiRequest();
function makeApiRequest() {
$timestamp = date("YmdHis") . substr((string)microtime(true), -3);
$secretKey = "YOUR_SECRET_KEY";
$jsonBody = '{"actionType":"INTERNAL_TRANSFER","action":"REQUEST_APPROVAL","bankBin":"970418","senderAccountNumber":"8600007007","currency":"VND","feeMethod":"O","paymentMethod":"to-acc","approvalNote":"Duyet gap","effectiveDate":"2026-06-04","records":[{"requestId":"TRANS_1006_A04","receiverAccountNumber":"2220366666","receiverAccountName":"NGUYEN VAN A","amount":32987,"receiverBankBin":"970418","remark":"Chuyen tien"}]}';
$message = $timestamp . ":" . $jsonBody;
$signature = hash_hmac("sha512", $message, $secretKey);
$ch = curl_init();
curl_setopt_array($ch, [
CURLOPT_URL => "https://open-api.tingee.vn/v1/direct-link/create-transfer",
CURLOPT_RETURNTRANSFER => true,
CURLOPT_POST => true,
CURLOPT_POSTFIELDS => $jsonBody,
CURLOPT_HTTPHEADER => [
"Accept: application/json",
"Content-Type: application/json",
"x-client-id: YOUR_CLIENT_ID",
"x-request-timestamp: " . $timestamp,
"x-signature: " . $signature
]
]);
$response = curl_exec($ch);
curl_close($ch);
echo $response;
}
makeApiRequest();
function makeApiRequest() {
$timestamp = date("YmdHis") . substr((string)microtime(true), -3);
$secretKey = "YOUR_SECRET_KEY";
$jsonBody = '{"actionType":"INTERNAL_TRANSFER","action":"REQUEST_APPROVAL","bankBin":"970418","senderAccountNumber":"8600007007","currency":"VND","feeMethod":"O","paymentMethod":"to-acc","approvalNote":"Duyet gap","effectiveDate":"2026-06-04","remark":"Chuyen tien nhieu nguoi","records":[{"requestId":"TRANS_0406_A04","receiverAccountNumber":"2220366666","receiverAccountName":"NGUYEN VAN A","amount":32987,"receiverBankBin":"970418"},{"requestId":"TRANS_0406_A05","receiverAccountNumber":"6666688822","receiverAccountName":"NGUYEN LOC PHAT","amount":12098,"receiverBankBin":"970406"}]}';
$message = $timestamp . ":" . $jsonBody;
$signature = hash_hmac("sha512", $message, $secretKey);
$ch = curl_init();
curl_setopt_array($ch, [
CURLOPT_URL => "https://open-api.tingee.vn/v1/direct-link/create-transfer",
CURLOPT_RETURNTRANSFER => true,
CURLOPT_POST => true,
CURLOPT_POSTFIELDS => $jsonBody,
CURLOPT_HTTPHEADER => [
"Accept: application/json",
"Content-Type: application/json",
"x-client-id: YOUR_CLIENT_ID",
"x-request-timestamp: " . $timestamp,
"x-signature: " . $signature
]
]);
$response = curl_exec($ch);
curl_close($ch);
echo $response;
}
makeApiRequest();
Response mẫu
Tùy thuộc vào tham số action (Lưu nháp hay Đẩy duyệt) và số lượng giao dịch (Chi đơn lẻ hay Chi lô), API sẽ trả về cấu trúc tương ứng với 1 trong 4 trường hợp dưới đây:
- INIT (Chi đơn)
- INIT (Chi lô)
- REQUEST_APPROVAL (Chi đơn)
- REQUEST_APPROVAL (Chi lô)
Phản hồi khi gọi lệnh lưu nháp (action="INIT") cho một giao dịch duy nhất.
{
"code": "00",
"message": "Success",
"data": {
"status": "SUCCESS",
"totalRecords": 1,
"validRecords": 1,
"invalidRecords": 0,
"requireAuth": false,
"transAuth": null,
"records": [
{
"requestId": "TRANS_1006_A04",
"status": "INIT",
"transactionId": "PM0226061000074420",
"transactionCode": "PM02",
"message": null,
"feeTotal": 11000
}
]
}
}
Phản hồi khi gọi lệnh lưu nháp (action="INIT") cho một lô nhiều giao dịch.
{
"code": "00",
"message": "Success",
"data": {
"status": "SUCCESS",
"batchId": "0000009b-c09c-403b-b2bc-19a35a6845a4",
"totalRecords": 3,
"validRecords": 3,
"invalidRecords": 0,
"requireAuth": false,
"transAuth": null,
"records": [
{
"requestId": "TRANS_2026_0047",
"status": "INIT",
"transactionId": "PM0226050800069511",
"transactionCode": "PM02",
"message": null,
"feeTotal": 22000
},
{
"requestId": "TRANS_2026_0048",
"status": "INIT",
"transactionId": "PM1126050800069512",
"transactionCode": "PM11",
"message": null,
"feeTotal": 11000
},
{
"requestId": "TRANS_2026_0049",
"status": "INIT",
"transactionId": "PM1326050800069513",
"transactionCode": "PM13",
"message": null,
"feeTotal": 5500
}
]
}
}
Phản hồi khi đẩy duyệt trực tiếp (action="REQUEST_APPROVAL") một giao dịch duy nhất.
{
"code": "00",
"message": "Success",
"data": {
"status": "PENDING_CONFIRMATION",
"confirmId": "TXNKEY_INIT_PM13_25607354makerotv_2827594e-037d-434b-b534-b1ff52adad4a",
"totalRecords": 1,
"validRecords": 1,
"invalidRecords": 0,
"requireAuth": true,
"transAuth": {
"authType": "SMARTOTP",
"expTime": 120,
"qrData": "OTkwMDVCMDUwMDMyMTc4MDU1ODgzOTU2MS01MGQzNDM3Ni1iMGVlLTQ2NTEtOWMxMC1iNDMxZDYwYTI0M2QwNjAwMDQ3OTczMjAwMDEzQklEVklCQU5LX1RSQU5TX09UUA=="
},
"records": [
{
"requestId": "TRANS_0406_A08",
"status": "REQUEST_APPROVAL",
"transactionId": "PM1326050800069513",
"transactionCode": "PM13",
"message": null,
"feeTotal": 11000
}
]
}
}
Phản hồi khi đẩy duyệt trực tiếp (action="REQUEST_APPROVAL") một lô nhiều giao dịch.
{
"code": "00",
"message": "Success",
"data": {
"status": "PENDING_CONFIRMATION",
"confirmId": "TXNKEY_APPROVAL_25607354makerotv_a8993883-d5fe-4ced-a0c0-20cff5b5120b",
"batchId": "2667c208-a5ab-4c9c-af4d-cbd4de24b817",
"totalRecords": 3,
"validRecords": 3,
"invalidRecords": 0,
"requireAuth": true,
"transAuth": {
"authType": "SMARTOTP",
"expTime": 120,
"qrData": "OTkwMDVCMDUwMDMyMTc4MTE0MjI4NDkwNS1kYjdjZWU3NC1hNTdjLTQxMjItODljZi1jZmEyYWNjMDkyZjgwNjAwMDQ3OTczMjAwMDEzQklEVklCQU5LX1RSQU5TX09UUA=="
},
"records": []
}
}
Cấu trúc Response data
| Trường | Kiểu | Mô tả |
|---|---|---|
status | string | Trạng thái giao dịch của lệnh chi (VD: SUCCESS cho Lưu nháp, PENDING_CONFIRMATION cho Đẩy duyệt). |
batchId | string | Mã lô giao dịch (chỉ trả về khi tạo lệnh chi lô). |
confirmId | string | Chuỗi key xác nhận giao dịch (chỉ trả về khi tạo lệnh đẩy duyệt REQUEST_APPROVAL). |
transactionId | string | Mã giao dịch cấp Lô (đối với giao dịch Lương/Bảng kê). |
transactionCode | string | Mã loại giao dịch phía ngân hàng (đối với giao dịch lô). |
totalRecords | number | Tổng số giao dịch. |
validRecords | number | Số lượng giao dịch hợp lệ. |
invalidRecords | number | Số lượng giao dịch không hợp lệ. |
requireAuth | boolean | Yêu cầu xác thực giao dịch thêm (VD: SmartOTP). |
transAuth | object | Thông tin cấu hình xác thực (nếu requireAuth = true). |
records | array | Danh sách kết quả chi tiết từng giao dịch (Với lô đẩy duyệt REQUEST_APPROVAL, mảng này sẽ rỗng do chưa có kết quả xử lý của từng lệnh con). |
Chi tiết data.transAuth (Nếu yêu cầu xác thực thêm)
| Trường | Kiểu | Mô tả |
|---|---|---|
authType | string | Phương thức xác thực (VD: SMARTOTP). |
expTime | number | Thời gian hiệu lực của mã QR (tính bằng giây). |
qrData | string | Chuỗi dữ liệu dùng để render hình ảnh QR Code. Dùng để quét trên app ngân hàng lấy mã OTP. |
Chi tiết phần tử trong data.records
| Trường | Kiểu | Mô tả |
|---|---|---|
requestId | string | Mã tham chiếu giao dịch đã gửi lên. |
status | string | Trạng thái giao dịch (VD: PENDING_APPROVAL). |
transactionId | string | Mã giao dịch trên hệ thống ngân hàng (dành cho giao dịch đơn). |
transactionSubId | string | Mã giao dịch con (dành cho giao dịch lô Lương/Bảng kê). |
transactionCode | string | Mã loại giao dịch phía ngân hàng (dành cho giao dịch đơn). |
message | string | Thông báo lỗi (nếu có). |
feeTotal | number | Tổng phí giao dịch. |
Khi đẩy duyệt giao dịch, nếu hệ thống trả về requireAuth: true kèm theo transAuth.qrData, bạn cần thực hiện các bước sau để lấy mã OTP:
- Chuyển đổi chuỗi ký tự trong
qrDatathành một hình ảnh mã QR (QR Code image). - Mở ứng dụng BIDV Direct trên thiết bị (đã được cấp quyền duyệt lệnh).
- Sử dụng tính năng quét mã QR trong ứng dụng để quét hình ảnh QR vừa tạo.
- Kiểm tra kỹ thông tin giao dịch trên màn hình ứng dụng và xác nhận bằng mã PIN của BIDV Direct.
- Sau khi xác nhận mã PIN, một mã SmartOTP sẽ được hiển thị trên màn hình.
- Lấy mã SmartOTP này truyền vào tham số
otptrong API Xác nhận lệnh chuyển khoản để hoàn tất giao dịch.
Mã lỗi thường gặp
| Code | Mô tả | Hướng xử lý |
|---|---|---|
90 | Sai format timestamp | Kiểm tra format yyyyMMddHHmmssSSS. |
91 | Request quá hạn | Kiểm tra thời gian gửi request. |
97 | Sai chữ ký | Kiểm tra lại Secret Key và logic tạo Signature. |
Others | Lỗi khác | Xem Danh sách mã lỗi. |