next-stripe-helper
Advanced tools
Comparing version 1.1.1 to 1.1.2
@@ -9,3 +9,3 @@ import { Stripe } from 'stripe'; | ||
*/ | ||
declare const createCheckoutSessionForSavingCard: (customerId: string, successUrl: string, cancelUrl: string) => Promise<string | undefined>; | ||
declare const createCheckoutSessionForSavingCard: (customerId: string, successUrl: string, cancelUrl: string) => Promise<Stripe.Checkout.Session>; | ||
export { createCheckoutSession, createCheckoutSessionForSavingCard }; |
@@ -37,3 +37,3 @@ "use strict"; | ||
}); | ||
return session.id; | ||
return session; | ||
} | ||
@@ -40,0 +40,0 @@ catch (error) { |
{ | ||
"name": "next-stripe-helper", | ||
"version": "1.1.1", | ||
"version": "1.1.2", | ||
"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 @@ "main": "dist/index.js", |
@@ -37,3 +37,3 @@ import { Stripe } from 'stripe'; | ||
cancelUrl: string | ||
): Promise<string | undefined> => { | ||
): Promise<Stripe.Checkout.Session> => { | ||
try { | ||
@@ -47,3 +47,3 @@ const session = await stripe.checkout.sessions.create({ | ||
}); | ||
return session.id; | ||
return session; | ||
} catch (error) { | ||
@@ -50,0 +50,0 @@ handleStripeError(error as Stripe.errors.StripeError); |
Sorry, the diff of this file is not supported yet
80630