Skip to main content
The @pawpayments/sdk package is the official Node.js SDK for the Native V2 API. It covers the same REST resources as the Python SDK, uses only built-in fetch at runtime (no HTTP dependencies), ships ES modules and CommonJS builds plus .d.ts, and exposes webhook verification helpers aligned with other official integrations.

Install from npm

The published npm package.

View source on GitHub

Source, releases, and issue tracker.

Installation

Quick start

PawPaymentsOptions also accepts baseUrl (default https://api.pawpayments.com), timeoutMs, and a custom fetch implementation for constrained runtimes.

Resources

Successful calls return unwrapped result payloads (or list envelopes where the API paginates). Failures throw PawPaymentsApiError with code, httpStatus, message, and optional details. payouts.create and payouts.batch accept optional uniqId for idempotency (UUIDv4). If omitted, the SDK uses crypto.randomUUID(); duplicates within two hours yield HTTP 409.

Webhook verification

Validate against the raw body buffer or Uint8Array your framework exposes — parsing JSON first and re-stringifying will change bytes and fail HMAC checks.
Permanent-address callbacks that include permanent_address_id should return 200 OK without duplicating checkout-specific side effects, consistent with the PHP plugins.

Errors