A TypeScript SDK for PayPal REST APIs that provides a non-singleton design for multi-currency support, built on requestretry for automatic retries with idempotency, native promises, and Joi schema validation. Version 0.0.52, active development, includes TypeScript types, and offers mock support for testing. Differentiators vs official PayPal Node SDK: ES6+ features, access token expiration tracking, and support for multiple PayPal apps.
npm install paypal-rest-apiNo compatibility data collected yet for this library.
Verified import paths — ran on the pinned version, not inferred.
Initializes the PayPal client with credentials and creates a sale payment.
Consider using the official PayPal Node SDK for production.
Monitor for updates; consider alternatives like axios-based SDKs.
Pin exact version in package.json.
Run 'npm install paypal-rest-api' and ensure import is 'import { PayPalRestApi } from 'paypal-rest-api'.Check the API: use lowercase methods like 'payment.create'. Refer to examples.
Ensure requestOptions is an object and maxRetries is an integer.