TCONNECT
API SOLUTION

Automated fee collection
for clinics & hospitals

One identified QR code per visit. The patient just scans VietQR, and the system auto-matches the right patient + record + charge, cutting cashier queues with instant reconciliation.

Doctor at a clinic collecting hospital fees via API Scan QR · recorded instantly
🩺 Exam & diagnostics💊 Pharmacy🏥 Admission/discharge📋 Packages · vaccination
Quick summary

Clinics and hospitals collect many kinds of fees: exam, diagnostics, medicine, inpatient deposits, health-check and vaccination packages. With the same payment API solution, each charge is tied to an order ID (order_id) or a Virtual Account (VA) by patient code and visit, so incoming money auto-matches the right record, cutting cashier queues, and the money lands directly in the facility's account.

The problem

Crowded cashier counters, manual reconciliation that mismatches records

At peak hours patients crowd the cashier counter; staff collect money while keying it in by hand and cross-checking the statement to know who paid for which visit.

  • 1Peak-hour queues — patients line up at the cashier counter to pay and get a receipt.
  • 2Transfers with a note — the cashier scans the statement by hand, slow and easy to miss.
  • 3Two patients, same amount — manual matching easily mixes up records and visits.
  • 4Many charges in a day — exam, diagnostics, medicine, deposits, so end-of-day tallying is a slog.
General clinic fee counter

The root cause is that collecting and recording is still done by hand. A payment API solution ties each charge to the patient code + visit, so incoming money auto-matches the right record.

Applies to

One API solution — every hospital charge

Each charge is tied to an order ID (order_id) or a VA by patient code and visit, so incoming money auto-matches the right patient — right record — right charge.

ChargeHow it's collectedWhat the system does when money arrives
Exam & diagnosticsQR per visitMatch the right patient, open results/prescription
PharmacyQR per prescriptionDispense medicine, issue invoice
Admission / dischargeVA per inpatient recordUpdate deposit & final settlement
Packages · vaccinationPrepaid QRActivate the package, record sessions used
undefined🩺 Exam

Exam & diagnostics

QR per visit, collecting the right charge.

Money in → open results/prescription
undefined💊 Pharmacy

Pharmacy

QR per prescription, issue the invoice right away.

Money in → dispense medicine
undefined🏥 Inpatient

Admission / discharge

Deposit & settlement per record (VA).

Money in → update balance due
undefined📋 Package

Packages · vaccination

Sell prepaid packages, activate automatically.

Money in → activate the package
How the flow works

From the patient's scan to the recording

1

Authenticate & connect

The HIS/EMR software gets a TCONNECT API access token. Set up once, sandbox then production.

2

Generate the fee QR

Each bill creates a dynamic QR tied to patient code · visit code · charge; shown at the counter or sent via app/Zalo/SMS.

3

Credit notice & recording

TCONNECT sends an automatic credit notice (IPN). Using the order_id, the system matches the right record, marks it paid, and releases the prescription/discharge.

// order_id định danh cho khoản thu này (tối đa 36 ký tự)
const payload = {
  req_id: "req-BN048213-KHAM-20260816", order_id: "BN048213-KHAM-20260816",
  va: "VA100023312", bincode: "970454", amount: 350000,
}; // amount 0/bỏ trống = QR tĩnh; > 0 = QR động

// Mã hoá AES-256-CBC (hex) rồi gọi API tạo QR
const res = await fetch("https://sme-open-api-sandbox.tconnect.vn/openapi/v1/transaction/qr/generate", {
  method: "POST",
  headers: {
    "partner-code": partnerCode,
    "x-service-code": serviceCode, // lấy từ API Get Services
    Authorization: `Bearer ${accessToken}`,
    "Content-Type": "application/json",
  },
  body: JSON.stringify({ data: encryptAES256(payload) }),
});

One identifier per charge — no mismatched records

ChargeExample order_idMeaning
ExamBN048213-KHAM-20260816Patient 048213, exam on 16/08
DiagnosticsBN048213-CLS-XN01Lab test 01 of the visit
PharmacyBN048213-NHATHUOC-07Prescription 07 of the patient
Vaccination packageGOI-TIEMCHUNG-2026T08Vaccination package for August 2026

When the patient pays, TCONNECT sends an automatic credit notice to the HIS (via IPN). Thanks to the order_id, the system knows right away which charge it is, matches the right patient + visit, and marks it paid, so the cashier does not have to key in or scan statements. The credit-notice part needs just three principles: verify the calling source, no duplicate recording, and respond fast (under a few seconds).

Many counters, many branches — rolled up into one dashboard

Because each charge has an identified VA/order_id, revenue rolls up automatically to the right counter and the right branch. Managers see at a glance which charges are collected and which are still open, and close the day in minutes instead of tallying by hand.

E-invoicing (optional)

After recording the payment, you can call TCONNECT's e-invoicing API to automatically issue an invoice or receipt to the customer, compliant with Decrees 123/2020 & 70/2025. This is an add-on; the automated collection flow above runs independently.

Bedside collection for inpatient wards

For hospitals with large inpatient wards, the collection point can even reach the patient's room with a Mini POS, letting family members pay deposits and settle the discharge right at the bedside. Read more: Bedside hospital fee payment.

What clinics / hospitals gain

Fewer queues · no more statement scanning

Shorter cashier queues at peak hours.
Match the right patient + record, no wrong charge.
Instant reconciliation by counter and by branch.
Patients scan VietQR with any bank app.
Money lands directly in the facility's account, no custody.
Integrate once into the HIS software you already use.
Frequently asked questions

Quick answers for clinics & integrators

? Does the patient need to install a separate app?
No. The patient or a family member scans the QR with any bank app (VietQR), or transfers to the visit's identified account. No separate app needed.
? At peak hours, can this reduce the cashier queue?
Yes. Patients scan the QR and pay on the spot or on their phone; the system records it instantly, so the counter does not have to key in and reconcile each transaction.
? If two patients pay the same amount, could their records get mismatched?
No, because matching is based on the VA or the order_id tied to the patient code and visit code, not on the amount or the transfer note.
? Does the hospital fee pass through a custodial intermediary?
No. The money lands directly in the clinic's or hospital's bank account; TCONNECT only records it and sends the credit notice.
? How long does it take to integrate into clinic software (HIS)?
With the sandbox and the available API spec file, the core collection flow (connect, create QR, receive credit notice) usually takes a few working days.