
Security News
Crates.io Users Targeted by Phishing Emails
The Rust Security Response WG is warning of phishing emails from rustfoundation.dev targeting crates.io users.
@weweb/backend-stripe
Advanced tools
This package provides a Stripe integration for WeWeb backend services, allowing you to easily integrate Stripe's payment processing capabilities into your WeWeb applications.
npm install @weweb/backend-stripe
The integration can be configured either through environment variables or by passing options when creating the integration:
import { createStripeIntegration } from '@weweb/backend-stripe';
// Using environment variables
// Set STRIPE_SECRET_KEY in your environment
// OR using options
const stripeIntegration = createStripeIntegration({
secretKey: 'sk_your_secret_key',
apiVersion: '2023-10-16' // optional
});
STRIPE_SECRET_KEY
: Your Stripe Secret Key (starts with 'sk_')const paymentIntent = await stripe.methods.create_payment_intent({
amount: 2000, // Amount in cents
currency: 'usd',
payment_method_types: ['card']
});
const customer = await stripe.methods.create_customer({
email: 'customer@example.com',
name: 'John Doe'
});
const subscription = await stripe.methods.create_subscription({
customer: 'cus_xxx',
items: [
{ price: 'price_xxx' }
]
});
const product = await stripe.methods.create_product({
name: 'Premium Plan',
description: 'Premium subscription plan'
});
create_payment_intent
: Create a new PaymentIntentget_payment_intent
: Retrieve a PaymentIntentcreate_customer
: Create a new customerget_customer
: Retrieve a customerupdate_customer
: Update a customercreate_subscription
: Create a new subscriptionget_subscription
: Retrieve a subscriptionupdate_subscription
: Update a subscriptioncreate_product
: Create a new productcreate_price
: Create a new pricecreate_refund
: Create a refundlist_customers
: List customerslist_subscriptions
: List subscriptionslist_products
: List productslist_prices
: List pricesNever expose your Stripe secret key in client-side code. Always keep it secure and use it only in your backend services.
MIT
FAQs
Stripe integration for WeWeb backend services
The npm package @weweb/backend-stripe receives a total of 3 weekly downloads. As such, @weweb/backend-stripe popularity was classified as not popular.
We found that @weweb/backend-stripe demonstrated a healthy version release cadence and project activity because the last version was released less than a year ago. It has 4 open source maintainers 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
The Rust Security Response WG is warning of phishing emails from rustfoundation.dev targeting crates.io users.
Product
Socket now lets you customize pull request alert headers, helping security teams share clear guidance right in PRs to speed reviews and reduce back-and-forth.
Product
Socket's Rust support is moving to Beta: all users can scan Cargo projects and generate SBOMs, including Cargo.toml-only crates, with Rust-aware supply chain checks.