Test mode
Every request made with an hk_test_… key runs in test mode: data is fully separated from production, and webhooks are still signed and really delivered to your test endpoint.
No separate sandbox sign-up, no waiting for activation – a Hensa account comes with test mode.
Simulate an incoming transfer
Section titled “Simulate an incoming transfer”Banks can’t send fake money, so Hensa lets you “transfer” yourself:
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" }'Hensa creates a simulated transaction and runs exactly the production flow: matching, events, signing, delivery, retries.
Scenarios worth testing
Section titled “Scenarios worth testing”| To test | Send description |
Expected result |
|---|---|---|
| Customer pays correctly | Contains the referenceCode, exact amount |
bank_transaction.created (matched) → payment_request.paid |
| Wrong description | No reference code | bank_transaction.created with reconciliation: "pending" – try manual reconciliation |
| Underpayment | Right code, smaller amount | payment_request.partially_paid |
| Expiry | Don’t pay, wait 15 minutes | payment_request.expired |
| Your webhook fails | Make your endpoint return 500 |
Hensa retries on schedule; see deliveries in the Dashboard |
You can also press “Simulate payment” right in the Dashboard (the orange test-mode band).