Skip to main content

Overview

The @1stdigital/prism-nestjs package provides a full-featured NestJS module with decorators, guards, and interceptors for payment-protecting your API routes.

Decorator-Based

@Payment() and @Payer() decorators

Module System

PrismModule.forRoot() configuration

Dependency Injection

Works with NestJS DI system

Installation


The canonical SDK config is identifyToken (PRISM_IDENTIFY_TOKEN env var) — formerly apiKey / PRISM_API_KEY. SDKs accept the legacy names as fallback during the migration window; new code should use the canonical names.

Quick Start


Configuration

Module Options


Decorators

@Payment() Decorator

@Payer() Decorator


Accessing Payment Info

Request Context


Settlement Validation

NestJS uses an Interceptor to validate settlement:

Testing


Production Deployment

Last modified on May 5, 2026