Skip to content
Agentmart
Submit a tool

aba-payway-pre-auth

Complete, complete with payout, or cancel an ABA PayWay pre-authorization.

Skill by Ruzaid-aman

IndexedMIT
Write a review

Chalk Labs

Need help deploying aba-payway-pre-auth?

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-pre-auth

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

Complete, complete with payout, or cancel an ABA PayWay pre-authorization.

Use cases: security

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-pre-auth

What's inside

Skill name
aba-payway-pre-auth
Description
Complete, complete with payout, or cancel an ABA PayWay pre-authorization.
License
MIT
Metadata
version: 1.2.1
Instructions
66 lines in SKILL.md · view on GitHub

Files (1)

  • SKILL.md

SKILL.md (first lines)

# ABA PayWay Pre-Authorization

## Quick Start
```ts
const result = await payway.preAuth.complete('order-123', 10);
```

Pre-authorization endpoints require `publicKeyPem` because requests use RSA-encrypted merchant authorization. The SDK validates the PEM structure before any call — a malformed key throws a clear `PayWayConfigError` (use the exported `isValidPublicKeyPem()` to pre-flight).

## Complete with payout
```ts
const result = await payway.preAuth.completeWithPayout('order-123', 200.0, [
  { acc: '500000001', amt: 200.0 },
]);
```

`completeWithPayout` captures the pre-auth **and** pushes funds to beneficiary
accounts in one call. Each payout entry is validated the same way as a standalone
payout:

- **Both environments:** `acc` must be digits only, length 9/11/15, and `amt` a positive USD amount.
- **Sandbox only:** `acc` must be one of the seeded sandbox beneficiaries and the payout is always **USD** — a non-whitelisted or currency-mismatched account throws `PayWayConfigError` before the request (see `aba-payway-sandbox-beneficiaries`).

```ts
// Sandbox payout rules (applies to the entry { acc: '500000001', amt: 200.0 }):
// 500000001 IS a seeded USD account, so this entry passes sandbox validation.
// A KHR beneficiary/MID or an unknown account throws PayWayConfigError locally
// BEFORE any request (see aba-payway-sandbox-beneficiaries).
```

## Capture window
Default hold window is **up to 30 days** from the initial pre-authorization (per-merchant configurable — confirm the profile value with ABA; constant `PRE_AUTH_DEFAULT_CAPTURE_WINDOW_DAYS`). Complete (full or partial) or cancel within the window; after it the hold **auto-cancels/auto-reverses with NO webhook** — poll Check Transaction to observe the terminal state (ABA-confirmed 2026-09-12).

## Error Handling
```ts
import { PayWayConfigError, PayWayAPIError } from 'aba-payway-ts';
import { PRE_AUTH_ERROR_CODES } from 'aba-payway-ts';
try {
  await payway.preAuth.completeWithPayout('order-123', 200.0, [{ acc: '500000001', amt: 200.0 }]);
} catch (error) {
  if (error instanceof PayWayConfigError) {
    console.error(error.message); // client-side: bad account/amount, sandbox whitelist/currency
  } else if (error instanceof PayWayAPIError) {
    switch (error.paywayCode) {
      case PRE_AUTH_ERROR_CODES.UNABLE_TO_COMPLETE: // PTL59
        console.error('Capture not allowed — transaction status invalid (never authorized / already done).');
        break;
      case PRE_AUTH_ERROR_CODES.MERCHANT_INVALID: // PTL62
        console.error('Profile lacks permission for this operation (e.g. complete-with-payout).');
        break;
      case PRE_AUTH_ERROR_CODES.UNABLE_TO_CANCEL: // PTL170
        console.error('Only OPEN/PENDING pre-auths can be cancelled.');
        break;
      default:
        console.error(`${error.paywayCode}: ${error.message}`);
    }
  }
}
```

## Related Skills
- [Payout](../aba-payway-payout/SKILL.md)
- [Sandbox Beneficiaries](../aba-payway-sandbox-beneficiaries/SKILL.md)
- [Configuration](../aba-payway-sdk-configuration/SKILL.md)

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)
Sep 12, 2026 (1 month ago)

From GitHub (fetched Oct 24, 2026).

Details

Version
1.2.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-pre-auth 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-pre-auth?

CallGet help
Cite this page

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