Confirm disbursement approval
PUT
URLhttps://open-api.tingee.vn/v1/direct-link/approve-confirm
Confirm the approval of a disbursement payment order (Checker)
Header Request
| Header | Required | Description |
|---|---|---|
Content-Type | ✓ | application/json |
x-client-id | ✓ | Partner identifier issued by TINGEE. |
x-signature | ✓ | HMAC SHA512 authentication signature. |
x-request-timestamp | ✓ | Time the request is sent (format: yyyyMMddHHmmssSSS, UTC+7) |
Body Parameter
| Field | Type | Required | Description |
|---|---|---|---|
bankBin | string | ✓ | Bank BIN. Supports 970418 (BIDV, uses the authorization session of the Checker role) and 970448 (OCB). |
actionType | string | ✓ | Disbursement order type - INTERNAL_TRANSFER: Domestic transfer - SALARY: Salary payment - BILL_PAYMENT: Bill / statement payment |
confirmId | string | ✓ | Transaction confirmation key. For BIDV: the data.confirmId value returned by the Approve payment order API (when requireAuth = true). |
otp | string | ~ | OTP / SmartOTP generated by the bank app. Required for BIDV. |
batchId | string | ~ | Transaction batch ID. Required for OCB. |
Code samples
- cURL
- NestJS
- C#
- Java
- PHP
curl --location --request PUT 'https://open-api.tingee.vn/v1/direct-link/approve-confirm' \
--header 'accept: application/json' \
--header 'x-client-id: YOUR_CLIENT_ID' \
--header 'x-request-timestamp: 20240509154004003' \
--header 'x-signature: YOUR_SIGNATURE' \
--header 'Content-Type: application/json' \
--data '{
"bankBin": "970418",
"actionType": "INTERNAL_TRANSFER",
"confirmId": "TXNKEY_APPROVAL_25607354makerotv_a8993883-d5fe-4ced-a0c0-20cff5b5120b",
"otp": "12345678"
}'
import axios from "axios";
import { createHmac } from "crypto";
const CLIENT_ID = "YOUR_CLIENT_ID";
const SECRET_KEY = "YOUR_SECRET_KEY";
// Timestamp in UTC+7, format yyyyMMddHHmmssSSS
function getTimestamp() {
return new Date(Date.now() + 7 * 60 * 60 * 1000)
.toISOString()
.replace(/[-:TZ.]/g, "")
.slice(0, 17);
}
async function directLinkApproveConfirm() {
const body = {
bankBin: "970418",
actionType: "INTERNAL_TRANSFER",
confirmId: "TXNKEY_APPROVAL_25607354makerotv_a8993883-d5fe-4ced-a0c0-20cff5b5120b",
otp: "12345678",
};
const bodyJson = JSON.stringify(body);
const timestamp = getTimestamp();
const signature = createHmac("sha512", SECRET_KEY)
.update(`${timestamp}:${bodyJson}`)
.digest("hex");
const res = await axios.request({
method: "PUT",
url: "https://open-api.tingee.vn/v1/direct-link/approve-confirm",
data: bodyJson,
headers: {
accept: "application/json",
"Content-Type": "application/json",
"x-client-id": CLIENT_ID,
"x-request-timestamp": timestamp,
"x-signature": signature,
},
});
console.log(res.data);
}
directLinkApproveConfirm();
using System;
using System.Net.Http;
using System.Security.Cryptography;
using System.Text;
using System.Text.Encodings.Web;
using System.Text.Json;
using System.Threading.Tasks;
public class Program
{
private const string ClientId = "YOUR_CLIENT_ID";
private const string SecretKey = "YOUR_SECRET_KEY";
private static readonly HttpClient Client = new HttpClient();
public static async Task Main()
{
var body = new
{
bankBin = "970418",
actionType = "INTERNAL_TRANSFER",
confirmId = "TXNKEY_APPROVAL_25607354makerotv_a8993883-d5fe-4ced-a0c0-20cff5b5120b",
otp = "12345678"
};
// Do not escape non-ASCII / special characters so the JSON matches TINGEE's JSON.stringify
var jsonOptions = new JsonSerializerOptions { Encoder = JavaScriptEncoder.UnsafeRelaxedJsonEscaping };
var bodyJson = JsonSerializer.Serialize(body, jsonOptions);
// Timestamp in UTC+7, format yyyyMMddHHmmssSSS
var timestamp = DateTime.UtcNow.AddHours(7).ToString("yyyyMMddHHmmssfff");
var signature = HmacSha512(SecretKey, $"{timestamp}:{bodyJson}");
var request = new HttpRequestMessage(HttpMethod.Put, "https://open-api.tingee.vn/v1/direct-link/approve-confirm");
request.Headers.Add("accept", "application/json");
request.Headers.Add("x-client-id", ClientId);
request.Headers.Add("x-request-timestamp", timestamp);
request.Headers.Add("x-signature", signature);
request.Content = new StringContent(bodyJson, Encoding.UTF8, "application/json");
var response = await Client.SendAsync(request);
Console.WriteLine(await response.Content.ReadAsStringAsync());
}
private static string HmacSha512(string key, string message)
{
using var hmac = new HMACSHA512(Encoding.UTF8.GetBytes(key));
var hash = hmac.ComputeHash(Encoding.UTF8.GetBytes(message));
return Convert.ToHexString(hash).ToLower();
}
}
import java.net.URI;
import java.net.http.HttpClient;
import java.net.http.HttpRequest;
import java.net.http.HttpResponse;
import java.nio.charset.StandardCharsets;
import java.time.ZoneId;
import java.time.ZonedDateTime;
import java.time.format.DateTimeFormatter;
import javax.crypto.Mac;
import javax.crypto.spec.SecretKeySpec;
public class Main {
private static final String CLIENT_ID = "YOUR_CLIENT_ID";
private static final String SECRET_KEY = "YOUR_SECRET_KEY";
public static void main(String[] args) throws Exception {
// Minified JSON, same as JSON.stringify()
String bodyJson = "{\"bankBin\":\"970418\",\"actionType\":\"INTERNAL_TRANSFER\",\"confirmId\":\"TXNKEY_APPROVAL_25607354makerotv_a8993883-d5fe-4ced-a0c0-20cff5b5120b\",\"otp\":\"12345678\"}";
// Timestamp in UTC+7, format yyyyMMddHHmmssSSS
String timestamp = ZonedDateTime.now(ZoneId.of("Asia/Ho_Chi_Minh"))
.format(DateTimeFormatter.ofPattern("yyyyMMddHHmmssSSS"));
String signature = hmacSha512(SECRET_KEY, timestamp + ":" + bodyJson);
HttpRequest request = HttpRequest.newBuilder()
.uri(URI.create("https://open-api.tingee.vn/v1/direct-link/approve-confirm"))
.header("accept", "application/json")
.header("Content-Type", "application/json")
.header("x-client-id", CLIENT_ID)
.header("x-request-timestamp", timestamp)
.header("x-signature", signature)
.method("PUT", HttpRequest.BodyPublishers.ofString(bodyJson, StandardCharsets.UTF_8))
.build();
HttpResponse<String> response = HttpClient.newHttpClient()
.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");
mac.init(new SecretKeySpec(key.getBytes(StandardCharsets.UTF_8), "HmacSHA512"));
byte[] hash = mac.doFinal(data.getBytes(StandardCharsets.UTF_8));
StringBuilder hex = new StringBuilder();
for (byte b : hash) hex.append(String.format("%02x", b));
return hex.toString();
}
}
<?php
$clientId = "YOUR_CLIENT_ID";
$secretKey = "YOUR_SECRET_KEY";
$body = [
"bankBin" => "970418",
"actionType" => "INTERNAL_TRANSFER",
"confirmId" => "TXNKEY_APPROVAL_25607354makerotv_a8993883-d5fe-4ced-a0c0-20cff5b5120b",
"otp" => "12345678",
];
// Do not escape "/" or non-ASCII characters so the JSON matches TINGEE's JSON.stringify
$bodyJson = json_encode($body, JSON_UNESCAPED_SLASHES | JSON_UNESCAPED_UNICODE);
// Timestamp in UTC+7, format yyyyMMddHHmmssSSS
$now = new DateTime("now", new DateTimeZone("Asia/Ho_Chi_Minh"));
$timestamp = $now->format("YmdHisv");
$signature = hash_hmac("sha512", $timestamp . ":" . $bodyJson, $secretKey);
$ch = curl_init();
curl_setopt_array($ch, [
CURLOPT_URL => "https://open-api.tingee.vn/v1/direct-link/approve-confirm",
CURLOPT_RETURNTRANSFER => true,
CURLOPT_CUSTOMREQUEST => "PUT",
CURLOPT_POSTFIELDS => $bodyJson,
CURLOPT_HTTPHEADER => [
"Accept: application/json",
"Content-Type: application/json",
"x-client-id: " . $clientId,
"x-request-timestamp: " . $timestamp,
"x-signature: " . $signature,
],
]);
$response = curl_exec($ch);
if ($response === false) {
echo "cURL Error: " . curl_error($ch);
} else {
echo $response;
}
curl_close($ch);
Sample Response
{
"code": "00",
"message": "Success",
"data": {
"successfulTransactions": [
{
"transactionId": "PM1326061500074977",
"transactionType": "regular-out",
"amount": 52525,
"currency": "VND",
"feeAccountNumber": "8600007007",
"transactionCode": "PM13",
"effectiveDate": "2026-06-15",
"acceptedDate": null,
"approvedDate": null,
"processDate": "2026-06-15T14:54:25.985408353",
"amountText": "Năm mươi hai nghìn năm trăm hai mươi lăm đồng",
"feeAmount": 10000,
"feeTotal": 11000,
"feeVAT": 1000,
"feeMethod": "O",
"remark": "Thanh toan don hang",
"originId": "TRANS_1506_A1",
"priority": false,
"status": "SUCCESS",
"creditAccountType": "ACCOUNT",
"creditAccountNumber": "123456789",
"creditAccountName": "NGUYEN VAN A",
"creditBankCode": "01202001",
"creditBankName": "Ngân hàng Đầu tư và Phát triển Việt Nam",
"creditBankShortName": "BIDV",
"debitAccountNumber": "987654321",
"debitAccountName": "CONG TY ABC"
}
],
"failedTransactions": []
}
}
| Field | Type | Description |
|---|---|---|
code | string | Result code (00 = Success). |
message | string | Response message. |
data | object | Object containing the approval result. |
data.successfulTransactions | array | Details of the transactions approved successfully (BIDV). |
data.failedTransactions | array | Details of the transactions whose approval failed (BIDV). |
data.batchId | string | The submitted batch ID (only returned for OCB — in that case data contains only this field). |
Items in successfulTransactions / failedTransactions
| Field | Type | Description |
|---|---|---|
transactionId | string | BIDV transaction ID. |
transactionType | string | Transaction type: in-bank (within BIDV), regular-out (standard interbank transfer), fast-out (NAPAS 247 fast transfer). |
transactionCode | string | BIDV transaction type code (e.g. PM02, PM13). |
status | string | Transaction status returned by BIDV (e.g. INIT, PENDING_APPROVAL, PROCESSING, BANK_PROCESSING, APPROVED, SUCCESS, REJECTED, FAILED). |
amount | number | Transaction amount. |
amountText | string | Amount in words. |
currency | string | Currency (VND). |
remark | string | Transaction description. |
approvalNote | string | Approval request note from the maker (Maker). |
originId | string | The requestId reference the partner sent when creating the order. |
priority | boolean | Priority processing flag. |
effectiveDate | string | Transaction effective date. |
acceptedDate | string | Time the bank accepted the transaction. |
approvedDate | string | Time the transaction was approved. |
processDate | string | Time the bank processed the transaction. |
feeMethod | string | Fee payer: O (the payment account pays the fee), B (the recipient pays the fee). |
feeAccountNumber | string | Fee account. |
feeAmount | number | Transaction fee (excluding VAT). |
feeVAT | number | VAT on the fee. |
feeTotal | number | Total transaction fee. |
debitAccountNumber | string | Debit account number. |
debitAccountName | string | Debit account name. |
creditAccountType | string | How the recipient receives the money: ACCOUNT (account number) or ID (identity document). |
creditAccountNumber | string | Recipient account number. |
creditAccountName | string | Recipient name. |
creditBankCode | string | Recipient bank code in the CITAD standard (e.g. 01202001 is BIDV). |
creditBankName | string | Recipient bank name. |
creditBankShortName | string | Recipient bank short name. |
creditBankAbbr | string | Recipient bank abbreviation. |
creditBranchCode | string | Recipient bank branch code. |
creditBranchName | string | Recipient bank branch name. |
creditId | string | Recipient identity document number (when creditAccountType = ID). |
creditIssueDate | string | Identity document issue date. |
creditIssueAddress | string | Identity document place of issue. |
creditCurrency | string | Recipient currency. |
originalCreditAccountNumber | string | Original recipient account number (from the original data when the order was created, if BIDV returns it). |
originalCreditName | string | Original recipient name (from the original data when the order was created, if BIDV returns it). |
Fields that BIDV does not return are omitted from the item (or have a
nullvalue).
Common error codes
| Code | Description | How to handle |
|---|---|---|
1077 | The BIDV authorization session of the approver (Checker) has expired or has not been granted | Call Get authorization URL with role = Checker so the approver signs in again, then repeat the approval step. |
1021 | The bank is not supported for this API | Check bankBin; only BIDV and OCB are supported. |
90, 91, 92, 97 | Request authentication error (timestamp, client-id, signature) | See System error codes. |
Others | Other errors | See Error codes. |