
Security News
Browserslist-rs Gets Major Refactor, Cutting Binary Size by Over 1MB
Browserslist-rs now uses static data to reduce binary size by over 1MB, improving memory use and performance for Rust-based frontend tools.
paypal-server-api
Advanced tools
Powerful assistive library for interacting with the PayPal API.
Site | NPM Module | GitHub Repo
PayPal API makes it easy to work with the PayPal API.
Install with npm:
npm install paypal-server-api
After installing via npm, simply require
the library and authenticate it.
// In your functions/index.js file
const Payapl = require('paypal-server-api');
const paypal = new Payapl({
clientId: 'client_id', // Your PayPal client ID
secret: 'secret', // Your PayPal secret
environment: 'production', // Determine which API URL to use (sandbox OR production)
log: true, // Log some information to the console
});
// Authenticate with PayPal
await paypal.authenticate();
After installing and authenticating, begin enjoying the library ๐งฐ.
// Get subscription details
const subscription = await paypal.execute(`v1/billing/subscriptions/I-ABC123ABC123`);
// Update subscription pricing
const update = await paypal.execute(`v1/billing/subscriptions/I-ABC123ABC123`, {
method: 'PATCH',
body: [
{
op: 'replace',
path: '/plan/billing_cycles/@sequence==1/pricing_scheme/fixed_price',
value: {
currency_code: 'USD',
value: '19.95',
},
},
{
op: 'replace',
path: '/plan/payment_preferences/payment_failure_threshold',
value: 0,
},
{
op: 'replace',
path: '/plan/payment_preferences/auto_bill_outstanding',
value: true,
},
]
});
Add your PayPal client secret and client ID to environment variables and run the test command
export PAYPAL_CLIENT_ID="..."
export PAYPAL_SECRET="..."
export PAYPAL_SUBSCRIPTION_ID="..."
npm run test
If you are still having difficulty, we would love for you to post a question to the PayPal API issues page. It is much easier to answer questions that include your code and relevant files! So if you can provide them, we'd be extremely grateful (and more likely to help you find the answer!)
Somiibo: A Social Media Bot with an open-source module library.
JekyllUp: A website devoted to sharing the best Jekyll themes.
Slapform: A backend processor for your HTML forms on static sites.
Proxifly: A backend processor for your HTML forms on static sites.
SoundGrail Music App: A resource for producers, musicians, and DJs.
Hammock Report: An API for exploring and listing backyard products.
Ask us to have your project listed! :)
FAQs
Powerful assistive library for interacting with the PayPal API.
The npm package paypal-server-api receives a total of 523 weekly downloads. As such, paypal-server-api popularity was classified as not popular.
We found that paypal-server-api demonstrated a not healthy version release cadence and project activity because the last version was released a year ago.ย It has 1 open source maintainer collaborating on the project.
Did you know?
Socket for GitHub automatically highlights issues in each pull request and monitors the health of all your open source dependencies. Discover the contents of your packages and block harmful activity before you install or update your dependencies.
Security News
Browserslist-rs now uses static data to reduce binary size by over 1MB, improving memory use and performance for Rust-based frontend tools.
Research
Security News
Eight new malicious Firefox extensions impersonate games, steal OAuth tokens, hijack sessions, and exploit browser permissions to spy on users.
Security News
The official Go SDK for the Model Context Protocol is in development, with a stable, production-ready release expected by August 2025.