Beta · Hensa-Version 2026-11-01
Bank-transfer payments API for websites, apps and counters.
Create a VietQR code per order. When the customer transfers, Hensa matches the payment to the order and sends a signed event to your server, usually seconds after the bank reports the credit.
One order
- Create the code
POST /v1/payment_requestsprq_01JD7Q8M · ₫150,000 · LK7F3K9 - Customer transfers
Bank credit+₫150,000 · "LK7F3K9 thanh toan don hang" - Hensa matches
Auto-matchedbtx_01JD7QA9 → prq_01JD7Q8M - Your server receives
POST cuahang.vn/webhooks/hensapayment_request.paid · 142 ms
One order, from creating the code to your server receiving the webhook.
Where you sell
One integration for everywhere you sell
The same API serves your website checkout, ordering app, counter register and accounting software. Money goes straight to the store's bank account; Hensa never holds funds.
- 01Bank-transfer checkoutShow a QR per order and confirm it by webhook instead of waiting for a screenshot.
- 02Counter paymentsA dynamic QR per bill and a speaker that reads the amount aloud, no banking app needed.
- 03ReconciliationAutomatic matching by reference code. Wrong descriptions can still be matched, by hand or via the API.
- 04Payment alertsEvery credit to a linked account emits an event, including ones not tied to an order.
In development: WooCommerce, Haravan and Sapo plugins · Node.js and PHP SDKs · a CLI that forwards webhooks to your machine.
Get started
From a test key to your first webhook
Test mode runs the production flow with fake money. No sandbox sign-up, no review.
- Create a test keyDashboard › Developer › Create key.
hk_test_keys work immediately. - Create a payment requestGet the QR, a reference code and a 15-minute expiry.
- Simulate the transferYour server receives a real, signed
payment_request.paid.
curl https://api.hensa.example/v1/payment_requests \
-H "Authorization: Bearer $HENSA_API_KEY" \
-H "Idempotency-Key: $(uuidgen)" \
-H "Content-Type: application/json" \
-d '{ "amount": 150000, "externalOrderRef": "DH-1024" }'curl https://api.hensa.example/v1/test/bank_transfers \
-H "Authorization: Bearer $HENSA_TEST_KEY" \
-H "Idempotency-Key: $(uuidgen)" \
-H "Content-Type: application/json" \
-d '{ "amount": 150000, "description": "LK7F3K9 thanh toan don hang", "counterpartyName": "NGUYEN VAN AN" }'Specification
Specifications
These are part of the API specification, not marketing promises.
- Webhook signatures
- HMAC-SHA256 in the
Hensa-Signatureheader, rejected when more than 5 minutes old. - Retries
- 8 attempts over about 45 hours on a public schedule. Email alert after 3 consecutive failures.
- Endpoint pausing
- Only after 7 days of continuous failure, with advance email.
- Redelivery
- Within 30 days, from the Dashboard or the API.
- Idempotency
Idempotency-Keyheader, remembered for 24 hours.- Versioning
- Date-based (currently
2026-11-01). Old versions supported for at least 12 months. - Documentation
- Vietnamese and English. The API reference is generated from the same contract the servers validate requests against.
API reference
- 3endpointsPayment requestsCreate a dynamic VietQR per order. When the customer pays, Hensa matches it automatically and sends
payment_request.paid. - 3endpointsBank transactionsEvery incoming transfer to linked accounts, with its reconciliation status.
- 7endpointsWebhook endpointsRegister event URLs, rotate secrets, inspect deliveries and redeliver.
- 1endpointsTest modeOnly with
hk_test_keys. Simulate incoming money to exercise the whole flow without real transfers.
Start with a test key. Free, no sales call.
Start in 5 minutes