Skip to content
Agentmart
Submit a tool

aba-payway-hash

Verify ABA PayWay webhook signatures with timing-safe HMAC verification.

Skill by Ruzaid-aman

IndexedMIT
Write a review

Chalk Labs

Need help deploying aba-payway-hash?

Chalk Labs sets up agents like this inside real teams: connected to your tools, tested on your data, with a human in the loop where it matters.

Book a call

Install

Works with Claude Code, Claude apps, Codex, Cursor, Gemini CLI, GitHub Copilot, VS Code, OpenCode, Goose, Windsurf. Read the repository before you give any tool access to your data.

npx agentmarket install skill/ruzaid-aman-aba-payway-hash

Asks which of your tools to add it to (Claude Code, Codex, Cursor, VS Code, Windsurf, Gemini CLI, Claude Desktop) and shows the change first. See https://agentmart.dev/cli.

Get the weekly diff

The weekly diff: one email a week with new agent tools, notable updates and grade changes, plus security alerts for tools you follow. Double opt-in, one-click unsubscribe.

We use your email only for this newsletter. Privacy

About

Verify ABA PayWay webhook signatures with timing-safe HMAC verification.

No reviews yet. Installed it? Reviews come from verified installers only. How reviews work

Permissions

What this skill can do and what it asks for, from its SKILL.md. Checked Oct 25, 2026.

Tools
No tools found
Secrets
None asked for
Install scripts
None found

Network hosts it talks to 1

  • codeload.github.com · found in install command

Files it touches

  • ~/.claude/skills/aba-payway-hash

What's inside

Skill name
aba-payway-hash
Description
Verify ABA PayWay webhook signatures with timing-safe HMAC verification.
License
MIT
Metadata
version: 1.4.1
Instructions
40 lines in SKILL.md · view on GitHub

Before installing

  • Ships executable scripts

Files (4)

  • SKILL.md
  • mock-callback.cjs · scripts/
  • sign-request.cjs · scripts/
  • verify-callback.cjs · scripts/

SKILL.md (first lines)

# Hash and Webhooks

## Quick Start
```ts
const isValid = payway.verifyCallback(req.body, req.headers['x-payway-hmac-sha512'] as string);
```

The signature arrives in the `X-PAYWAY-HMAC-SHA512` header. Do not read it from `req.body.hash`.

## Error Handling
```ts
if (!isValid) return res.status(400).send('Invalid PayWay signature');
```

## Tools (scripts/)

- **`verify-callback.cjs`** — verify a real callback offline: `node scripts/verify-callback.cjs --body-file cb.json --sig "<header>"` (or pipe the raw body). Exit 0 = valid, 1 = INVALID (do not process). Uses the SDK's exact sorted-key → HMAC-SHA512 → Base64 → timing-safe algorithm.
- **`sign-request.cjs`** — build a correctly-signed request payload: `node scripts/sign-request.cjs --preset get-mc-ref --merchant-ref "INV-1"` (presets: `checkout`, `check-transaction`, `get-mc-ref`, `exchange-rate`, or `--fields a,b,c`). The fastest way to debug `status.code 1` (Wrong Hash). The `checkout` preset signs the sandbox-verified 27-field purchase order, with `ctid` after `items`; subscription payloads (`--ctid --token-flag CITR_FIX --frequency 1M`) sign correctly, while omitted fields hash as `''` so plain purchases are unchanged.
- **`mock-callback.cjs`** — send a correctly-signed fake callback to your local webhook: `node scripts/mock-callback.cjs --url http://localhost:3000/payway/callback --tran-id order-1 --amount 10`. Test handlers without the ABA Simulator app. Exit codes (audit D09 contract): 0 = handler answered 2xx, 1 = runtime failure (network error, `--timeout`, or a non-2xx handler response — "did NOT acknowledge" is a FAILURE result), 2 = usage error (invalid `--status`/`--currency` USD|KHR/`--amount`, missing API key).

All scripts are dependency-free, read `PAYWAY_MERCHANT_ID`/`PAYWAY_API_KEY` from env (or flags), and export their functions for tests.

> **Prefer the first-class CLI (2026-09-10):** `payway-sdk webhook verify-callback`
> (one-shot check, `--record` for captured verdicts), `payway-sdk webhook trigger`
> (signed fixtures, all three callback contracts), and `payway-sdk webhook resend`
> (replay captured records) now cover these workflows natively with `--json` output;
> the scripts remain for checkout installs without the CLI on PATH.

## Related Skills
- [Check Transaction](../aba-payway-check-transaction/SKILL.md)

> **Scope (2026-09-06):** `verifyCallback` applies to the HMAC-signed checkout/webhook
> callbacks. It does **NOT** apply to payment-link pushbacks — those POST to the link's
> `return_url` with **no hash field** (live-verified: body is
> `{tran_id, status: 0, merchant_ref_no}` only). Verify payment-link payments via
> `check-transaction(tran_id)` instead. See
> [payment-link](../aba-payway-payment-link/SKILL.md) and
> `payway-sdk docs payment-link` (§17.7 — served offline by the CLI).

From Ruzaid-aman/ABA-Payway-SDK-unofficial, MIT.

More from Ruzaid-aman/ABA-Payway-SDK-unofficial

Signals

Stars
0
Forks
0
Open issues
0
Last commit (this folder)
Oct 1, 2026 (1 month ago)

From GitHub (fetched Oct 24, 2026).

Details

Version
1.4.1
License
MIT
First seen
Oct 24, 2026
Last checked
Oct 24, 2026

More from Ruzaid-aman

Done for you

Rather not set it up yourself?

Chalk Labs scopes, builds and runs agents for your team: the task audit, the eval harness, the integrations and the weekly ops report. Fixed scope, priced before we start.

See how we build AI agents →Read the case studies

Chalk Labs is a two-founder AI and growth studio. We build AI agents, CRMs and MVPs for Web3 and AI companies, and have shipped 50+ product and token launches.

launches shipped
50+
launches shipped
media placements
500+
media placements
founders on every account
2
founders on every account

Press we've placed: Forbes · CoinDesk · Decrypt · Cointelegraph · The Block

Rahil Jain, Co-founder, Chalk Labs. Ex-Goldman Sachs engineer. You talk to the person who builds it.

Get aba-payway-hash running in your business

Tell us what you want to automate. A founder replies within one working day with a plan, not a pitch deck.

Goes to the Chalk Labs founders, not the newsletter. Privacy

Need help deploying aba-payway-hash?

CallGet help
Cite this page

aba-payway-hash skill. Agent Mart. https://agentmart.dev/skills/ruzaid-aman-aba-payway-hash (last updated 2026-10-24)