{"_id":"@cabloy/paypal-server-sdk","name":"@cabloy/paypal-server-sdk","dist-tags":{"latest":"2.2.0"},"versions":{"2.2.0":{"version":"2.2.0","license":"MIT","sideEffects":false,"main":"dist/cjs/index.js","typings":"dist/cjs/types/index.d.ts","module":"dist/esm/index.js","type":"module","engines":{"node":">=14.17.0"},"peerDependencies":{},"prettier":{"printWidth":80,"semi":true,"singleQuote":true,"trailingComma":"es5","quoteProps":"preserve"},"name":"@cabloy/paypal-server-sdk","description":"PayPal's SDK for interacting with the REST APIs","author":{"name":"PayPal"},"devDependencies":{"@types/jest":"^29.4.0","@typescript-eslint/eslint-plugin":"^5.52.0","@typescript-eslint/parser":"^5.52.0","eslint":"^8.34.0","jest":"^29.4.3","rimraf":"^3.0.2","ts-jest":"29.2.6","tslib":"^2.5.0","typescript":"^5.2.0"},"dependencies":{"@apimatic/authentication-adapters":"^0.5.14","@apimatic/axios-client-adapter":"^0.3.20","@apimatic/core":"^0.10.28","@apimatic/oauth-adapters":"^0.4.18","@apimatic/schema":"^0.7.21"},"repository":{"type":"git","url":"git+https://github.com/paypal/PayPal-TypeScript-Server-SDK.git"},"bugs":{"url":"https://github.com/paypal/PayPal-TypeScript-Server-SDK/issues","email":"support@apimatic.io"},"homepage":"https://github.com/paypal/PayPal-TypeScript-Server-SDK","keywords":[],"contributors":[],"exports":{".":{"import":{"types":"./dist/esm/types/index.d.ts","default":"./dist/esm/index.js"},"require":{"types":"./dist/cjs/types/index.d.ts","default":"./dist/cjs/index.js"}},"./metadata":{"import":{"types":"./dist/esm/types/metadata/index.d.ts","default":"./dist/esm/metadata/index.js"},"require":{"types":"./dist/cjs/types/metadata/index.d.ts","default":"./dist/cjs/metadata/index.js"}}},"scripts":{"build":"rimraf dist && tsc -p tsconfig.esm.json & tsc -p tsconfig.cjs.json","lint":"eslint **/*.ts --ignore-path .eslintignore","lint:fix":"eslint **/*.ts --ignore-path .eslintignore --fix"},"_id":"@cabloy/paypal-server-sdk@2.2.0","_integrity":"sha512-c3FG/Zmra8dg2Q1V/DvI47o81jHLYRon9zEX3XiURnRzVbUKisqckozVcivkr2rWJRkiStZ9FtIApnH7Cj7JWQ==","_resolved":"/private/var/folders/qy/ds95fdx91vz7rplzrblbdxnr0000gn/T/5da5072331e54e1ab9222294e769e3a2/cabloy-paypal-server-sdk-2.2.0.tgz","_from":"file:cabloy-paypal-server-sdk-2.2.0.tgz","_nodeVersion":"24.8.0","_npmVersion":"11.6.1","dist":{"integrity":"sha512-c3FG/Zmra8dg2Q1V/DvI47o81jHLYRon9zEX3XiURnRzVbUKisqckozVcivkr2rWJRkiStZ9FtIApnH7Cj7JWQ==","shasum":"7653962304c0ff319d8c7f94310c58b582c03fb7","tarball":"https://registry.npmjs.org/@cabloy/paypal-server-sdk/-/paypal-server-sdk-2.2.0.tgz","fileCount":3486,"unpackedSize":4273026,"signatures":[{"keyid":"SHA256:DhQ8wR5APBvFHLF/+Tc+AYvPOdTpcIDqOhxsBHRwC7U","sig":"MEYCIQCQTV8MDEzGjFuXuXxzipSBb9jBS0sx0RAsvA84MrxbfAIhAPkC2u8cOHQ5I6SshTNqBzWOsxsuWTiy58Ov7F+INfDT"}]},"_npmUser":{"name":"zhennann","email":"zhen.nann@icloud.com"},"directories":{},"maintainers":[{"name":"zhennann","email":"zhen.nann@icloud.com"}],"_npmOperationalInternal":{"host":"s3://npm-registry-packages-npm-production","tmp":"tmp/paypal-server-sdk_2.2.0_1772712269547_0.8646198834857062"},"_hasShrinkwrap":false}},"time":{"created":"2026-03-05T12:04:29.487Z","2.2.0":"2026-03-05T12:04:29.742Z","modified":"2026-03-05T12:04:29.980Z"},"maintainers":[{"name":"zhennann","email":"zhen.nann@icloud.com"}],"description":"PayPal's SDK for interacting with the REST APIs","homepage":"https://github.com/paypal/PayPal-TypeScript-Server-SDK","keywords":[],"repository":{"type":"git","url":"git+https://github.com/paypal/PayPal-TypeScript-Server-SDK.git"},"contributors":[],"author":{"name":"PayPal"},"bugs":{"url":"https://github.com/paypal/PayPal-TypeScript-Server-SDK/issues","email":"support@apimatic.io"},"license":"MIT","readme":"\n# Getting Started with PayPal Server SDK\n\n## Introduction\n\n### Important Notes\n\n- **Available Features:** This SDK currently contains only 5 of PayPal's API endpoints. Additional endpoints and functionality will be added in the future.\n\n### Information\n\nThe PayPal Server SDK provides integration access to the PayPal REST APIs. The API endpoints are divided into distinct controllers:\n\n- Orders Controller: [Orders API v2](https://developer.paypal.com/docs/api/orders/v2/)\n- Payments Controller: [Payments API v2](https://developer.paypal.com/docs/api/payments/v2)\n- Vault Controller: [Payment Method Tokens API v3](https://developer.paypal.com/docs/api/payment-tokens/v3/) *Available in the US only.*\n- Transaction Search Controller: [Transaction Search API v1](https://developer.paypal.com/docs/api/transaction-search/v1/)\n- Subscriptions Controller: [Subscriptions API v1](https://developer.paypal.com/docs/api/subscriptions/v1/)\n\n## Install the Package\n\nRun the following command from your project directory to install the package from npm:\n\n```bash\nnpm install @paypal/paypal-server-sdk@2.2.0\n```\n\nFor additional package details, see the [Npm page for the @paypal/paypal-server-sdk@2.2.0 npm](https://www.npmjs.com/package/@paypal/paypal-server-sdk/v/2.2.0).\n\n## Initialize the API Client\n\n**_Note:_** Documentation for the client can be found [here.](https://www.github.com/paypal/PayPal-TypeScript-Server-SDK/tree/2.2.0/doc/client.md)\n\nThe following parameters are configurable for the API Client:\n\n| Parameter | Type | Description |\n|  --- | --- | --- |\n| environment | `Environment` | The API environment. <br> **Default: `Environment.Sandbox`** |\n| timeout | `number` | Timeout for API calls.<br>*Default*: `0` |\n| httpClientOptions | [`Partial<HttpClientOptions>`](https://www.github.com/paypal/PayPal-TypeScript-Server-SDK/tree/2.2.0/doc/http-client-options.md) | Stable configurable http client options. |\n| unstableHttpClientOptions | `any` | Unstable configurable http client options. |\n| logging | [`PartialLoggingOptions`](https://www.github.com/paypal/PayPal-TypeScript-Server-SDK/tree/2.2.0/doc/partial-logging-options.md) | Logging Configuration to enable logging |\n| clientCredentialsAuthCredentials | [`ClientCredentialsAuthCredentials`](https://www.github.com/paypal/PayPal-TypeScript-Server-SDK/tree/2.2.0/doc/auth/oauth-2-client-credentials-grant.md) | The credential object for clientCredentialsAuth |\n\nThe API client can be initialized as follows:\n\n### Code-Based Client Initialization\n\n```ts\nimport { Client, Environment, LogLevel } from '@paypal/paypal-server-sdk';\n\nconst client = new Client({\n  clientCredentialsAuthCredentials: {\n    oAuthClientId: 'OAuthClientId',\n    oAuthClientSecret: 'OAuthClientSecret'\n  },\n  timeout: 0,\n  environment: Environment.Sandbox,\n  logging: {\n    logLevel: LogLevel.Info,\n    logRequest: {\n      logBody: true\n    },\n    logResponse: {\n      logHeaders: true\n    }\n  },\n});\n```\n\n### Configuration-Based Client Initialization\n\n```ts\nimport * as path from 'path';\nimport * as fs from 'fs';\nimport { Client } from '@paypal/paypal-server-sdk';\n\n// Provide absolute path for the configuration file\nconst absolutePath = path.resolve('./config.json');\n\n// Read the configuration file content\nconst fileContent = fs.readFileSync(absolutePath, 'utf-8');\n\n// Initialize client from JSON configuration content\nconst client = Client.fromJsonConfig(fileContent);\n```\n\nSee the [Configuration-Based Client Initialization](https://www.github.com/paypal/PayPal-TypeScript-Server-SDK/tree/2.2.0/doc/configuration-based-client-initialization.md) section for details.\n\n### Environment-Based Client Initialization\n\n```ts\nimport * as dotenv from 'dotenv';\nimport * as path from 'path';\nimport * as fs from 'fs';\nimport { Client } from '@paypal/paypal-server-sdk';\n\n// Optional - Provide absolute path for the .env file\nconst absolutePath = path.resolve('./.env');\n\nif (fs.existsSync(absolutePath)) {\n  // Load environment variables from .env file\n  dotenv.config({ path: absolutePath, override: true });\n}\n\n// Initialize client using environment variables\nconst client = Client.fromEnvironment(process.env);\n```\n\nSee the [Environment-Based Client Initialization](https://www.github.com/paypal/PayPal-TypeScript-Server-SDK/tree/2.2.0/doc/environment-based-client-initialization.md) section for details.\n\n## Environments\n\nThe SDK can be configured to use a different environment for making API calls. Available environments are:\n\n### Fields\n\n| Name | Description |\n|  --- | --- |\n| Production | PayPal Live Environment |\n| Sandbox | **Default** PayPal Sandbox Environment |\n\n## Authorization\n\nThis API uses the following authentication schemes.\n\n* [`Oauth2 (OAuth 2 Client Credentials Grant)`](https://www.github.com/paypal/PayPal-TypeScript-Server-SDK/tree/2.2.0/doc/auth/oauth-2-client-credentials-grant.md)\n\n## List of APIs\n\n* [Orders](https://www.github.com/paypal/PayPal-TypeScript-Server-SDK/tree/2.2.0/doc/controllers/orders.md)\n* [Payments](https://www.github.com/paypal/PayPal-TypeScript-Server-SDK/tree/2.2.0/doc/controllers/payments.md)\n* [Vault](https://www.github.com/paypal/PayPal-TypeScript-Server-SDK/tree/2.2.0/doc/controllers/vault.md)\n* [Transaction Search](https://www.github.com/paypal/PayPal-TypeScript-Server-SDK/tree/2.2.0/doc/controllers/transaction-search.md)\n* [Subscriptions](https://www.github.com/paypal/PayPal-TypeScript-Server-SDK/tree/2.2.0/doc/controllers/subscriptions.md)\n\n## SDK Infrastructure\n\n### Configuration\n\n* [HttpClientOptions](https://www.github.com/paypal/PayPal-TypeScript-Server-SDK/tree/2.2.0/doc/http-client-options.md)\n* [RetryConfiguration](https://www.github.com/paypal/PayPal-TypeScript-Server-SDK/tree/2.2.0/doc/retry-configuration.md)\n* [ProxySettings](https://www.github.com/paypal/PayPal-TypeScript-Server-SDK/tree/2.2.0/doc/proxy-settings.md)\n* [Configuration-Based Client Initialization](https://www.github.com/paypal/PayPal-TypeScript-Server-SDK/tree/2.2.0/doc/configuration-based-client-initialization.md)\n* [Environment-Based Client Initialization](https://www.github.com/paypal/PayPal-TypeScript-Server-SDK/tree/2.2.0/doc/environment-based-client-initialization.md)\n* [PartialLoggingOptions](https://www.github.com/paypal/PayPal-TypeScript-Server-SDK/tree/2.2.0/doc/partial-logging-options.md)\n* [PartialRequestLoggingOptions](https://www.github.com/paypal/PayPal-TypeScript-Server-SDK/tree/2.2.0/doc/partial-request-logging-options.md)\n* [PartialResponseLoggingOptions](https://www.github.com/paypal/PayPal-TypeScript-Server-SDK/tree/2.2.0/doc/partial-response-logging-options.md)\n* [LoggerInterface](https://www.github.com/paypal/PayPal-TypeScript-Server-SDK/tree/2.2.0/doc/logger-interface.md)\n\n### HTTP\n\n* [HttpRequest](https://www.github.com/paypal/PayPal-TypeScript-Server-SDK/tree/2.2.0/doc/http-request.md)\n\n### Utilities\n\n* [ApiResponse](https://www.github.com/paypal/PayPal-TypeScript-Server-SDK/tree/2.2.0/doc/api-response.md)\n* [ApiError](https://www.github.com/paypal/PayPal-TypeScript-Server-SDK/tree/2.2.0/doc/api-error.md)\n\n","readmeFilename":"README.md","_rev":"1-e901ed2c64b4df8ebce5d5241dde882f"}