Skip to main content

@paymint/server

Server-side SDK for Paymint billing.

Installation

Note: For Next.js apps, use @paymint/nextjs instead - it includes this package plus React hooks.

Quick Start

Scoped Customer Pattern

When making multiple calls for the same customer, use forCustomer() for cleaner code:

Scoped Customer Methods

BillingState Type

Complete Examples

Check Subscription Access

Subscription Management

Initialize Checkout

Error Handling

All errors extend PaymintError from @paymint/shared:

Environment

The API key format determines the environment:
  • paymint_test_xxx → Sandbox
  • paymint_live_xxx → Production

Comparison with @paymint/node

License

MIT