Skip to main content

@paymint/node

Low-level HTTP client for the Paymint API.

Installation

Note: For most use cases, use @paymint/server or @paymint/nextjs instead. This package provides the underlying HTTP client.

Quick Start

Configuration

API Key Format

  • paymint_test_xxx - Sandbox/test environment
  • paymint_live_xxx - Production environment
The environment is automatically detected from your API key.

Client Options

Resources

The client is organized into resources that map to API endpoints:

client.products

client.checkout

client.subscriptions

Error Handling

All errors extend PaymintError:

Error Types

TypeScript Support

Full TypeScript types are included:

Complete Example

Advanced Usage

Custom Base URL

For testing or self-hosted instances:
Environment-based Auto-Configuration: By default, all SDKs connect to https://api.paymint.dev. To use a local API server during Paymint internal development:
This will automatically use http://localhost:3002 instead of the production API.

Timeout Configuration

Request ID Tracking

All errors include a request ID for support:

License

MIT