New Case Study:See how Anthropic automated 95% of dependency reviews with Socket.Learn More
Socket
Sign inDemoInstall
Socket

next-stripe-helper

Package Overview
Dependencies
Maintainers
1
Versions
71
Alerts
File Explorer

Advanced tools

Socket logo

Install Socket

Detect and block malicious and high-risk dependencies

Install

next-stripe-helper - npm Package Compare versions

Comparing version 1.2.2 to 1.2.3

10

dist/connect/index.d.ts

@@ -53,2 +53,10 @@ import { Stripe } from 'stripe';

/**
* Retrieves a Stripe Connect account.
*
* @param {string} accountId - The ID of the connected account.
* @returns {Promise<Stripe.Account>} - A promise that resolves to the retrieved account.
* @throws {Error} - If there's an error during the request.
*/
declare const retrieveAccount: (accountId: string) => Promise<Stripe.Account>;
/**
* Creates a Connect Express login link for a connected account.

@@ -62,2 +70,2 @@ *

declare const createConnectExpressLoginLink: (accountId: string) => Promise<string>;
export { createConnectedAccount, createPayout, startOAuthFlow, handleOAuthCallback, createAccountLink, createConnectExpressLoginLink };
export { createConnectedAccount, createPayout, startOAuthFlow, handleOAuthCallback, createAccountLink, retrieveAccount, createConnectExpressLoginLink };
"use strict";
Object.defineProperty(exports, "__esModule", { value: true });
exports.createConnectExpressLoginLink = exports.createAccountLink = exports.handleOAuthCallback = exports.startOAuthFlow = exports.createPayout = exports.createConnectedAccount = void 0;
exports.createConnectExpressLoginLink = exports.retrieveAccount = exports.createAccountLink = exports.handleOAuthCallback = exports.startOAuthFlow = exports.createPayout = exports.createConnectedAccount = void 0;
const stripe_1 = require("../utils/stripe");

@@ -124,2 +124,19 @@ /**

/**
* Retrieves a Stripe Connect account.
*
* @param {string} accountId - The ID of the connected account.
* @returns {Promise<Stripe.Account>} - A promise that resolves to the retrieved account.
* @throws {Error} - If there's an error during the request.
*/
const retrieveAccount = async (accountId) => {
try {
const account = await stripe_1.stripe.accounts.retrieve(accountId);
return account;
}
catch (error) {
(0, stripe_1.handleStripeError)(error);
}
};
exports.retrieveAccount = retrieveAccount;
/**
* Creates a Connect Express login link for a connected account.

@@ -126,0 +143,0 @@ *

2

package.json
{
"name": "next-stripe-helper",
"version": "1.2.02",
"version": "1.2.03",
"description": "Easily add Stripe boilerplate code to Nextjs, like webhook handling, and subscription updates. This package provides a thin wrapper around the Stripe API, and makes integrating Stripe and NextJS a lot faster!",

@@ -5,0 +5,0 @@ "homepage": "https://github.com/i-dream-of-ai/next-stripe-helper",

@@ -353,2 +353,21 @@ # next-stripe-helper

### Retrieve Connect Account
Retrieves a Stripe Connect account.
```javascript
const account = await retrieveAccount(
'acct_123456789'
);
```
Parameters:
- `accountId` (required): The ID of the connected account.
Returns:
- An object representing the retrieved Stripe Connect account.
### Create Connect Express Login Link

@@ -355,0 +374,0 @@

Sorry, the diff of this file is not supported yet

SocketSocket SOC 2 Logo

Product

  • Package Alerts
  • Integrations
  • Docs
  • Pricing
  • FAQ
  • Roadmap
  • Changelog

Packages

npm

Stay in touch

Get open source security insights delivered straight into your inbox.


  • Terms
  • Privacy
  • Security

Made with ⚡️ by Socket Inc