@stripe/stripe-react-native 0.65.1 → 0.67.0

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.
Files changed (107) hide show
  1. package/android/detekt/detekt-baseline.xml +0 -10
  2. package/android/gradle.properties +1 -1
  3. package/android/src/main/java/com/reactnativestripesdk/CardFieldView.kt +51 -57
  4. package/android/src/main/java/com/reactnativestripesdk/CurrencySelectorElementEvent.kt +26 -0
  5. package/android/src/main/java/com/reactnativestripesdk/CurrencySelectorElementView.kt +129 -16
  6. package/android/src/main/java/com/reactnativestripesdk/CurrencySelectorElementViewManager.kt +17 -0
  7. package/android/src/main/java/com/reactnativestripesdk/EventEmitterCompat.kt +4 -0
  8. package/android/src/main/java/com/reactnativestripesdk/PaymentSheetManager.kt +8 -19
  9. package/android/src/main/java/com/reactnativestripesdk/StripeAbstractComposeView.kt +1 -0
  10. package/android/src/main/java/com/reactnativestripesdk/StripeSdkModule.kt +89 -31
  11. package/android/src/main/java/com/reactnativestripesdk/StripeSdkPackage.kt +1 -0
  12. package/android/src/main/java/com/reactnativestripesdk/customersheet/CustomerSheetManager.kt +2 -16
  13. package/android/src/main/java/com/reactnativestripesdk/utils/CheckoutMappers.kt +59 -33
  14. package/android/src/main/java/com/reactnativestripesdk/utils/DefaultActivityLifecycleCallbacks.kt +41 -0
  15. package/android/src/main/java/com/reactnativestripesdk/utils/Errors.kt +11 -6
  16. package/android/src/oldarch/java/com/reactnativestripesdk/NativeOnrampSdkModuleSpec.java +17 -3
  17. package/android/src/oldarch/java/com/reactnativestripesdk/NativeStripeSdkModuleSpec.java +2 -2
  18. package/android/src/onramp/java/com/reactnativestripesdk/OnrampErrors.kt +145 -0
  19. package/android/src/onramp/java/com/reactnativestripesdk/OnrampMappers.kt +125 -0
  20. package/android/src/onramp/java/com/reactnativestripesdk/OnrampSdkModule.kt +144 -22
  21. package/android/src/test/java/com/reactnativestripesdk/DrawableLoadingTest.kt +6 -2
  22. package/android/src/test/java/com/reactnativestripesdk/OnrampErrorsTest.kt +168 -0
  23. package/android/src/test/java/com/reactnativestripesdk/mappers/OnrampMappersTest.kt +107 -0
  24. package/android/src/test/java/com/reactnativestripesdk/utils/CheckoutMappersTest.kt +39 -30
  25. package/android/src/test/java/com/reactnativestripesdk/utils/CheckoutTestFixtures.java +8 -0
  26. package/ios/CurrencySelectorElementManager.m +7 -0
  27. package/ios/CurrencySelectorElementView.swift +142 -7
  28. package/ios/EmbeddedPaymentElementView.swift +1 -1
  29. package/ios/Mappers+Checkout.swift +251 -107
  30. package/ios/Mappers.swift +97 -7
  31. package/ios/NewArch/StripeCurrencySelectorElementComponentView.mm +14 -0
  32. package/ios/OldArch/StripeSdkEventEmitterCompat.h +1 -0
  33. package/ios/OldArch/StripeSdkEventEmitterCompat.m +6 -0
  34. package/ios/OnrampErrors.swift +132 -0
  35. package/ios/PaymentOptionDisplayData+ReactNative.swift +1 -1
  36. package/ios/PaymentSheetAppearance.swift +1 -1
  37. package/ios/StripeOnrampSdk.mm +19 -0
  38. package/ios/StripeSdk.mm +14 -14
  39. package/ios/StripeSdkEmitter.swift +1 -0
  40. package/ios/StripeSdkImpl+Checkout.swift +66 -31
  41. package/ios/StripeSdkImpl+CustomerSheet.swift +1 -1
  42. package/ios/StripeSdkImpl+Embedded.swift +1 -1
  43. package/ios/StripeSdkImpl+PaymentSheet.swift +1 -1
  44. package/ios/StripeSdkImpl.swift +116 -24
  45. package/lib/commonjs/components/PaymentMethodMessagingElement.js +1 -1
  46. package/lib/commonjs/components/PaymentMethodMessagingElement.js.map +1 -1
  47. package/lib/commonjs/components/StripeProvider.js +1 -1
  48. package/lib/commonjs/components/StripeProvider.js.map +1 -1
  49. package/lib/commonjs/hooks/useCheckout.js +1 -1
  50. package/lib/commonjs/hooks/useCheckout.js.map +1 -1
  51. package/lib/commonjs/hooks/useOnramp.js +1 -1
  52. package/lib/commonjs/hooks/useOnramp.js.map +1 -1
  53. package/lib/commonjs/internal/stripeConfig.js +2 -0
  54. package/lib/commonjs/internal/stripeConfig.js.map +1 -0
  55. package/lib/commonjs/specs/NativeOnrampSdkModule.js.map +1 -1
  56. package/lib/commonjs/specs/NativeStripeSdkModule.js.map +1 -1
  57. package/lib/commonjs/types/Errors.js +1 -1
  58. package/lib/commonjs/types/Errors.js.map +1 -1
  59. package/lib/commonjs/types/Onramp.js +1 -1
  60. package/lib/commonjs/types/Onramp.js.map +1 -1
  61. package/lib/module/components/PaymentMethodMessagingElement.js +1 -1
  62. package/lib/module/components/PaymentMethodMessagingElement.js.map +1 -1
  63. package/lib/module/components/StripeProvider.js +1 -1
  64. package/lib/module/components/StripeProvider.js.map +1 -1
  65. package/lib/module/hooks/useCheckout.js +1 -1
  66. package/lib/module/hooks/useCheckout.js.map +1 -1
  67. package/lib/module/hooks/useOnramp.js +1 -1
  68. package/lib/module/hooks/useOnramp.js.map +1 -1
  69. package/lib/module/internal/stripeConfig.js +2 -0
  70. package/lib/module/internal/stripeConfig.js.map +1 -0
  71. package/lib/module/specs/NativeOnrampSdkModule.js.map +1 -1
  72. package/lib/module/specs/NativeStripeSdkModule.js.map +1 -1
  73. package/lib/module/types/Errors.js +1 -1
  74. package/lib/module/types/Errors.js.map +1 -1
  75. package/lib/module/types/Onramp.js +1 -1
  76. package/lib/module/types/Onramp.js.map +1 -1
  77. package/lib/typescript/src/components/PaymentMethodMessagingElement.d.ts +1 -1
  78. package/lib/typescript/src/components/PaymentMethodMessagingElement.d.ts.map +1 -1
  79. package/lib/typescript/src/components/StripeProvider.d.ts.map +1 -1
  80. package/lib/typescript/src/hooks/useCheckout.d.ts.map +1 -1
  81. package/lib/typescript/src/hooks/useOnramp.d.ts +32 -10
  82. package/lib/typescript/src/hooks/useOnramp.d.ts.map +1 -1
  83. package/lib/typescript/src/internal/stripeConfig.d.ts +3 -0
  84. package/lib/typescript/src/internal/stripeConfig.d.ts.map +1 -0
  85. package/lib/typescript/src/specs/NativeOnrampSdkModule.d.ts +3 -0
  86. package/lib/typescript/src/specs/NativeOnrampSdkModule.d.ts.map +1 -1
  87. package/lib/typescript/src/specs/NativeStripeSdkModule.d.ts +2 -2
  88. package/lib/typescript/src/specs/NativeStripeSdkModule.d.ts.map +1 -1
  89. package/lib/typescript/src/types/Checkout.d.ts +266 -92
  90. package/lib/typescript/src/types/Checkout.d.ts.map +1 -1
  91. package/lib/typescript/src/types/Errors.d.ts +0 -5
  92. package/lib/typescript/src/types/Errors.d.ts.map +1 -1
  93. package/lib/typescript/src/types/Onramp.d.ts +168 -9
  94. package/lib/typescript/src/types/Onramp.d.ts.map +1 -1
  95. package/package.json +3 -2
  96. package/src/components/PaymentMethodMessagingElement.tsx +54 -52
  97. package/src/components/StripeProvider.tsx +2 -0
  98. package/src/hooks/useCheckout.tsx +20 -13
  99. package/src/hooks/useOnramp.tsx +139 -12
  100. package/src/internal/stripeConfig.ts +9 -0
  101. package/src/specs/NativeOnrampSdkModule.ts +5 -0
  102. package/src/specs/NativeStripeSdkModule.ts +6 -5
  103. package/src/types/Checkout.ts +289 -93
  104. package/src/types/Errors.ts +0 -6
  105. package/src/types/Onramp.ts +192 -9
  106. package/stripe-react-native.podspec +3 -3
  107. package/ios/CurrencySelectorElementManager.swift +0 -12
@@ -62,16 +62,78 @@ export declare namespace Checkout {
62
62
  /** The latest checkout session value from Stripe. */
63
63
  session: Session;
64
64
  };
65
+ /**
66
+ * A Stripe Checkout Session.
67
+ * @checkoutSessionsPreview
68
+ * @internal
69
+ */
70
+ interface Session {
71
+ /** Unique identifier for this checkout session. */
72
+ id: string;
73
+ /** The business name as configured in your Stripe account. */
74
+ businessName?: string;
75
+ /** Three-letter ISO 4217 currency code in lowercase (e.g. `"usd"`). */
76
+ currency?: string;
77
+ /** Currency options available when adaptive pricing is active. */
78
+ currencyOptions: CurrencyOption[];
79
+ /** The aggregate amounts calculated per discount for all line items. */
80
+ discountAmounts: DiscountAmount[];
81
+ /** The customer's email address, if available. */
82
+ email?: string;
83
+ /** The line items the customer is purchasing. */
84
+ lineItems: LineItem[];
85
+ /** Indicates whether this session was created in live mode. */
86
+ livemode: boolean;
87
+ /** The factor used to convert between minor and major currency units. */
88
+ minorUnitsAmountDivisor?: number;
89
+ /** The selected shipping option, if any. */
90
+ shipping?: SelectedShipping;
91
+ /** The shipping address set via `updateShippingAddress`, if any. */
92
+ shippingAddress?: ContactAddress;
93
+ /** The shipping rate options available for this session. */
94
+ shippingOptions: ShippingOption[];
95
+ /** The current session status, if available. */
96
+ status?: Status;
97
+ /** Tax computation status and aggregated tax amounts. */
98
+ tax: Tax;
99
+ /** Tax and discount details for the computed total amount. */
100
+ total?: Total;
101
+ /** The billing address set via `updateBillingAddress`, if any. */
102
+ billingAddress?: ContactAddress;
103
+ }
104
+ /**
105
+ * The mode of a checkout session.
106
+ *
107
+ * - `unknown` - A mode not recognized by this version of the SDK.
108
+ * - `payment` - Accept one-time payments.
109
+ * - `setup` - Save payment details to charge later.
110
+ * - `subscription` - Set up fixed-price subscriptions.
111
+ * @checkoutSessionsPreview
112
+ * @internal
113
+ */
114
+ type Mode = 'unknown' | 'payment' | 'setup' | 'subscription';
65
115
  /**
66
116
  * The status of a checkout session.
117
+ * @checkoutSessionsPreview
118
+ * @internal
119
+ */
120
+ interface Status {
121
+ /** The lifecycle status of the session. */
122
+ type: StatusType;
123
+ /** The payment status. Only meaningful when type is `complete`. */
124
+ paymentStatus?: PaymentStatus;
125
+ }
126
+ /**
127
+ * The lifecycle status of a checkout session.
67
128
  *
68
129
  * - `unknown` - A status not recognized by this version of the SDK.
69
130
  * - `open` - The checkout session is still in progress.
70
131
  * - `complete` - The checkout session is complete.
71
132
  * - `expired` - The checkout session has expired.
133
+ * @checkoutSessionsPreview
72
134
  * @internal
73
135
  */
74
- type Status = 'unknown' | 'open' | 'complete' | 'expired';
136
+ type StatusType = 'unknown' | 'open' | 'complete' | 'expired';
75
137
  /**
76
138
  * The payment status of a checkout session.
77
139
  *
@@ -79,63 +141,97 @@ export declare namespace Checkout {
79
141
  * - `paid` - The payment funds are available in your account.
80
142
  * - `unpaid` - The payment funds are not yet available in your account.
81
143
  * - `noPaymentRequired` - No payment is currently required for the session.
144
+ * @checkoutSessionsPreview
82
145
  * @internal
83
146
  */
84
147
  type PaymentStatus = 'unknown' | 'paid' | 'unpaid' | 'noPaymentRequired';
85
148
  /**
86
- * A read-only snapshot of a Stripe Checkout Session.
149
+ * A monetary amount with both a localized display string and a value in
150
+ * the smallest currency unit (e.g. cents).
151
+ * @checkoutSessionsPreview
87
152
  * @internal
88
153
  */
89
- interface Session {
90
- /** Unique identifier for this checkout session. */
91
- id: string;
92
- /** The current session state, if available. */
93
- status?: Status;
94
- /** The payment status for this checkout session. */
95
- paymentStatus: PaymentStatus;
96
- /** Three-letter ISO 4217 currency code in lowercase (e.g. `"usd"`). */
97
- currency?: string;
98
- /** Indicates whether this session was created in live mode. */
99
- livemode: boolean;
100
- /** A summary of monetary totals for this session, if available. */
101
- totals?: Totals;
102
- /** The line items purchased by the customer. */
103
- lineItems: LineItem[];
104
- /** The shipping rate options available for this session. */
105
- shippingOptions: ShippingOption[];
106
- /** The discounts applied to this session. */
107
- discounts: Discount[];
108
- /** The Stripe customer ID attached to this session, if any. */
109
- customerId?: string;
110
- /** The customer's email address, if available. */
111
- customerEmail?: string;
112
- /** The billing address set via `updateBillingAddress`, if any. */
113
- billingAddress?: AddressUpdate;
114
- /** The shipping address set via `updateShippingAddress`, if any. */
115
- shippingAddress?: AddressUpdate;
154
+ interface Amount {
155
+ /** Localized, formatted string including currency symbol (e.g. `"$10.00"`). */
156
+ amount: string;
157
+ /** Value in the smallest currency unit (e.g. cents for USD). */
158
+ minorUnitsAmount: number;
159
+ }
160
+ /**
161
+ * A monetary amount supporting sub-minor-unit precision.
162
+ *
163
+ * Use this for sub-cent pricing (e.g. usage-based billing) where rounding
164
+ * to the nearest minor unit would lose precision.
165
+ * @checkoutSessionsPreview
166
+ * @internal
167
+ */
168
+ interface DecimalAmount {
169
+ /** Localized, formatted string including currency symbol. */
170
+ amount: string;
171
+ /** Value in the smallest currency unit, with decimal precision. */
172
+ minorUnitsAmount: number;
173
+ }
174
+ /**
175
+ * Tax and discount details for the computed total amount of a checkout session.
176
+ * @checkoutSessionsPreview
177
+ * @internal
178
+ */
179
+ interface Total {
180
+ /** Total of all line items, excluding tax, discounts, and shipping. */
181
+ subtotal: Amount;
182
+ /** Sum of all exclusive tax amounts. */
183
+ taxExclusive: Amount;
184
+ /** Sum of all inclusive tax amounts. */
185
+ taxInclusive: Amount;
186
+ /** Sum of all shipping amounts. */
187
+ shippingRate: Amount;
188
+ /** Sum of all discounts. A positive number reduces the amount to be paid. */
189
+ discount: Amount;
190
+ /** Grand total, including discounts and tax. */
191
+ total: Amount;
192
+ /** Amount of customer credit balance applied to the payment. */
193
+ appliedBalance: Amount;
194
+ /** When `true`, no payment is collected and the amount is added to the next invoice. */
195
+ balanceAppliedToNextInvoice: boolean;
196
+ }
197
+ /**
198
+ * Tax computation status and aggregated tax amounts for a checkout session.
199
+ * @checkoutSessionsPreview
200
+ * @internal
201
+ */
202
+ interface Tax {
203
+ /** The current tax computation status. */
204
+ status: TaxStatus;
205
+ /** Per-tax-rate amounts, or undefined if tax has not been computed. */
206
+ taxAmounts?: TaxAmount[];
116
207
  }
117
208
  /**
118
- * Monetary totals for a checkout session.
209
+ * The tax computation status of a checkout session.
119
210
  *
120
- * All amounts are in the smallest currency unit (e.g. cents for USD).
121
- * @internal
122
- */
123
- interface Totals {
124
- /** The subtotal amount before discounts, shipping, and tax. */
125
- subtotal: number;
126
- /** The final total after discounts, shipping, and tax. */
127
- total: number;
128
- /** The amount currently due from the customer. */
129
- due: number;
130
- /** The total discount amount applied to the session. */
131
- discount: number;
132
- /** The total shipping amount. */
133
- shipping: number;
134
- /** The total tax amount applied to the session. */
135
- tax: number;
211
+ * - `unknown` - A status not recognized by this version of the SDK.
212
+ * - `ready` - Tax is computed and the session is ready for confirmation.
213
+ * - `requiresShippingAddress` - A shipping address is needed to calculate tax.
214
+ * - `requiresBillingAddress` - A billing address is needed to calculate tax.
215
+ * @checkoutSessionsPreview
216
+ * @internal
217
+ */
218
+ type TaxStatus = 'unknown' | 'ready' | 'requiresShippingAddress' | 'requiresBillingAddress';
219
+ /**
220
+ * A tax amount calculated for a line item, shipping option, or aggregate session total.
221
+ * @checkoutSessionsPreview
222
+ * @internal
223
+ */
224
+ interface TaxAmount {
225
+ /** The tax amount. */
226
+ amount: Amount;
227
+ /** Whether this tax is inclusive (already in subtotal) or exclusive (added on top). */
228
+ inclusive: boolean;
229
+ /** A user-facing description (e.g. `"Sales Tax"` or `"VAT 20%"`). */
230
+ displayName: string;
136
231
  }
137
232
  /**
138
233
  * A line item in a checkout session.
234
+ * @checkoutSessionsPreview
139
235
  * @internal
140
236
  */
141
237
  interface LineItem {
@@ -143,73 +239,155 @@ export declare namespace Checkout {
143
239
  id: string;
144
240
  /** The display name shown for this line item. */
145
241
  name: string;
146
- /** The quantity for this line item. */
242
+ /** An optional, merchant-supplied description. */
243
+ description?: string;
244
+ /** Image URLs configured on the underlying product. */
245
+ images: string[];
246
+ /** The quantity of items being purchased. */
147
247
  quantity: number;
148
- /** The per-unit price in the smallest currency unit. */
149
- unitAmount: number;
150
- /** Three-letter ISO 4217 currency code in lowercase. */
151
- currency: string;
248
+ /** The cost of a single unit. */
249
+ unitAmount?: Amount;
250
+ /** The unit amount with sub-cent precision. */
251
+ unitAmountDecimal?: DecimalAmount;
252
+ /** Total before any discounts or exclusive taxes. */
253
+ subtotal?: Amount;
254
+ /** Total discount amount for this line item. */
255
+ discount?: Amount;
256
+ /** Total exclusive tax for this line item. */
257
+ taxExclusive?: Amount;
258
+ /** Total inclusive tax for this line item. */
259
+ taxInclusive?: Amount;
260
+ /** Final total for this line item, including discounts and tax. */
261
+ total?: Amount;
262
+ /** Per-discount breakdown for this line item. */
263
+ discountAmounts: DiscountAmount[];
264
+ /** Per-tax-rate breakdown for this line item. */
265
+ taxAmounts: TaxAmount[];
266
+ /** Configuration for adjustable quantity, if enabled. */
267
+ adjustableQuantity?: AdjustableQuantity;
268
+ }
269
+ /**
270
+ * Configuration for a customer-adjustable line item quantity.
271
+ * @checkoutSessionsPreview
272
+ * @internal
273
+ */
274
+ interface AdjustableQuantity {
275
+ /** The minimum quantity the customer can purchase. */
276
+ minimum: number;
277
+ /** The maximum quantity the customer can purchase. */
278
+ maximum: number;
152
279
  }
153
280
  /**
154
281
  * A shipping option available in a checkout session.
282
+ * @checkoutSessionsPreview
155
283
  * @internal
156
284
  */
157
285
  interface ShippingOption {
158
286
  /** The shipping rate identifier. */
159
287
  id: string;
160
288
  /** The display name shown to the customer. */
161
- displayName: string;
162
- /** The shipping amount in the smallest currency unit. */
163
- amount: number;
289
+ displayName?: string;
290
+ /** The shipping cost. */
291
+ amount: Amount;
164
292
  /** Three-letter ISO 4217 currency code in lowercase. */
165
293
  currency: string;
166
- /** The estimated delivery window shown to the customer, if available. */
167
- deliveryEstimate?: string;
294
+ /** The estimated delivery window, if available. */
295
+ deliveryEstimate?: DeliveryEstimate;
296
+ }
297
+ /**
298
+ * The estimated delivery range for a shipping option.
299
+ * @checkoutSessionsPreview
300
+ * @internal
301
+ */
302
+ interface DeliveryEstimate {
303
+ /** The lower bound of the delivery estimate. */
304
+ minimum?: DeliveryEstimateBound;
305
+ /** The upper bound of the delivery estimate. */
306
+ maximum?: DeliveryEstimateBound;
307
+ }
308
+ /**
309
+ * A bound (minimum or maximum) of a delivery estimate.
310
+ * @checkoutSessionsPreview
311
+ * @internal
312
+ */
313
+ interface DeliveryEstimateBound {
314
+ /** The unit of time. */
315
+ unit: DeliveryEstimateUnit;
316
+ /** The number of units. */
317
+ value: number;
318
+ }
319
+ /**
320
+ * The unit of time for a delivery estimate.
321
+ * @checkoutSessionsPreview
322
+ * @internal
323
+ */
324
+ type DeliveryEstimateUnit = 'unknown' | 'hour' | 'day' | 'businessDay' | 'week' | 'month';
325
+ /**
326
+ * The shipping option selected for a checkout session, plus any computed
327
+ * shipping tax.
328
+ * @checkoutSessionsPreview
329
+ * @internal
330
+ */
331
+ interface SelectedShipping {
332
+ /** The selected shipping option. */
333
+ shippingOption: ShippingOption;
334
+ /** Tax amounts calculated for the shipping cost. */
335
+ taxAmounts: TaxAmount[];
168
336
  }
169
337
  /**
170
- * A discount applied to a checkout session.
338
+ * A discount applied to a checkout session or line item.
339
+ * @checkoutSessionsPreview
171
340
  * @internal
172
341
  */
173
- interface Discount {
174
- /** The coupon associated with this discount. */
175
- coupon: Coupon;
342
+ interface DiscountAmount {
343
+ /** The discount amount. A positive number reduces the amount to be paid. */
344
+ amount: Amount;
345
+ /** A user-facing description of the discount. */
346
+ displayName: string;
176
347
  /** The promotion code used to apply this discount, if any. */
177
348
  promotionCode?: string;
178
- /** The discount amount in the smallest currency unit. */
179
- amount: number;
180
349
  }
181
350
  /**
182
- * A coupon associated with a checkout discount.
351
+ * A currency option available on a checkout session when adaptive pricing
352
+ * is active.
353
+ * @checkoutSessionsPreview
183
354
  * @internal
184
355
  */
185
- interface Coupon {
186
- /** The coupon identifier. */
187
- id: string;
188
- /** The display name of the coupon, if one exists. */
189
- name?: string;
190
- /** The percentage off, if this is a percentage-based coupon. */
191
- percentOff?: number;
192
- /** The fixed amount off, in the smallest currency unit, if applicable. */
193
- amountOff?: number;
356
+ interface CurrencyOption {
357
+ /** The total amount in this currency. */
358
+ amount: Amount;
359
+ /** Three-letter ISO 4217 currency code in lowercase. */
360
+ currency: string;
361
+ /** Conversion details, present only for the customer's local currency. */
362
+ currencyConversion?: CurrencyConversion;
194
363
  }
195
364
  /**
196
- * A locally stored address override for checkout.
197
- *
198
- * Address updates are merged into PaymentSheet configuration and may also be
199
- * sent to Stripe when tax calculation depends on the billing or shipping
200
- * address.
365
+ * Currency conversion details for an adaptive-pricing currency option.
366
+ * @checkoutSessionsPreview
367
+ * @internal
368
+ */
369
+ interface CurrencyConversion {
370
+ /** The exchange rate used to convert source to customer currency. */
371
+ fxRate: string;
372
+ /** The merchant's original currency (three-letter ISO 4217 code). */
373
+ sourceCurrency: string;
374
+ }
375
+ /**
376
+ * A contact address containing a name, phone, and postal address.
377
+ * @checkoutSessionsPreview
201
378
  * @internal
202
379
  */
203
- interface AddressUpdate {
380
+ interface ContactAddress {
204
381
  /** The customer's or recipient's name, if provided. */
205
382
  name?: string;
206
383
  /** The customer's or recipient's phone number, if provided. */
207
384
  phone?: string;
208
- /** The postal address to use for the update. */
385
+ /** The postal address. */
209
386
  address: Address;
210
387
  }
211
388
  /**
212
389
  * A postal address used for billing, shipping, or tax updates.
390
+ * @checkoutSessionsPreview
213
391
  * @internal
214
392
  */
215
393
  interface Address {
@@ -316,21 +494,17 @@ export interface Checkout {
316
494
  */
317
495
  selectShippingOption(id: string): Promise<void>;
318
496
  /**
319
- * Sets the customer's tax ID on the session.
320
- * @param type - The tax ID type (e.g. `"eu_vat"`).
321
- * @param value - The tax ID value (e.g. `"DE123456789"`).
322
- * - Throws: `CheckoutError` if updating the tax ID fails.
323
- * @internal
324
- */
325
- updateTaxId(type: string, value: string): Promise<void>;
326
- /**
327
- * Refreshes the session by fetching the latest copy from Stripe.
497
+ * Runs an async operation that updates the Checkout Session on your server,
498
+ * then automatically refreshes the local session state.
499
+ *
500
+ * Call your server inside `serverUpdate` to modify the Checkout Session.
501
+ * A 20-second timeout is enforced by the native SDK.
328
502
  *
329
- * Call this after making server-side changes to the Checkout Session
330
- * so the local state stays in sync.
331
- * - Throws: `CheckoutError` if refreshing the session fails.
503
+ * @param serverUpdate - An async function that calls your server to update the session.
504
+ * - Throws: `CheckoutError` if the operation times out or fails.
505
+ * @checkoutSessionsPreview
332
506
  * @internal
333
507
  */
334
- refresh(): Promise<void>;
508
+ runServerUpdate(serverUpdate: () => Promise<void>): Promise<void>;
335
509
  }
336
510
  //# sourceMappingURL=Checkout.d.ts.map
@@ -1 +1 @@
1
- {"version":3,"file":"Checkout.d.ts","sourceRoot":"","sources":["../../../../src/types/Checkout.ts"],"names":[],"mappings":"AAAA;;;GAGG;AACH,yBAAiB,QAAQ,CAAC;IACxB;;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,CAAC,IAAI,CAAC,CAAC;CACnE"}
@@ -35,11 +35,6 @@ export declare enum PaymentSheetError {
35
35
  Canceled = "Canceled",
36
36
  Timeout = "Timeout"
37
37
  }
38
- export declare enum OnrampError {
39
- Failed = "Failed",
40
- Canceled = "Canceled",
41
- Unknown = "Unknown"
42
- }
43
38
  export type ErrorType = 'api_connection_error' | 'api_error' | 'authentication_error' | 'card_error' | 'idempotency_error' | 'invalid_request_error' | 'rate_limit_error';
44
39
  export interface StripeError<T> {
45
40
  code: T;
@@ -1 +1 @@
1
- {"version":3,"file":"Errors.d.ts","sourceRoot":"","sources":["../../../../src/types/Errors.ts"],"names":[],"mappings":"AAAA,oBAAY,mBAAmB;IAC7B,QAAQ,aAAa;IACrB,MAAM,WAAW;IACjB,OAAO,YAAY;CACpB;AAED,oBAAY,eAAe;IACzB,QAAQ,aAAa;IACrB,MAAM,WAAW;IACjB,OAAO,YAAY;CACpB;AAED,oBAAY,uBAAuB;IACjC,QAAQ,aAAa;IACrB,MAAM,WAAW;IACjB,OAAO,YAAY;CACpB;AAED,oBAAY,wBAAwB;IAClC,MAAM,WAAW;CAClB;AAED,oBAAY,gBAAgB;IAC1B,MAAM,WAAW;CAClB;AAED,oBAAY,0BAA0B;IACpC,OAAO,YAAY;CACpB;AAED,oBAAY,wBAAwB;IAClC,OAAO,YAAY;CACpB;AAED,oBAAY,aAAa;IACvB,QAAQ,aAAa;IACrB,MAAM,WAAW;IACjB,OAAO,YAAY;CACpB;AAED,oBAAY,iBAAiB;IAC3B,MAAM,WAAW;IACjB,QAAQ,aAAa;IACrB,OAAO,YAAY;CACpB;AAED,oBAAY,WAAW;IACrB,MAAM,WAAW;IACjB,QAAQ,aAAa;IACrB,OAAO,YAAY;CACpB;AAED,MAAM,MAAM,SAAS,GACjB,sBAAsB,GACtB,WAAW,GACX,sBAAsB,GACtB,YAAY,GACZ,mBAAmB,GACnB,uBAAuB,GACvB,kBAAkB,CAAC;AAEvB,MAAM,WAAW,WAAW,CAAC,CAAC;IAC5B,IAAI,EAAE,CAAC,CAAC;IACR,OAAO,EAAE,MAAM,CAAC;IAChB,gBAAgB,CAAC,EAAE,MAAM,CAAC;IAC1B,WAAW,CAAC,EAAE,MAAM,CAAC;IACrB,eAAe,CAAC,EAAE,MAAM,CAAC;IACzB,IAAI,CAAC,EAAE,SAAS,CAAC;CAClB;AAED,oBAAY,cAAc;IACxB,MAAM,WAAW;IACjB,QAAQ,aAAa;IACrB,OAAO,YAAY;CACpB;AAED,eAAO,MAAM,oBAAoB;;;CAIhC,CAAC;AAEF,oBAAY,wBAAwB;IAClC,QAAQ,aAAa;IACrB,MAAM,WAAW;IACjB,OAAO,YAAY;CACpB;AAED,oBAAY,uBAAuB;IACjC,QAAQ,aAAa;IACrB,MAAM,WAAW;IACjB,OAAO,YAAY;CACpB;AAED,oBAAY,iBAAiB;IAC3B,MAAM,WAAW;IACjB,QAAQ,aAAa;CACtB;AAED,oBAAY,kBAAkB;IAC5B,MAAM,WAAW;IACjB,QAAQ,aAAa;CACtB;AAED,oBAAY,gBAAgB;IAC1B,QAAQ,aAAa;IACrB,MAAM,WAAW;IACjB,OAAO,YAAY;CACpB;AAED,oBAAY,UAAU;IACpB,MAAM,WAAW;IACjB,OAAO,YAAY;CACpB"}
1
+ {"version":3,"file":"Errors.d.ts","sourceRoot":"","sources":["../../../../src/types/Errors.ts"],"names":[],"mappings":"AAAA,oBAAY,mBAAmB;IAC7B,QAAQ,aAAa;IACrB,MAAM,WAAW;IACjB,OAAO,YAAY;CACpB;AAED,oBAAY,eAAe;IACzB,QAAQ,aAAa;IACrB,MAAM,WAAW;IACjB,OAAO,YAAY;CACpB;AAED,oBAAY,uBAAuB;IACjC,QAAQ,aAAa;IACrB,MAAM,WAAW;IACjB,OAAO,YAAY;CACpB;AAED,oBAAY,wBAAwB;IAClC,MAAM,WAAW;CAClB;AAED,oBAAY,gBAAgB;IAC1B,MAAM,WAAW;CAClB;AAED,oBAAY,0BAA0B;IACpC,OAAO,YAAY;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