A standard API test follows a request/response pattern: your server sends a request to the PG, and the PG responds. Webhooks (notifications) reverse that flow — the PG sends a request to your server — which changes how you test them.
To receive webhooks, your server needs an externally accessible URL. localhost isn't reachable from the outside, so local development environments require a bit of extra setup.
webhook.site is a free service built exactly for this use case. No installation required — it's the fastest way to get started.
How to use it
https://webhook.site/abc123...)notiUrl parameter in your payment requestPros
Cons
ngrok creates a secure tunnel that exposes your local server to the internet. Use this when you need to test your actual business logic.
Installation
# macOS (Homebrew)
brew install ngrok
# Windows (Chocolatey)
choco install ngrok
# Or download directly from the official site
# https://ngrok.com/download
Usage
# 1. Start your local server (e.g., on port 3000)
npm run dev
# 2. In a new terminal, start ngrok
ngrok http 3000
# 3. Note the HTTPS forwarding URL
# Forwarding https://abc123.ngrok.io -> http://localhost:3000
Use the generated URL as your notiUrl:
https://abc123.ngrok.io/api/payment/noti
Pros
Cons
If you have a dev or staging server that's already publicly accessible, point notiUrl at your webhook endpoint there.
https://dev.example.com/api/payment/noti
Verify all of the following before going to production.
pktHash in the webhook matches the hash you compute server-sideOK as plain text — no whitespace, no newlineoutStatCd works correctlyVirtual accounts generate multiple types of webhooks:
outStatCd: 0051, bizType: A0): Handle when account is createdoutStatCd: 0021, bizType: B1): Handle when deposit is confirmedoutStatCd: 0021, bizType: A2): Handle when issuance is cancellednotiUrl parameter is set correctly in your payment requestOK is in the response body — no trailing spaces or newlinesFor questions during integration, contact our technical support team at .
Need technical support?
Code Samples
HectoFinancial GitHub