@stripe/stripe-js 3.0.5 → 3.0.7
This diff represents the content of publicly available package versions that have been released to one of the supported registries. The information contained in this diff is provided for informational purposes only and reflects changes between package versions as they appear in their respective public registries.
- package/dist/index.d.mts +290 -124
- package/dist/index.d.ts +290 -124
- package/dist/stripe.js +1 -1
- package/dist/stripe.mjs +1 -1
- package/package.json +1 -1
- package/pure/index.d.mts +289 -123
- package/pure/index.d.ts +289 -123
- package/pure/index.js +1 -1
- package/pure/index.mjs +1 -1
package/pure/index.d.mts
CHANGED
|
@@ -4963,6 +4963,17 @@ interface ConfirmCashappSetupData extends SetupIntentConfirmParams {
|
|
|
4963
4963
|
return_url?: string;
|
|
4964
4964
|
}
|
|
4965
4965
|
|
|
4966
|
+
/**
|
|
4967
|
+
* An options object to control the behavior of `stripe.confirmCashappSetup`.
|
|
4968
|
+
*/
|
|
4969
|
+
interface ConfirmCashappSetupOptions {
|
|
4970
|
+
/*
|
|
4971
|
+
* Set this to `false` if you want to [manually handle the authorization QR code or redirect](https://stripe.com/docs/payments/cash-app-pay/set-up-payment?platform=web&ui=API#web-create-setup-intent).
|
|
4972
|
+
* Default is `true`.
|
|
4973
|
+
*/
|
|
4974
|
+
handleActions?: boolean;
|
|
4975
|
+
}
|
|
4976
|
+
|
|
4966
4977
|
/**
|
|
4967
4978
|
* Data to be sent with a `stripe.confirmIdealSetup` request.
|
|
4968
4979
|
* Refer to the [Setup Intents API](https://stripe.com/docs/api/setup_intents/confirm) for a full list of parameters.
|
|
@@ -5144,26 +5155,6 @@ interface CollectBankAccountForSetupOptions {
|
|
|
5144
5155
|
expand?: Array<string>;
|
|
5145
5156
|
}
|
|
5146
5157
|
|
|
5147
|
-
type setupIntents_ConfirmCardSetupData = ConfirmCardSetupData;
|
|
5148
|
-
type setupIntents_ConfirmCardSetupOptions = ConfirmCardSetupOptions;
|
|
5149
|
-
type setupIntents_ConfirmCashappSetupData = ConfirmCashappSetupData;
|
|
5150
|
-
type setupIntents_ConfirmIdealSetupData = ConfirmIdealSetupData;
|
|
5151
|
-
type setupIntents_ConfirmPayPalSetupData = ConfirmPayPalSetupData;
|
|
5152
|
-
type setupIntents_ConfirmSepaDebitSetupData = ConfirmSepaDebitSetupData;
|
|
5153
|
-
type setupIntents_ConfirmSofortSetupData = ConfirmSofortSetupData;
|
|
5154
|
-
type setupIntents_ConfirmSofortSetupOptions = ConfirmSofortSetupOptions;
|
|
5155
|
-
type setupIntents_ConfirmAuBecsDebitSetupData = ConfirmAuBecsDebitSetupData;
|
|
5156
|
-
type setupIntents_ConfirmBacsDebitSetupData = ConfirmBacsDebitSetupData;
|
|
5157
|
-
type setupIntents_ConfirmBancontactSetupData = ConfirmBancontactSetupData;
|
|
5158
|
-
type setupIntents_ConfirmAcssDebitSetupData = ConfirmAcssDebitSetupData;
|
|
5159
|
-
type setupIntents_ConfirmAcssDebitSetupOptions = ConfirmAcssDebitSetupOptions;
|
|
5160
|
-
type setupIntents_VerifyMicrodepositsForSetupData = VerifyMicrodepositsForSetupData;
|
|
5161
|
-
type setupIntents_ConfirmUsBankAccountSetupData = ConfirmUsBankAccountSetupData;
|
|
5162
|
-
type setupIntents_CollectBankAccountForSetupOptions = CollectBankAccountForSetupOptions;
|
|
5163
|
-
declare namespace setupIntents {
|
|
5164
|
-
export type { setupIntents_ConfirmCardSetupData as ConfirmCardSetupData, setupIntents_ConfirmCardSetupOptions as ConfirmCardSetupOptions, setupIntents_ConfirmCashappSetupData as ConfirmCashappSetupData, setupIntents_ConfirmIdealSetupData as ConfirmIdealSetupData, setupIntents_ConfirmPayPalSetupData as ConfirmPayPalSetupData, setupIntents_ConfirmSepaDebitSetupData as ConfirmSepaDebitSetupData, setupIntents_ConfirmSofortSetupData as ConfirmSofortSetupData, setupIntents_ConfirmSofortSetupOptions as ConfirmSofortSetupOptions, setupIntents_ConfirmAuBecsDebitSetupData as ConfirmAuBecsDebitSetupData, setupIntents_ConfirmBacsDebitSetupData as ConfirmBacsDebitSetupData, setupIntents_ConfirmBancontactSetupData as ConfirmBancontactSetupData, setupIntents_ConfirmAcssDebitSetupData as ConfirmAcssDebitSetupData, setupIntents_ConfirmAcssDebitSetupOptions as ConfirmAcssDebitSetupOptions, setupIntents_VerifyMicrodepositsForSetupData as VerifyMicrodepositsForSetupData, setupIntents_ConfirmUsBankAccountSetupData as ConfirmUsBankAccountSetupData, setupIntents_CollectBankAccountForSetupOptions as CollectBankAccountForSetupOptions };
|
|
5165
|
-
}
|
|
5166
|
-
|
|
5167
5158
|
/**
|
|
5168
5159
|
* Parameters that will be passed on to the Stripe API to confirm payment for an Order's PaymentIntent.
|
|
5169
5160
|
*/
|
|
@@ -6859,7 +6850,7 @@ interface Stripe {
|
|
|
6859
6850
|
confirmCashappSetup(
|
|
6860
6851
|
clientSecret: string,
|
|
6861
6852
|
data?: ConfirmCashappSetupData,
|
|
6862
|
-
options?:
|
|
6853
|
+
options?: ConfirmCashappSetupOptions
|
|
6863
6854
|
): Promise<SetupIntentResult>;
|
|
6864
6855
|
|
|
6865
6856
|
/**
|
|
@@ -12381,9 +12372,6 @@ interface StripePaymentElementChangeEvent {
|
|
|
12381
12372
|
* Contact [Stripe support](https://support.stripe.com/) for more information.
|
|
12382
12373
|
*/
|
|
12383
12374
|
|
|
12384
|
-
/**
|
|
12385
|
-
* StripeCustomCheckoutInitOptions
|
|
12386
|
-
*/
|
|
12387
12375
|
interface StripeCustomCheckoutElementsOptions {
|
|
12388
12376
|
appearance?: Appearance;
|
|
12389
12377
|
loader?: 'auto' | 'always' | 'never';
|
|
@@ -12395,10 +12383,7 @@ interface StripeCustomCheckoutOptions {
|
|
|
12395
12383
|
elementsOptions?: StripeCustomCheckoutElementsOptions;
|
|
12396
12384
|
}
|
|
12397
12385
|
|
|
12398
|
-
|
|
12399
|
-
* StripeCustomCheckoutActions
|
|
12400
|
-
*/
|
|
12401
|
-
|
|
12386
|
+
/* Custom Checkout types */
|
|
12402
12387
|
type StripeCustomCheckoutAddress = {
|
|
12403
12388
|
country: string;
|
|
12404
12389
|
line1?: string | null;
|
|
@@ -12408,72 +12393,50 @@ type StripeCustomCheckoutAddress = {
|
|
|
12408
12393
|
state?: string | null;
|
|
12409
12394
|
};
|
|
12410
12395
|
|
|
12411
|
-
type
|
|
12412
|
-
|
|
12413
|
-
|
|
12396
|
+
type StripeCustomCheckoutAdjustableQuantity = {
|
|
12397
|
+
maximum: number;
|
|
12398
|
+
minimum: number;
|
|
12414
12399
|
};
|
|
12415
12400
|
|
|
12416
|
-
type
|
|
12417
|
-
|
|
|
12418
|
-
|
|
|
12401
|
+
type StripeCustomCheckoutBillingInterval =
|
|
12402
|
+
| 'day'
|
|
12403
|
+
| 'month'
|
|
12404
|
+
| 'week'
|
|
12405
|
+
| 'year';
|
|
12419
12406
|
|
|
12420
|
-
|
|
12421
|
-
|
|
12422
|
-
|
|
12423
|
-
|
|
12424
|
-
|
|
12425
|
-
|
|
12426
|
-
shippingAddress: StripeCustomCheckoutContact | null
|
|
12427
|
-
) => Promise<StripeCustomCheckoutResult>;
|
|
12428
|
-
updateBillingAddress: (
|
|
12429
|
-
billingAddress: StripeCustomCheckoutContact | null
|
|
12430
|
-
) => Promise<StripeCustomCheckoutResult>;
|
|
12431
|
-
updatePhoneNumber: (phoneNumber: string) => void;
|
|
12432
|
-
updateEmail: (email: string) => void;
|
|
12433
|
-
updateLineItemQuantity: (args: {
|
|
12434
|
-
lineItem: string;
|
|
12435
|
-
quantity: number;
|
|
12436
|
-
}) => Promise<StripeCustomCheckoutResult>;
|
|
12437
|
-
updateShippingOption: (
|
|
12438
|
-
shippingOption: string
|
|
12439
|
-
) => Promise<StripeCustomCheckoutResult>;
|
|
12440
|
-
confirm: (args?: {
|
|
12441
|
-
return_url?: string;
|
|
12442
|
-
}) => Promise<StripeCustomCheckoutResult>;
|
|
12443
|
-
}
|
|
12407
|
+
type StripeCustomCheckoutConfirmationRequirement =
|
|
12408
|
+
| 'phoneNumber'
|
|
12409
|
+
| 'shippingAddress'
|
|
12410
|
+
| 'billingAddress'
|
|
12411
|
+
| 'paymentDetails'
|
|
12412
|
+
| 'email';
|
|
12444
12413
|
|
|
12445
|
-
|
|
12446
|
-
|
|
12447
|
-
|
|
12414
|
+
type StripeCustomCheckoutContact = {
|
|
12415
|
+
name?: string | null;
|
|
12416
|
+
address: StripeCustomCheckoutAddress;
|
|
12417
|
+
};
|
|
12448
12418
|
|
|
12449
|
-
type
|
|
12450
|
-
|
|
12451
|
-
|
|
12452
|
-
displayName: string;
|
|
12419
|
+
type StripeCustomCheckoutDeliveryEstimate = {
|
|
12420
|
+
maximum: StripeCustomCheckoutEstimate | null;
|
|
12421
|
+
minimum: StripeCustomCheckoutEstimate | null;
|
|
12453
12422
|
};
|
|
12454
12423
|
|
|
12455
12424
|
type StripeCustomCheckoutDiscountAmount = {
|
|
12456
12425
|
amount: number;
|
|
12457
12426
|
displayName: string;
|
|
12458
12427
|
promotionCode: string | null;
|
|
12428
|
+
recurring:
|
|
12429
|
+
| {type: 'forever'}
|
|
12430
|
+
| {type: 'repeating'; durationInMonths: number}
|
|
12431
|
+
| null;
|
|
12459
12432
|
};
|
|
12460
12433
|
|
|
12461
|
-
type
|
|
12462
|
-
|
|
12463
|
-
|
|
12464
|
-
|
|
12465
|
-
|
|
12466
|
-
|
|
12467
|
-
id: string;
|
|
12468
|
-
amount: number;
|
|
12469
|
-
currency: string;
|
|
12470
|
-
displayName: string | null;
|
|
12471
|
-
deliveryEstimate: StripeCustomCheckoutDeliveryEstimate | null;
|
|
12472
|
-
};
|
|
12473
|
-
|
|
12474
|
-
type StripeCustomCheckoutDeliveryEstimate = {
|
|
12475
|
-
maximum: StripeCustomCheckoutEstimate | null;
|
|
12476
|
-
minimum: StripeCustomCheckoutEstimate | null;
|
|
12434
|
+
type StripeCustomCheckoutDueNext = {
|
|
12435
|
+
amountSubtotal: number;
|
|
12436
|
+
amountDiscount: number;
|
|
12437
|
+
amountTaxInclusive: number;
|
|
12438
|
+
amountTaxExclusive: number;
|
|
12439
|
+
billingCycleAnchor: number | null;
|
|
12477
12440
|
};
|
|
12478
12441
|
|
|
12479
12442
|
type StripeCustomCheckoutEstimate = {
|
|
@@ -12481,16 +12444,23 @@ type StripeCustomCheckoutEstimate = {
|
|
|
12481
12444
|
value: number;
|
|
12482
12445
|
};
|
|
12483
12446
|
|
|
12484
|
-
type
|
|
12485
|
-
|
|
12486
|
-
|
|
12487
|
-
|
|
12488
|
-
|
|
12447
|
+
type StripeCustomCheckoutLastPaymentError = {
|
|
12448
|
+
message: string;
|
|
12449
|
+
};
|
|
12450
|
+
|
|
12451
|
+
type StripeCustomCheckoutTaxAmount = {
|
|
12452
|
+
amount: number;
|
|
12453
|
+
inclusive: boolean;
|
|
12454
|
+
displayName: string;
|
|
12455
|
+
};
|
|
12489
12456
|
|
|
12490
12457
|
type StripeCustomCheckoutLineItem = {
|
|
12491
12458
|
id: string;
|
|
12492
12459
|
name: string;
|
|
12493
|
-
|
|
12460
|
+
amountDiscount: number;
|
|
12461
|
+
amountSubtotal: number;
|
|
12462
|
+
amountTaxExclusive: number;
|
|
12463
|
+
amountTaxInclusive: number;
|
|
12494
12464
|
unitAmount: number;
|
|
12495
12465
|
description: string | null;
|
|
12496
12466
|
quantity: number;
|
|
@@ -12498,45 +12468,87 @@ type StripeCustomCheckoutLineItem = {
|
|
|
12498
12468
|
taxAmounts: Array<StripeCustomCheckoutTaxAmount> | null;
|
|
12499
12469
|
recurring: {
|
|
12500
12470
|
interval: StripeCustomCheckoutBillingInterval;
|
|
12501
|
-
|
|
12471
|
+
intervalCount: number;
|
|
12472
|
+
isProrated: boolean;
|
|
12473
|
+
usageType: 'metered' | 'licensed';
|
|
12502
12474
|
} | null;
|
|
12475
|
+
adjustableQuantity: StripeCustomCheckoutAdjustableQuantity | null;
|
|
12476
|
+
};
|
|
12477
|
+
|
|
12478
|
+
type StripeCustomCheckoutRecurring = {
|
|
12479
|
+
interval: StripeCustomCheckoutBillingInterval;
|
|
12480
|
+
intervalCount: number;
|
|
12481
|
+
dueNext: StripeCustomCheckoutDueNext;
|
|
12482
|
+
trial: StripeCustomCheckoutTrial | null;
|
|
12483
|
+
};
|
|
12484
|
+
|
|
12485
|
+
type StripeCustomCheckoutShipping = {
|
|
12486
|
+
shippingOption: StripeCustomCheckoutShippingOption;
|
|
12487
|
+
taxAmounts: Array<StripeCustomCheckoutTaxAmount> | null;
|
|
12503
12488
|
};
|
|
12504
12489
|
|
|
12490
|
+
type StripeCustomCheckoutShippingOption = {
|
|
12491
|
+
id: string;
|
|
12492
|
+
amount: number;
|
|
12493
|
+
currency: string;
|
|
12494
|
+
displayName: string | null;
|
|
12495
|
+
deliveryEstimate: StripeCustomCheckoutDeliveryEstimate | null;
|
|
12496
|
+
};
|
|
12497
|
+
|
|
12498
|
+
type StripeCustomCheckoutStatus =
|
|
12499
|
+
| {type: 'open'}
|
|
12500
|
+
| {type: 'expired'}
|
|
12501
|
+
| {
|
|
12502
|
+
type: 'complete';
|
|
12503
|
+
paymentStatus: 'paid' | 'unpaid' | 'no_payment_required';
|
|
12504
|
+
};
|
|
12505
|
+
|
|
12506
|
+
type StripeCustomCheckoutTaxStatus =
|
|
12507
|
+
| {status: 'ready'}
|
|
12508
|
+
| {status: 'requires_shipping_address'}
|
|
12509
|
+
| {status: 'requires_billing_address'};
|
|
12510
|
+
|
|
12505
12511
|
type StripeCustomCheckoutTotalSummary = {
|
|
12512
|
+
appliedBalance: number;
|
|
12513
|
+
balanceAppliedToNextInvoice: boolean;
|
|
12514
|
+
discount: number;
|
|
12515
|
+
shippingRate: number;
|
|
12506
12516
|
subtotal: number;
|
|
12507
12517
|
taxExclusive: number;
|
|
12508
12518
|
taxInclusive: number;
|
|
12509
|
-
shippingRate: number;
|
|
12510
|
-
discount: number;
|
|
12511
12519
|
total: number;
|
|
12512
12520
|
};
|
|
12513
12521
|
|
|
12514
|
-
type
|
|
12515
|
-
|
|
12516
|
-
|
|
12517
|
-
|
|
12518
|
-
| 'paymentDetails'
|
|
12519
|
-
| 'email';
|
|
12522
|
+
type StripeCustomCheckoutTrial = {
|
|
12523
|
+
trialEnd: number;
|
|
12524
|
+
trialPeriodDays: number;
|
|
12525
|
+
};
|
|
12520
12526
|
|
|
12527
|
+
/* Custom Checkout session */
|
|
12521
12528
|
interface StripeCustomCheckoutSession {
|
|
12522
|
-
|
|
12523
|
-
|
|
12524
|
-
|
|
12529
|
+
billingAddress: StripeCustomCheckoutContact | null;
|
|
12530
|
+
canConfirm: boolean;
|
|
12531
|
+
confirmationRequirements: StripeCustomCheckoutConfirmationRequirement[];
|
|
12525
12532
|
currency: string;
|
|
12533
|
+
discountAmounts: Array<StripeCustomCheckoutDiscountAmount> | null;
|
|
12534
|
+
email: string | null;
|
|
12535
|
+
lastPaymentError: StripeCustomCheckoutLastPaymentError | null;
|
|
12536
|
+
lineItems: Array<StripeCustomCheckoutLineItem>;
|
|
12537
|
+
phoneNumber: string | null;
|
|
12538
|
+
recurring: StripeCustomCheckoutRecurring | null;
|
|
12526
12539
|
shipping: StripeCustomCheckoutShipping | null;
|
|
12527
|
-
shippingOptions: Array<StripeCustomCheckoutShippingOption>;
|
|
12528
12540
|
shippingAddress: StripeCustomCheckoutContact | null;
|
|
12529
|
-
|
|
12530
|
-
|
|
12531
|
-
|
|
12541
|
+
shippingOptions: Array<StripeCustomCheckoutShippingOption>;
|
|
12542
|
+
status: StripeCustomCheckoutStatus;
|
|
12543
|
+
tax: StripeCustomCheckoutTaxStatus;
|
|
12544
|
+
taxAmounts: Array<StripeCustomCheckoutTaxAmount> | null;
|
|
12532
12545
|
total: StripeCustomCheckoutTotalSummary;
|
|
12533
|
-
confirmationRequirements: StripeCustomCheckoutConfirmationRequirement[];
|
|
12534
|
-
canConfirm: boolean;
|
|
12535
12546
|
}
|
|
12536
12547
|
|
|
12537
|
-
|
|
12538
|
-
|
|
12539
|
-
|
|
12548
|
+
type StripeCustomCheckoutResult =
|
|
12549
|
+
| {session: StripeCustomCheckoutSession; error?: undefined}
|
|
12550
|
+
| {session?: undefined; error: StripeError};
|
|
12551
|
+
|
|
12540
12552
|
type StripeCustomCheckoutPaymentElementOptions = {
|
|
12541
12553
|
layout?: Layout | LayoutObject;
|
|
12542
12554
|
paymentMethodOrder?: Array<string>;
|
|
@@ -12552,13 +12564,177 @@ type StripeCustomCheckoutAddressElementOptions = {
|
|
|
12552
12564
|
};
|
|
12553
12565
|
};
|
|
12554
12566
|
|
|
12555
|
-
|
|
12567
|
+
type StripeCustomCheckoutExpressCheckoutElementOptions = {
|
|
12568
|
+
buttonHeight: StripeExpressCheckoutElementOptions['buttonHeight'];
|
|
12569
|
+
buttonTheme: StripeExpressCheckoutElementOptions['buttonTheme'];
|
|
12570
|
+
buttonType: StripeExpressCheckoutElementOptions['buttonType'];
|
|
12571
|
+
layout: StripeExpressCheckoutElementOptions['layout'];
|
|
12572
|
+
};
|
|
12573
|
+
|
|
12574
|
+
type StripeCustomCheckoutUpdateHandler = (
|
|
12575
|
+
session: StripeCustomCheckoutSession
|
|
12576
|
+
) => void;
|
|
12577
|
+
|
|
12578
|
+
type StripeCustomCheckoutExpressCheckoutElementConfirmEvent = StripeExpressCheckoutElementConfirmEvent & {
|
|
12579
|
+
confirm: () => Promise<StripeCustomCheckoutResult>;
|
|
12580
|
+
};
|
|
12581
|
+
|
|
12582
|
+
type StripeCustomCheckoutExpressCheckoutElement = StripeElementBase & {
|
|
12583
|
+
/**
|
|
12584
|
+
* Triggered when the element is fully rendered.
|
|
12585
|
+
*/
|
|
12586
|
+
on(
|
|
12587
|
+
eventType: 'ready',
|
|
12588
|
+
handler: (event: StripeExpressCheckoutElementReadyEvent) => any
|
|
12589
|
+
): StripeCustomCheckoutExpressCheckoutElement;
|
|
12590
|
+
once(
|
|
12591
|
+
eventType: 'ready',
|
|
12592
|
+
handler: (event: StripeExpressCheckoutElementReadyEvent) => any
|
|
12593
|
+
): StripeCustomCheckoutExpressCheckoutElement;
|
|
12594
|
+
off(
|
|
12595
|
+
eventType: 'ready',
|
|
12596
|
+
handler?: (event: StripeExpressCheckoutElementReadyEvent) => any
|
|
12597
|
+
): StripeCustomCheckoutExpressCheckoutElement;
|
|
12598
|
+
|
|
12599
|
+
/**
|
|
12600
|
+
* Triggered when the element gains focus.
|
|
12601
|
+
*/
|
|
12602
|
+
on(
|
|
12603
|
+
eventType: 'focus',
|
|
12604
|
+
handler: (event: {elementType: 'expressCheckout'}) => any
|
|
12605
|
+
): StripeCustomCheckoutExpressCheckoutElement;
|
|
12606
|
+
once(
|
|
12607
|
+
eventType: 'focus',
|
|
12608
|
+
handler: (event: {elementType: 'expressCheckout'}) => any
|
|
12609
|
+
): StripeCustomCheckoutExpressCheckoutElement;
|
|
12610
|
+
off(
|
|
12611
|
+
eventType: 'focus',
|
|
12612
|
+
handler?: (event: {elementType: 'expressCheckout'}) => any
|
|
12613
|
+
): StripeCustomCheckoutExpressCheckoutElement;
|
|
12614
|
+
|
|
12615
|
+
/**
|
|
12616
|
+
* Triggered when the element loses focus.
|
|
12617
|
+
*/
|
|
12618
|
+
on(
|
|
12619
|
+
eventType: 'blur',
|
|
12620
|
+
handler: (event: {elementType: 'expressCheckout'}) => any
|
|
12621
|
+
): StripeCustomCheckoutExpressCheckoutElement;
|
|
12622
|
+
once(
|
|
12623
|
+
eventType: 'blur',
|
|
12624
|
+
handler: (event: {elementType: 'expressCheckout'}) => any
|
|
12625
|
+
): StripeCustomCheckoutExpressCheckoutElement;
|
|
12626
|
+
off(
|
|
12627
|
+
eventType: 'blur',
|
|
12628
|
+
handler?: (event: {elementType: 'expressCheckout'}) => any
|
|
12629
|
+
): StripeCustomCheckoutExpressCheckoutElement;
|
|
12630
|
+
|
|
12631
|
+
/**
|
|
12632
|
+
* Triggered when the escape key is pressed within the element.
|
|
12633
|
+
*/
|
|
12634
|
+
on(
|
|
12635
|
+
eventType: 'escape',
|
|
12636
|
+
handler: (event: {elementType: 'expressCheckout'}) => any
|
|
12637
|
+
): StripeCustomCheckoutExpressCheckoutElement;
|
|
12638
|
+
once(
|
|
12639
|
+
eventType: 'escape',
|
|
12640
|
+
handler: (event: {elementType: 'expressCheckout'}) => any
|
|
12641
|
+
): StripeCustomCheckoutExpressCheckoutElement;
|
|
12642
|
+
off(
|
|
12643
|
+
eventType: 'escape',
|
|
12644
|
+
handler?: (event: {elementType: 'expressCheckout'}) => any
|
|
12645
|
+
): StripeCustomCheckoutExpressCheckoutElement;
|
|
12646
|
+
|
|
12647
|
+
/**
|
|
12648
|
+
* Triggered when the element fails to load.
|
|
12649
|
+
*/
|
|
12650
|
+
on(
|
|
12651
|
+
eventType: 'loaderror',
|
|
12652
|
+
handler: (event: {
|
|
12653
|
+
elementType: 'expressCheckout';
|
|
12654
|
+
error: StripeError;
|
|
12655
|
+
}) => any
|
|
12656
|
+
): StripeCustomCheckoutExpressCheckoutElement;
|
|
12657
|
+
once(
|
|
12658
|
+
eventType: 'loaderror',
|
|
12659
|
+
handler: (event: {
|
|
12660
|
+
elementType: 'expressCheckout';
|
|
12661
|
+
error: StripeError;
|
|
12662
|
+
}) => any
|
|
12663
|
+
): StripeCustomCheckoutExpressCheckoutElement;
|
|
12664
|
+
off(
|
|
12665
|
+
eventType: 'loaderror',
|
|
12666
|
+
handler?: (event: {
|
|
12667
|
+
elementType: 'expressCheckout';
|
|
12668
|
+
error: StripeError;
|
|
12669
|
+
}) => any
|
|
12670
|
+
): StripeCustomCheckoutExpressCheckoutElement;
|
|
12671
|
+
|
|
12672
|
+
/**
|
|
12673
|
+
* Triggered when a buyer authorizes a payment within a supported payment method.
|
|
12674
|
+
*/
|
|
12675
|
+
on(
|
|
12676
|
+
eventType: 'confirm',
|
|
12677
|
+
handler: (
|
|
12678
|
+
event: StripeCustomCheckoutExpressCheckoutElementConfirmEvent
|
|
12679
|
+
) => any
|
|
12680
|
+
): StripeCustomCheckoutExpressCheckoutElement;
|
|
12681
|
+
once(
|
|
12682
|
+
eventType: 'confirm',
|
|
12683
|
+
handler: (
|
|
12684
|
+
event: StripeCustomCheckoutExpressCheckoutElementConfirmEvent
|
|
12685
|
+
) => any
|
|
12686
|
+
): StripeCustomCheckoutExpressCheckoutElement;
|
|
12687
|
+
off(
|
|
12688
|
+
eventType: 'confirm',
|
|
12689
|
+
handler?: (
|
|
12690
|
+
event: StripeCustomCheckoutExpressCheckoutElementConfirmEvent
|
|
12691
|
+
) => any
|
|
12692
|
+
): StripeCustomCheckoutExpressCheckoutElement;
|
|
12693
|
+
|
|
12694
|
+
/**
|
|
12695
|
+
* Updates the options the `ExpressCheckoutElement` was initialized with.
|
|
12696
|
+
* Updates are merged into the existing configuration.
|
|
12697
|
+
*/
|
|
12698
|
+
update: StripeExpressCheckoutElement['update'];
|
|
12699
|
+
};
|
|
12700
|
+
|
|
12701
|
+
interface StripeCustomCheckout {
|
|
12702
|
+
/* Custom Checkout methods */
|
|
12703
|
+
applyPromotionCode: (
|
|
12704
|
+
promotionCode: string
|
|
12705
|
+
) => Promise<StripeCustomCheckoutResult>;
|
|
12706
|
+
removePromotionCode: () => Promise<StripeCustomCheckoutResult>;
|
|
12707
|
+
updateShippingAddress: (
|
|
12708
|
+
shippingAddress: StripeCustomCheckoutContact | null
|
|
12709
|
+
) => Promise<StripeCustomCheckoutResult>;
|
|
12710
|
+
updateBillingAddress: (
|
|
12711
|
+
billingAddress: StripeCustomCheckoutContact | null
|
|
12712
|
+
) => Promise<StripeCustomCheckoutResult>;
|
|
12713
|
+
updatePhoneNumber: (phoneNumber: string) => void;
|
|
12714
|
+
updateEmail: (email: string) => void;
|
|
12715
|
+
updateLineItemQuantity: (args: {
|
|
12716
|
+
lineItem: string;
|
|
12717
|
+
quantity: number;
|
|
12718
|
+
}) => Promise<StripeCustomCheckoutResult>;
|
|
12719
|
+
updateShippingOption: (
|
|
12720
|
+
shippingOption: string
|
|
12721
|
+
) => Promise<StripeCustomCheckoutResult>;
|
|
12722
|
+
confirm: (args?: {
|
|
12723
|
+
return_url?: string;
|
|
12724
|
+
}) => Promise<StripeCustomCheckoutResult>;
|
|
12725
|
+
session: () => StripeCustomCheckoutSession;
|
|
12726
|
+
on: (event: 'change', handler: StripeCustomCheckoutUpdateHandler) => void;
|
|
12727
|
+
|
|
12728
|
+
/* Elements methods */
|
|
12556
12729
|
changeAppearance: (appearance: Appearance) => void;
|
|
12557
12730
|
getElement(elementType: 'payment'): StripePaymentElement | null;
|
|
12558
12731
|
getElement(
|
|
12559
12732
|
elementType: 'address',
|
|
12560
12733
|
mode: AddressMode
|
|
12561
12734
|
): StripeAddressElement | null;
|
|
12735
|
+
getElement(
|
|
12736
|
+
elementType: 'expressCheckout'
|
|
12737
|
+
): StripeCustomCheckoutExpressCheckoutElement | null;
|
|
12562
12738
|
createElement(
|
|
12563
12739
|
elementType: 'payment',
|
|
12564
12740
|
options?: StripeCustomCheckoutPaymentElementOptions
|
|
@@ -12567,20 +12743,10 @@ interface StripeCustomCheckoutElementsActions {
|
|
|
12567
12743
|
elementType: 'address',
|
|
12568
12744
|
options: StripeCustomCheckoutAddressElementOptions
|
|
12569
12745
|
): StripeAddressElement;
|
|
12570
|
-
|
|
12571
|
-
|
|
12572
|
-
|
|
12573
|
-
|
|
12574
|
-
*/
|
|
12575
|
-
type StripeCustomCheckoutUpdateHandler = (
|
|
12576
|
-
session: StripeCustomCheckoutSession
|
|
12577
|
-
) => void;
|
|
12578
|
-
|
|
12579
|
-
interface StripeCustomCheckout
|
|
12580
|
-
extends StripeCustomCheckoutActions,
|
|
12581
|
-
StripeCustomCheckoutElementsActions {
|
|
12582
|
-
session: () => StripeCustomCheckoutSession;
|
|
12583
|
-
on: (event: 'change', handler: StripeCustomCheckoutUpdateHandler) => void;
|
|
12746
|
+
createElement(
|
|
12747
|
+
elementType: 'expressCheckout',
|
|
12748
|
+
options: StripeCustomCheckoutExpressCheckoutElementOptions
|
|
12749
|
+
): StripeCustomCheckoutExpressCheckoutElement;
|
|
12584
12750
|
}
|
|
12585
12751
|
|
|
12586
12752
|
declare const loadStripe: (
|