Skip to content

Commit 199034a

Browse files
Add new lineItems field to redirectToCheckout (stripe#64)
1 parent 8b7bb99 commit 199034a

File tree

1 file changed

+23
-0
lines changed

1 file changed

+23
-0
lines changed

types/stripe-js/checkout.d.ts

+23
Original file line numberDiff line numberDiff line change
@@ -22,6 +22,24 @@ declare module '@stripe/stripe-js' {
2222
* An array of objects representing the items that your customer would like to purchase.
2323
* These items are shown as line items in the Checkout interface and make up the total amount to be collected by Checkout.
2424
*/
25+
lineItems?: Array<{
26+
/**
27+
* The ID of the price that the customer would like to purchase. SKU or plan IDs may also be used.
28+
*/
29+
price?: string;
30+
31+
/**
32+
* The quantity of units for the item.
33+
*/
34+
quantity?: number;
35+
}>;
36+
37+
/**
38+
* An array of objects representing the items that your customer would like to purchase.
39+
* These items are shown as line items in the Checkout interface and make up the total amount to be collected by Checkout.
40+
*
41+
* @deprecated
42+
*/
2543
items?: Array<{
2644
/**
2745
* The ID of the SKU that the customer would like to purchase
@@ -39,6 +57,11 @@ declare module '@stripe/stripe-js' {
3957
quantity?: number;
4058
}>;
4159

60+
/**
61+
* The mode of the Checkout Session. Required if using lineItems.
62+
*/
63+
mode?: 'payment' | 'subscription';
64+
4265
/**
4366
* A unique string to reference the Checkout session.
4467
* This can be a customer ID, a cart ID, or similar.

0 commit comments

Comments
 (0)