stripe 18.2.0-beta.1 → 18.3.0-beta.1
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/CHANGELOG.md +229 -31
- package/OPENAPI_VERSION +1 -1
- package/README.md +11 -11
- package/VERSION +1 -1
- package/cjs/RequestSender.js +2 -2
- package/cjs/StripeResource.js +1 -1
- package/cjs/apiVersion.js +1 -1
- package/cjs/resources/Subscriptions.js +4 -0
- package/cjs/resources/V2/Payments/OffSessionPayments.js +25 -0
- package/cjs/resources.js +15 -17
- package/cjs/stripe.core.js +1 -1
- package/cjs/utils.js +5 -0
- package/esm/RequestSender.js +2 -2
- package/esm/StripeResource.js +1 -1
- package/esm/apiVersion.js +1 -1
- package/esm/resources/Subscriptions.js +4 -0
- package/esm/resources/V2/Payments/OffSessionPayments.js +22 -0
- package/esm/resources.js +4 -6
- package/esm/stripe.core.js +1 -1
- package/esm/utils.js +5 -0
- package/package.json +1 -1
- package/types/AccountSessions.d.ts +65 -0
- package/types/AccountSessionsResource.d.ts +41 -0
- package/types/Accounts.d.ts +22 -15
- package/types/AccountsResource.d.ts +81 -57
- package/types/Balance.d.ts +83 -1
- package/types/BalanceResource.d.ts +1 -1
- package/types/BalanceSettings.d.ts +1 -1
- package/types/BalanceSettingsResource.d.ts +5 -5
- package/types/BalanceTransactions.d.ts +10 -0
- package/types/BankAccounts.d.ts +3 -3
- package/types/Billing/Alerts.d.ts +1 -1
- package/types/Billing/AlertsResource.d.ts +2 -2
- package/types/BillingPortal/Sessions.d.ts +1 -1
- package/types/Capabilities.d.ts +1 -1
- package/types/Cards.d.ts +2 -2
- package/types/Charges.d.ts +20 -0
- package/types/ChargesResource.d.ts +96 -4
- package/types/Checkout/Sessions.d.ts +123 -108
- package/types/Checkout/SessionsResource.d.ts +125 -116
- package/types/ConfirmationTokens.d.ts +4 -4
- package/types/CountrySpecs.d.ts +1 -1
- package/types/CreditNotes.d.ts +11 -5
- package/types/CreditNotesResource.d.ts +7 -8
- package/types/CustomerSessions.d.ts +3 -3
- package/types/CustomersResource.d.ts +7 -7
- package/types/Disputes.d.ts +1 -1
- package/types/DisputesResource.d.ts +1 -1
- package/types/EventTypes.d.ts +17 -17
- package/types/Events.d.ts +4 -1
- package/types/ExternalAccountsResource.d.ts +1 -1
- package/types/Files.d.ts +1 -1
- package/types/FilesResource.d.ts +1 -1
- package/types/FinancialConnections/Accounts.d.ts +5 -0
- package/types/FinancialConnections/Institutions.d.ts +5 -0
- package/types/Identity/VerificationReports.d.ts +17 -0
- package/types/Identity/VerificationSessions.d.ts +19 -2
- package/types/Identity/VerificationSessionsResource.d.ts +5 -5
- package/types/InvoiceItems.d.ts +1 -1
- package/types/InvoiceLineItems.d.ts +1 -1
- package/types/InvoicePayments.d.ts +9 -2
- package/types/Invoices.d.ts +7 -9
- package/types/InvoicesResource.d.ts +60 -18
- package/types/Issuing/AuthorizationsResource.d.ts +4 -4
- package/types/Issuing/CardsResource.d.ts +3 -0
- package/types/Issuing/DisputesResource.d.ts +2 -2
- package/types/LineItems.d.ts +2 -2
- package/types/Orders.d.ts +43 -83
- package/types/OrdersResource.d.ts +85 -119
- package/types/PaymentAttemptRecords.d.ts +21 -1
- package/types/PaymentIntentAmountDetailsLineItems.d.ts +6 -0
- package/types/PaymentIntents.d.ts +224 -173
- package/types/PaymentIntentsResource.d.ts +819 -584
- package/types/PaymentMethodConfigurations.d.ts +180 -0
- package/types/PaymentMethodConfigurationsResource.d.ts +254 -4
- package/types/PaymentMethodDomainsResource.d.ts +1 -1
- package/types/PaymentMethods.d.ts +4 -4
- package/types/PaymentMethodsResource.d.ts +8 -8
- package/types/PaymentRecords.d.ts +21 -1
- package/types/PaymentRecordsResource.d.ts +5 -5
- package/types/Payouts.d.ts +2 -2
- package/types/PayoutsResource.d.ts +2 -2
- package/types/Persons.d.ts +10 -10
- package/types/PlansResource.d.ts +1 -1
- package/types/PricesResource.d.ts +2 -2
- package/types/Privacy/RedactionJobValidationErrors.d.ts +35 -5
- package/types/Privacy/RedactionJobs.d.ts +53 -7
- package/types/Privacy/RedactionJobsResource.d.ts +25 -13
- package/types/Products.d.ts +0 -39
- package/types/ProductsResource.d.ts +1 -37
- package/types/PromotionCodesResource.d.ts +1 -1
- package/types/QuotePreviewInvoices.d.ts +7 -9
- package/types/QuotePreviewSubscriptionSchedules.d.ts +48 -2
- package/types/Quotes.d.ts +7 -7
- package/types/QuotesResource.d.ts +1 -1
- package/types/Radar/EarlyFraudWarningsResource.d.ts +1 -1
- package/types/Refunds.d.ts +6 -1
- package/types/Reviews.d.ts +1 -1
- package/types/SetupAttempts.d.ts +1 -3
- package/types/SetupIntents.d.ts +2 -4
- package/types/SetupIntentsResource.d.ts +3 -3
- package/types/SourcesResource.d.ts +1 -1
- package/types/SubscriptionItems.d.ts +21 -0
- package/types/SubscriptionItemsResource.d.ts +28 -0
- package/types/SubscriptionSchedules.d.ts +48 -2
- package/types/SubscriptionSchedulesResource.d.ts +100 -4
- package/types/Subscriptions.d.ts +32 -3
- package/types/SubscriptionsResource.d.ts +104 -17
- package/types/Tax/Associations.d.ts +19 -63
- package/types/Tax/CalculationLineItems.d.ts +5 -0
- package/types/Tax/CalculationsResource.d.ts +5 -0
- package/types/Tax/RegistrationsResource.d.ts +1 -1
- package/types/TaxRates.d.ts +2 -2
- package/types/Terminal/LocationsResource.d.ts +1 -1
- package/types/Terminal/Readers.d.ts +21 -1
- package/types/Terminal/ReadersResource.d.ts +20 -0
- package/types/Tokens.d.ts +3 -3
- package/types/TokensResource.d.ts +8 -8
- package/types/TransferReversals.d.ts +1 -1
- package/types/TransfersResource.d.ts +2 -2
- package/types/Treasury/ReceivedCredits.d.ts +2 -2
- package/types/V2/Core/Accounts.d.ts +5 -5
- package/types/V2/EventTypes.d.ts +102 -11
- package/types/V2/MoneyManagement/FinancialAddressesResource.d.ts +1 -1
- package/types/V2/MoneyManagement/ReceivedCredits.d.ts +1 -43
- package/types/V2/MoneyManagement/ReceivedDebits.d.ts +1 -49
- package/types/V2/Payments/OffSessionPayments.d.ts +167 -0
- package/types/V2/Payments/OffSessionPaymentsResource.d.ts +159 -0
- package/types/WebhookEndpointsResource.d.ts +4 -3
- package/types/index.d.ts +5 -9
- package/types/lib.d.ts +1 -1
- package/types/test/typescriptTest.ts +3 -3
- package/cjs/resources/GiftCards/Cards.js +0 -23
- package/cjs/resources/GiftCards/Transactions.js +0 -33
- package/esm/resources/GiftCards/Cards.js +0 -20
- package/esm/resources/GiftCards/Transactions.js +0 -30
- package/types/Billing/MeterErrorReports.d.ts +0 -106
- package/types/GiftCards/Cards.d.ts +0 -118
- package/types/GiftCards/CardsResource.d.ts +0 -159
- package/types/GiftCards/Transactions.d.ts +0 -129
- package/types/GiftCards/TransactionsResource.d.ts +0 -201
package/CHANGELOG.md
CHANGED
|
@@ -1,9 +1,90 @@
|
|
|
1
1
|
# Changelog
|
|
2
2
|
|
|
3
|
+
## 18.3.0-beta.1 - 2025-05-29
|
|
4
|
+
This release changes the pinned API version to 2025-05-28.preview.
|
|
5
|
+
|
|
6
|
+
* [#2324](https://github.com/stripe/stripe-node/pull/2324) Update generated code for beta
|
|
7
|
+
### Breaking changes
|
|
8
|
+
* Remove support for deprecated previews
|
|
9
|
+
* Remove support for resources `Billing.MeterErrorReport`, `GiftCards.Card`, and `GiftCards.Transaction`
|
|
10
|
+
* Remove support for `create`, `list`, `retrieve`, `update`, and `validate` methods on resource `GiftCards.Card`
|
|
11
|
+
* Remove support for `cancel`, `confirm`, `create`, `list`, `retrieve`, and `update` methods on resource `GiftCards.Transaction`
|
|
12
|
+
* Remove support for `provisioning` on `ProductCreateParams` and `Product`
|
|
13
|
+
* Remove support for snapshot event `BillingMeterErrorReportTriggeredEvent` with resource `Billing.MeterErrorReport`
|
|
14
|
+
* Remove support for error codes `gift_card_balance_insufficient`, `gift_card_code_exists`, and `gift_card_inactive` on `QuotePreviewInvoice.last_finalization_error` and `StripeError`
|
|
15
|
+
* Remove support for values `credits_attributed_to_debits` and `legacy_prorations` from enums `Checkout.SessionCreateParams.subscription_data.billing_mode`, `InvoiceCreatePreviewParams.schedule_details.billing_mode`, `InvoiceCreatePreviewParams.subscription_details.billing_mode`, `Quote.subscription_data.billing_mode`, `QuoteCreateParams.subscription_data.billing_mode`, `QuotePreviewSubscriptionSchedule.billing_mode`, `Subscription.billing_mode`, `SubscriptionCreateParams.billing_mode`, `SubscriptionSchedule.billing_mode`, and `SubscriptionScheduleCreateParams.billing_mode`
|
|
16
|
+
* Change type of `Checkout.SessionUpdateParams.line_items[].quantity` from `emptyable(longInteger)` to `longInteger`
|
|
17
|
+
* Change `CreditNote.post_payment_amount` to be required
|
|
18
|
+
* Change `CreditNote.pre_payment_amount` to be required
|
|
19
|
+
* Change type of `InvoiceCreatePreviewParams.subscription_details.cancel_at`, `SubscriptionCreateParams.cancel_at`, and `SubscriptionUpdateParams.cancel_at` from `DateTime` to `DateTime | enum('max_period_end'|'min_period_end')`
|
|
20
|
+
* Remove support for `credits` on `OrderCreateParams`, `OrderUpdateParams`, and `Order`
|
|
21
|
+
* Remove support for `amount_remaining` on `Order`
|
|
22
|
+
* Remove support for `amount_credit` on `Order.total_details`
|
|
23
|
+
* Change type of `PaymentAttemptRecord.metadata` and `PaymentRecord.metadata` from `map(string: string) | null` to `map(string: string)`
|
|
24
|
+
* Change type of `PaymentRecordReportPaymentAttemptCanceledParams.metadata`, `PaymentRecordReportPaymentAttemptFailedParams.metadata`, `PaymentRecordReportPaymentAttemptGuaranteedParams.metadata`, `PaymentRecordReportPaymentAttemptParams.metadata`, and `PaymentRecordReportPaymentParams.metadata` from `map(string: string)` to `emptyable(map(string: string))`
|
|
25
|
+
* Change type of `Privacy.RedactionJob.status` from `string` to `enum`
|
|
26
|
+
* Change type of `Privacy.RedactionJob.validation_behavior` from `string` to `enum('error'|'fix')`
|
|
27
|
+
* Change type of `Privacy.RedactionJobValidationError.code` from `string` to `enum`
|
|
28
|
+
* Change type of `Privacy.RedactionJobValidationError.erroring_object` from `map(string: string)` to `RedactionResourceErroringObject`
|
|
29
|
+
* Remove support for `status_details` and `status` on `Tax.Association`
|
|
30
|
+
|
|
31
|
+
### Other changes
|
|
32
|
+
* Add support for `migrate` method on resource `Subscription`
|
|
33
|
+
* Add support for `distance`, `pickup_location_name`, `return_location_name`, and `vehicle_identification_number` on `ChargeCaptureParams.payment_details.car_rental`, `ChargeUpdateParams.payment_details.car_rental`, `PaymentIntent.payment_details.car_rental`, `PaymentIntentCaptureParams.payment_details.car_rental`, `PaymentIntentConfirmParams.payment_details.car_rental`, `PaymentIntentCreateParams.payment_details.car_rental`, and `PaymentIntentUpdateParams.payment_details.car_rental`
|
|
34
|
+
* Add support for `driver_identification_number` and `driver_tax_number` on `ChargeCaptureParams.payment_details.car_rental.drivers[]`, `ChargeUpdateParams.payment_details.car_rental.drivers[]`, `PaymentIntent.payment_details.car_rental.drivers[]`, `PaymentIntentCaptureParams.payment_details.car_rental.drivers[]`, `PaymentIntentConfirmParams.payment_details.car_rental.drivers[]`, `PaymentIntentCreateParams.payment_details.car_rental.drivers[]`, and `PaymentIntentUpdateParams.payment_details.car_rental.drivers[]`
|
|
35
|
+
* Add support for new values `classic` and `flexible` on enums `Checkout.SessionCreateParams.subscription_data.billing_mode`, `InvoiceCreatePreviewParams.schedule_details.billing_mode`, `InvoiceCreatePreviewParams.subscription_details.billing_mode`, `Quote.subscription_data.billing_mode`, `QuoteCreateParams.subscription_data.billing_mode`, `QuotePreviewSubscriptionSchedule.billing_mode`, `Subscription.billing_mode`, `SubscriptionCreateParams.billing_mode`, `SubscriptionSchedule.billing_mode`, and `SubscriptionScheduleCreateParams.billing_mode`
|
|
36
|
+
* Add support for `institution` on `FinancialConnections.Account`
|
|
37
|
+
* Add support for `countries` on `FinancialConnections.Institution`
|
|
38
|
+
* Add support for `location` and `reader` on `PaymentAttemptRecord.payment_method_details.affirm`, `PaymentAttemptRecord.payment_method_details.wechat_pay`, `PaymentRecord.payment_method_details.affirm`, and `PaymentRecord.payment_method_details.wechat_pay`
|
|
39
|
+
* Add support for `hooks` on `PaymentIntentCaptureParams`, `PaymentIntentConfirmParams`, `PaymentIntentCreateParams`, `PaymentIntentDecrementAuthorizationParams`, `PaymentIntentIncrementAuthorizationParams`, `PaymentIntentUpdateParams`, and `PaymentIntent`
|
|
40
|
+
* Remove support for `async_workflows` on `PaymentIntentCaptureParams`, `PaymentIntentConfirmParams`, `PaymentIntentCreateParams`, `PaymentIntentDecrementAuthorizationParams`, `PaymentIntentIncrementAuthorizationParams`, `PaymentIntentUpdateParams`, and `PaymentIntent`
|
|
41
|
+
* Add support for `card_present` on `PaymentIntentAmountDetailsLineItem.payment_method_options`
|
|
42
|
+
* Add support for `livemode` on `Privacy.RedactionJob`
|
|
43
|
+
* Add support for `billing_thresholds` on `QuotePreviewSubscriptionSchedule.default_settings`, `QuotePreviewSubscriptionSchedule.phases[].items[]`, and `QuotePreviewSubscriptionSchedule.phases[]`
|
|
44
|
+
* Add support for `billing_mode_details` on `Subscription`
|
|
45
|
+
* Add support for `tax_transaction_attempts` on `Tax.Association`
|
|
46
|
+
* Add support for `confirm_config` on `Terminal.Reader.action.confirm_payment_intent` and `Terminal.ReaderConfirmPaymentIntentParams`
|
|
47
|
+
* Add support for error code `forwarding_api_upstream_error` on `QuotePreviewInvoice.last_finalization_error`
|
|
48
|
+
|
|
49
|
+
## 18.2.0 - 2025-05-29
|
|
50
|
+
This release changes the pinned API version to `2025-05-28.basil`.
|
|
51
|
+
|
|
52
|
+
* [#2338](https://github.com/stripe/stripe-node/pull/2338) Update generated code
|
|
53
|
+
* Add support for `attach_payment` method on resource `Invoice`
|
|
54
|
+
* Add support for `collect_inputs` method on resource `Terminal.Reader`
|
|
55
|
+
* Add support for `succeed_input_collection` and `timeout_input_collection` test helper methods on resource `Terminal.Reader`
|
|
56
|
+
* Add support for `pix_payments` on `Account.capabilities`, `AccountCreateParams.capabilities`, and `AccountUpdateParams.capabilities`
|
|
57
|
+
* Add support for `disputes_list` and `payment_disputes` on `AccountSession.components` and `AccountSessionCreateParams.components`
|
|
58
|
+
* Add support for `refund_and_dispute_prefunding` on `Balance`
|
|
59
|
+
* Add support for `balance_type` on `BalanceTransaction`
|
|
60
|
+
* Change `Billing.AlertCreateParams.usage_threshold.meter` to be required
|
|
61
|
+
* Add support for `location` and `reader` on `Charge.payment_method_details.affirm` and `Charge.payment_method_details.wechat_pay`
|
|
62
|
+
* Add support for `payment_method_remove` on `Checkout.SessionCreateParams.saved_payment_method_options`
|
|
63
|
+
* Add support for `setup_future_usage` on `Checkout.Session.payment_method_options.naver_pay`
|
|
64
|
+
* Change `ConfirmationToken.payment_method_preview.naver_pay.buyer_id` and `PaymentMethod.naver_pay.buyer_id` to be required
|
|
65
|
+
* Add support for `post_payment_amount` and `pre_payment_amount` on `CreditNote`
|
|
66
|
+
* Add support for new value `mixed` on enum `CreditNote.type`
|
|
67
|
+
* Add support for new value `invoice_payment.paid` on enum `Event.type`
|
|
68
|
+
* Add support for `sex`, `unparsed_place_of_birth`, and `unparsed_sex` on `Identity.VerificationReport.document` and `Identity.VerificationSession.verified_outputs`
|
|
69
|
+
* Add support for `billing_thresholds` on `InvoiceCreatePreviewParams.schedule_details.phases[].items[]`, `InvoiceCreatePreviewParams.schedule_details.phases[]`, `InvoiceCreatePreviewParams.subscription_details.items[]`, `SubscriptionCreateParams.items[]`, `SubscriptionCreateParams`, `SubscriptionItemCreateParams`, `SubscriptionItemUpdateParams`, `SubscriptionItem`, `SubscriptionSchedule.default_settings`, `SubscriptionSchedule.phases[].items[]`, `SubscriptionSchedule.phases[]`, `SubscriptionScheduleCreateParams.default_settings`, `SubscriptionScheduleCreateParams.phases[].items[]`, `SubscriptionScheduleCreateParams.phases[]`, `SubscriptionScheduleUpdateParams.default_settings`, `SubscriptionScheduleUpdateParams.phases[].items[]`, `SubscriptionScheduleUpdateParams.phases[]`, `SubscriptionUpdateParams.items[]`, `SubscriptionUpdateParams`, and `Subscription`
|
|
70
|
+
* Add support for `satispay` on `PaymentIntent.payment_method_options`, `PaymentIntentConfirmParams.payment_method_options`, `PaymentIntentCreateParams.payment_method_options`, and `PaymentIntentUpdateParams.payment_method_options`
|
|
71
|
+
* Add support for `capture_method` on `PaymentIntent.payment_method_options.billie`
|
|
72
|
+
* Add support for `kakao_pay`, `kr_card`, `naver_pay`, `payco`, and `samsung_pay` on `PaymentMethodConfigurationCreateParams`, `PaymentMethodConfigurationUpdateParams`, and `PaymentMethodConfiguration`
|
|
73
|
+
* Add support for `network_decline_code` on `Refund.destination_details.paypal`
|
|
74
|
+
* Add support for `metadata` on `Tax.CalculationCreateParams.line_items[]` and `Tax.CalculationLineItem`
|
|
75
|
+
* Add support for new value `simulated_stripe_s700` on enums `Terminal.Reader.device_type` and `Terminal.ReaderListParams.device_type`
|
|
76
|
+
* Add support for `return_url` on `Terminal.Reader.action.process_payment_intent.process_config` and `Terminal.ReaderProcessPaymentIntentParams.process_config`
|
|
77
|
+
* Add support for `collect_inputs` on `Terminal.Reader.action`
|
|
78
|
+
* Add support for new value `collect_inputs` on enum `Terminal.Reader.action.type`
|
|
79
|
+
* Add support for new value `invoice_payment.paid` on enums `WebhookEndpointCreateParams.enabled_events` and `WebhookEndpointUpdateParams.enabled_events`
|
|
80
|
+
* Add support for new value `2025-05-28.basil` on enum `WebhookEndpointCreateParams.api_version`
|
|
81
|
+
* Add support for snapshot event `InvoicePaymentPaidEvent` with resource `InvoicePayment`
|
|
82
|
+
* Add support for error code `forwarding_api_upstream_error` on `Invoice.last_finalization_error`, `PaymentIntent.last_payment_error`, `SetupAttempt.setup_error`, `SetupIntent.last_setup_error`, and `StripeError`
|
|
83
|
+
|
|
3
84
|
## 18.2.0-beta.1 - 2025-04-30
|
|
4
85
|
* [#2307](https://github.com/stripe/stripe-node/pull/2307) Update generated code for beta
|
|
5
86
|
This release changes the pinned API version to `2025-04-30.preview`.
|
|
6
|
-
|
|
87
|
+
|
|
7
88
|
* Add support for `billing_mode` on `Checkout.SessionCreateParams.subscription_data`, `InvoiceCreatePreviewParams.schedule_details`, `InvoiceCreatePreviewParams.subscription_details`, `Quote.subscription_data`, `QuoteCreateParams.subscription_data`, `QuotePreviewSubscriptionSchedule`, `SubscriptionCreateParams`, `SubscriptionScheduleCreateParams`, `SubscriptionSchedule`, and `Subscription`
|
|
8
89
|
* Add support for new values `aw_tin`, `az_tin`, `bd_bin`, `bf_ifu`, `bj_ifu`, `cm_niu`, `cv_nif`, `et_tin`, `kg_tin`, and `la_tin` on enums `Checkout.Session.collected_information.tax_ids[].type`, `Order.tax_details.tax_ids[].type`, and `QuotePreviewInvoice.customer_tax_ids[].type`
|
|
9
90
|
* Change `Checkout.Session.automatic_tax.provider`, `Invoice.automatic_tax.provider`, `Quote.automatic_tax.provider`, and `QuotePreviewInvoice.automatic_tax.provider` to be required
|
|
@@ -12,6 +93,51 @@
|
|
|
12
93
|
* Add support for new values `aw_tin`, `az_tin`, `bd_bin`, `bf_ifu`, `bj_ifu`, `cm_niu`, `cv_nif`, `et_tin`, `kg_tin`, and `la_tin` on enums `OrderCreateParams.tax_details.tax_ids[].type` and `OrderUpdateParams.tax_details.tax_ids[].type`
|
|
13
94
|
* Add support for new value `balance_settings.updated` on enums `WebhookEndpointUpdateParams.enabled_events`
|
|
14
95
|
|
|
96
|
+
## 18.1.1 - 2025-05-19
|
|
97
|
+
* [#2308](https://github.com/stripe/stripe-node/pull/2308) RawRequest now allows you set `host` and `streaming` in request options.
|
|
98
|
+
```typescript
|
|
99
|
+
const file = await stripe.rawRequest(
|
|
100
|
+
'GET',
|
|
101
|
+
'/v1/files/file_123/contents',
|
|
102
|
+
{},
|
|
103
|
+
{host: 'files.stripe.com', streaming: true}
|
|
104
|
+
);
|
|
105
|
+
```
|
|
106
|
+
* [#2320](https://github.com/stripe/stripe-node/pull/2320) fix: examples/webhook-signing/nestjs/package.json to reduce vulnerabilities.
|
|
107
|
+
* [#2326](https://github.com/stripe/stripe-node/pull/2326) Adds CONTRIBUTING.md
|
|
108
|
+
|
|
109
|
+
## 18.1.0 - 2025-04-30
|
|
110
|
+
|
|
111
|
+
This release changes the pinned API version to `2025-04-30.basil`.
|
|
112
|
+
|
|
113
|
+
* [#2311](https://github.com/stripe/stripe-node/pull/2311) Update generated code
|
|
114
|
+
* Add support for `minority_owned_business_designation` on `Account.business_profile`, `AccountCreateParams.business_profile`, and `AccountUpdateParams.business_profile`
|
|
115
|
+
* Add support for `registration_date` on `Account.company`, `AccountCreateParams.company`, `AccountUpdateParams.company`, and `TokenCreateParams.account.company`
|
|
116
|
+
* Add support for `us_cfpb_data` on `AccountCreatePersonParams`, `AccountUpdatePersonParams`, `Person`, and `TokenCreateParams.person`
|
|
117
|
+
* Add support for new value `verification_legal_entity_structure_mismatch` on enums `Account.future_requirements.errors[].code`, `Account.requirements.errors[].code`, `BankAccount.future_requirements.errors[].code`, `BankAccount.requirements.errors[].code`, `Capability.future_requirements.errors[].code`, `Capability.requirements.errors[].code`, `Person.future_requirements.errors[].code`, and `Person.requirements.errors[].code`
|
|
118
|
+
* Add support for new value `tax_id_prohibited` on enums `Invoice.last_finalization_error.code`, `PaymentIntent.last_payment_error.code`, `SetupAttempt.setup_error.code`, `SetupIntent.last_setup_error.code`, and `StripeError.code`
|
|
119
|
+
* Add support for `tax_id` on `Charge.billing_details`, `ConfirmationToken.payment_method_preview.billing_details`, `ConfirmationTokenCreateParams.testHelpers.payment_method_data.billing_details`, `PaymentIntentConfirmParams.payment_method_data.billing_details`, `PaymentIntentCreateParams.payment_method_data.billing_details`, `PaymentIntentUpdateParams.payment_method_data.billing_details`, `PaymentMethod.billing_details`, `PaymentMethodCreateParams.billing_details`, `PaymentMethodUpdateParams.billing_details`, `SetupIntentConfirmParams.payment_method_data.billing_details`, `SetupIntentCreateParams.payment_method_data.billing_details`, and `SetupIntentUpdateParams.payment_method_data.billing_details`
|
|
120
|
+
* Add support for `wallet_options` on `Checkout.SessionCreateParams` and `Checkout.Session`
|
|
121
|
+
* Add support for `provider` on `Checkout.Session.automatic_tax`, `Invoice.automatic_tax`, and `Quote.automatic_tax`
|
|
122
|
+
* Add support for new values `aw_tin`, `az_tin`, `bd_bin`, `bf_ifu`, `bj_ifu`, `cm_niu`, `cv_nif`, `et_tin`, `kg_tin`, and `la_tin` on enums `Checkout.Session.customer_details.tax_ids[].type`, `Invoice.customer_tax_ids[].type`, `Tax.Calculation.customer_details.tax_ids[].type`, `Tax.Transaction.customer_details.tax_ids[].type`, and `TaxId.type`
|
|
123
|
+
* Add support for `payment_method_options` on `ConfirmationTokenCreateParams.testHelpers`
|
|
124
|
+
* Add support for `installments` on `ConfirmationToken.payment_method_options.card`
|
|
125
|
+
* Add support for new values `aw_tin`, `az_tin`, `bd_bin`, `bf_ifu`, `bj_ifu`, `cm_niu`, `cv_nif`, `et_tin`, `kg_tin`, and `la_tin` on enums `CustomerCreateParams.tax_id_data[].type`, `CustomerCreateTaxIdParams.type`, `InvoiceCreatePreviewParams.customer_details.tax_ids[].type`, `Tax.CalculationCreateParams.customer_details.tax_ids[].type`, and `TaxIdCreateParams.type`
|
|
126
|
+
* Add support for `context` on `Event`
|
|
127
|
+
* Add support for new value `affirm` on enums `Invoice.payment_settings.payment_method_types`, `InvoiceCreateParams.payment_settings.payment_method_types`, `InvoiceUpdateParams.payment_settings.payment_method_types`, `Subscription.payment_settings.payment_method_types`, `SubscriptionCreateParams.payment_settings.payment_method_types`, and `SubscriptionUpdateParams.payment_settings.payment_method_types`
|
|
128
|
+
* Change type of `InvoiceLineItem.parent.subscription_item_details.subscription` from `string` to `string | null`
|
|
129
|
+
* Add support for `billie` on `PaymentIntent.payment_method_options`, `PaymentIntentConfirmParams.payment_method_options`, `PaymentIntentCreateParams.payment_method_options`, and `PaymentIntentUpdateParams.payment_method_options`
|
|
130
|
+
* Add support for `pix` on `PaymentMethodConfigurationCreateParams`, `PaymentMethodConfigurationUpdateParams`, and `PaymentMethodConfiguration`
|
|
131
|
+
* Add support for `klarna` on `PaymentMethodDomain`
|
|
132
|
+
* Add support for `pending_reason` on `Refund`
|
|
133
|
+
* Change type of `Tax.CalculationLineItem.reference` from `string | null` to `string`
|
|
134
|
+
* Add support for `aw`, `az`, `bd`, `bf`, `bj`, `cm`, `cv`, `et`, `in`, `kg`, `la`, and `ph` on `Tax.Registration.country_options` and `Tax.RegistrationCreateParams.country_options`
|
|
135
|
+
* Add support for new value `2025-04-30.basil` on enum `WebhookEndpointCreateParams.api_version`
|
|
136
|
+
* [#2202](https://github.com/stripe/stripe-node/pull/2202) Add build scripts to generate source maps
|
|
137
|
+
* [#2169](https://github.com/stripe/stripe-node/pull/2169) Put @types/node as an optional peerDependency
|
|
138
|
+
* [#2164](https://github.com/stripe/stripe-node/pull/2164) Bump micromatch from 4.0.5 to 4.0.8
|
|
139
|
+
* [#2230](https://github.com/stripe/stripe-node/pull/2230) Bump cross-spawn from 7.0.3 to 7.0.6
|
|
140
|
+
|
|
15
141
|
## 18.1.0-beta.3 - 2025-04-17
|
|
16
142
|
* [#2302](https://github.com/stripe/stripe-node/pull/2302) Update generated code for beta
|
|
17
143
|
* Add support for new resources `FxQuote` and `PaymentIntentAmountDetailsLineItem`
|
|
@@ -143,7 +269,6 @@
|
|
|
143
269
|
* Change type of `PaymentAttemptRecord.payment_method_details.custom` and `PaymentRecord.payment_method_details.custom` from `PaymentsPrimitivesPaymentRecordsResourcePaymentMethodCustomDetails | null` to `PaymentsPrimitivesPaymentRecordsResourcePaymentMethodCustomDetails`
|
|
144
270
|
* Change `OrderCreateParams.payment.settings.payment_method_options.wechat_pay.client` and `OrderUpdateParams.payment.settings.payment_method_options.wechat_pay.client` to be optional
|
|
145
271
|
|
|
146
|
-
|
|
147
272
|
## 18.0.0 - 2025-04-01
|
|
148
273
|
* [#2279](https://github.com/stripe/stripe-node/pull/2279) Support for APIs in the new API version 2025-03-31.basil
|
|
149
274
|
|
|
@@ -675,24 +800,6 @@
|
|
|
675
800
|
|
|
676
801
|
### Changes
|
|
677
802
|
* Change `BillingPortal.ConfigurationCreateParams.features.subscription_update.default_allowed_updates` and `BillingPortal.ConfigurationCreateParams.features.subscription_update.products` to be optional
|
|
678
|
-
* [#2195](https://github.com/stripe/stripe-node/pull/2195) Remove parseSnapshotEvent
|
|
679
|
-
* [#2188](https://github.com/stripe/stripe-node/pull/2188) Revert "Add raw_request (#2185)"
|
|
680
|
-
* [#2185](https://github.com/stripe/stripe-node/pull/2185) Add raw_request
|
|
681
|
-
Adds the ability to make raw requests to the Stripe API, by providing an HTTP method and url.
|
|
682
|
-
|
|
683
|
-
Example:
|
|
684
|
-
```node
|
|
685
|
-
import Stripe from 'stripe';
|
|
686
|
-
const stripe = new Stripe('sk_test_...');
|
|
687
|
-
|
|
688
|
-
const response = await stripe.rawRequest(
|
|
689
|
-
'POST',
|
|
690
|
-
'/v1/beta_endpoint',
|
|
691
|
-
{ param: 123 },
|
|
692
|
-
{ apiVersion: '2022-11-15; feature_beta=v3' }
|
|
693
|
-
);
|
|
694
|
-
|
|
695
|
-
```
|
|
696
803
|
|
|
697
804
|
## 16.13.0-beta.1 - 2024-09-18
|
|
698
805
|
* [#2178](https://github.com/stripe/stripe-node/pull/2178) Update generated code for beta
|
|
@@ -2094,8 +2201,13 @@
|
|
|
2094
2201
|
## 12.10.0 - 2023-06-22
|
|
2095
2202
|
* [#1820](https://github.com/stripe/stripe-node/pull/1820) Update generated code
|
|
2096
2203
|
* Add support for `on_behalf_of` on `Mandate`
|
|
2204
|
+
* [#1817](https://github.com/stripe/stripe-node/pull/1817) Update README.md
|
|
2205
|
+
* [#1819](https://github.com/stripe/stripe-node/pull/1819) Update generated code
|
|
2206
|
+
* Release specs are identical.
|
|
2097
2207
|
* [#1813](https://github.com/stripe/stripe-node/pull/1813) Update generated code
|
|
2098
2208
|
* Change type of `Checkout.Session.success_url` from `string` to `string | null`
|
|
2209
|
+
* Change type of `FileCreateParams.file` from `string` to `file`
|
|
2210
|
+
* [#1815](https://github.com/stripe/stripe-node/pull/1815) Generate FileCreateParams
|
|
2099
2211
|
|
|
2100
2212
|
## 12.10.0-beta.2 - 2023-06-15
|
|
2101
2213
|
* [#1818](https://github.com/stripe/stripe-node/pull/1818) Update generated code for beta
|
|
@@ -2212,15 +2324,6 @@
|
|
|
2212
2324
|
* Add support for `tax_breakdown` on `Tax.Calculation.shipping_cost` and `Tax.Transaction.shipping_cost`
|
|
2213
2325
|
* Change type of `TaxRegistrationCreateParams.active_from`, `TaxRegistrationUpdateParams.active_from`, and `TaxRegistrationUpdateParams.expires_at` from `longInteger` to `longInteger | literal('now')`
|
|
2214
2326
|
|
|
2215
|
-
## 12.3.0 - 2023-04-27
|
|
2216
|
-
* [#1770](https://github.com/stripe/stripe-node/pull/1770) Update generated code
|
|
2217
|
-
* Add support for `billing_cycle_anchor` and `proration_behavior` on `Checkout.SessionCreateParams.subscription_data`
|
|
2218
|
-
* Add support for `terminal_id` on `Issuing.Authorization.merchant_data` and `Issuing.Transaction.merchant_data`
|
|
2219
|
-
* Add support for `metadata` on `PaymentIntentCaptureParams`
|
|
2220
|
-
* Add support for `checks` on `SetupAttempt.payment_method_details.card`
|
|
2221
|
-
* Add support for `tax_breakdown` on `Tax.Calculation.shipping_cost` and `Tax.Transaction.shipping_cost`
|
|
2222
|
-
* Change type of `TaxRegistrationCreateParams.active_from`, `TaxRegistrationUpdateParams.active_from`, and `TaxRegistrationUpdateParams.expires_at` from `longInteger` to `longInteger | literal('now')`
|
|
2223
|
-
|
|
2224
2327
|
## 12.3.0 - 2023-04-27
|
|
2225
2328
|
* [#1770](https://github.com/stripe/stripe-node/pull/1770) Update generated code
|
|
2226
2329
|
* Add support for `billing_cycle_anchor` and `proration_behavior` on `Checkout.SessionCreateParams.subscription_data`
|
|
@@ -2543,6 +2646,7 @@ This was added to maintain backwards compatibility during the transition of stri
|
|
|
2543
2646
|
* Add support for new value `BE` on enums `Checkout.Session.payment_method_options.customer_balance.bank_transfer.eu_bank_transfer.country`, `Invoice.payment_settings.payment_method_options.customer_balance.bank_transfer.eu_bank_transfer.country`, `PaymentIntent.payment_method_options.customer_balance.bank_transfer.eu_bank_transfer.country`, and `Subscription.payment_settings.payment_method_options.customer_balance.bank_transfer.eu_bank_transfer.country`
|
|
2544
2647
|
* Add support for new values `cs-CZ`, `el-GR`, `en-CZ`, and `en-GR` on enums `PaymentIntentConfirmParams.payment_method_options.klarna.preferred_locale`, `PaymentIntentCreateParams.payment_method_options.klarna.preferred_locale`, and `PaymentIntentUpdateParams.payment_method_options.klarna.preferred_locale`
|
|
2545
2648
|
* [#1660](https://github.com/stripe/stripe-node/pull/1660) Introduce separate entry point for worker environments
|
|
2649
|
+
* This is technically a breaking change that explicitly defines package entry points and was mistakenly released in a minor version. If your application previously imported other internal files from stripe-node and this change breaks it, please open an issue detailing your use case.
|
|
2546
2650
|
|
|
2547
2651
|
## 11.8.0-beta.1 - 2023-01-19
|
|
2548
2652
|
* [#1662](https://github.com/stripe/stripe-node/pull/1662) API Updates for beta branch
|
|
@@ -2652,6 +2756,63 @@ This release includes breaking changes resulting from moving to use the new API
|
|
|
2652
2756
|
* [#1615](https://github.com/stripe/stripe-node/pull/1615) API Updates
|
|
2653
2757
|
* ⚠️ Remove support for `tos_shown_and_accepted` on `Checkout.SessionCreateParams.payment_method_options.paynow`. The property was mistakenly released and never worked.
|
|
2654
2758
|
|
|
2759
|
+
### ⚠️ Changed
|
|
2760
|
+
* Drop support for Node.js 8 and 10. We now support Node.js 12+. ((#1579)
|
|
2761
|
+
* Change `StripeSignatureVerificationError` to have `header` and `payload` fields instead of `detail`. To access these properties, use `err.header` and `err.payload` instead of `err.detail.header` and `err.detail.payload`. (#1574)
|
|
2762
|
+
|
|
2763
|
+
### ⚠️ Removed
|
|
2764
|
+
* Remove `Orders` resource. (#1580)
|
|
2765
|
+
* Remove `SKU` resource (#1583)
|
|
2766
|
+
* Remove deprecated `Checkout.SessionCreateParams.subscription_data.items`. (#1580)
|
|
2767
|
+
* Remove deprecated configuration setter methods (`setHost`, `setProtocol`, `setPort`, `setApiVersion`, `setApiKey`, `setTimeout`, `setAppInfo`, `setHttpAgent`, `setMaxNetworkRetries`, and `setTelemetryEnabled`). (#1597)
|
|
2768
|
+
|
|
2769
|
+
Use the config object to set these options instead, for example:
|
|
2770
|
+
```typescript
|
|
2771
|
+
const stripe = Stripe('sk_test_...', {
|
|
2772
|
+
apiVersion: '2019-08-08',
|
|
2773
|
+
maxNetworkRetries: 1,
|
|
2774
|
+
httpAgent: new ProxyAgent(process.env.http_proxy),
|
|
2775
|
+
timeout: 1000,
|
|
2776
|
+
host: 'api.example.com',
|
|
2777
|
+
port: 123,
|
|
2778
|
+
telemetry: true,
|
|
2779
|
+
});
|
|
2780
|
+
```
|
|
2781
|
+
* Remove deprecated basic method definitions. (#1600)
|
|
2782
|
+
Use basic methods defined on the resource instead.
|
|
2783
|
+
```typescript
|
|
2784
|
+
// Before
|
|
2785
|
+
basicMethods: true
|
|
2786
|
+
|
|
2787
|
+
// After
|
|
2788
|
+
create: stripeMethod({
|
|
2789
|
+
method: 'POST',
|
|
2790
|
+
fullPath: '/v1/resource',
|
|
2791
|
+
}),
|
|
2792
|
+
list: stripeMethod({
|
|
2793
|
+
method: 'GET',
|
|
2794
|
+
methodType: 'list',
|
|
2795
|
+
fullPath: '/v1/resource',
|
|
2796
|
+
}),
|
|
2797
|
+
retrieve: stripeMethod({
|
|
2798
|
+
method: 'GET',
|
|
2799
|
+
fullPath: '/v1/resource/{id}',
|
|
2800
|
+
}),
|
|
2801
|
+
update: stripeMethod({
|
|
2802
|
+
method: 'POST',
|
|
2803
|
+
fullPath: '/v1/resource/{id}',
|
|
2804
|
+
}),
|
|
2805
|
+
// Avoid 'delete' keyword in JS
|
|
2806
|
+
del: stripeMethod({
|
|
2807
|
+
method: 'DELETE',
|
|
2808
|
+
fullPath: '/v1/resource/{id}',
|
|
2809
|
+
}),
|
|
2810
|
+
```
|
|
2811
|
+
* Remove deprecated option names. Use the following option names instead (`OLD`->`NEW`): `api_key`->`apiKey`, `idempotency_key`->`idempotencyKey`, `stripe_account`->`stripeAccount`, `stripe_version`->`apiVersion`, `stripeVersion`->`apiVersion`. (#1600)
|
|
2812
|
+
* Remove `charges` field on `PaymentIntent` and replace it with `latest_charge`. (#1614 )
|
|
2813
|
+
* Remove deprecated `amount` field on `Checkout.Session.LineItem`. (#1614 )
|
|
2814
|
+
* Remove support for `tos_shown_and_accepted` on `Checkout.Session.PaymentMethodOptions.Paynow`. (#1614 )
|
|
2815
|
+
|
|
2655
2816
|
## 10.18.0-beta.1 - 2022-11-10
|
|
2656
2817
|
* [#1616](https://github.com/stripe/stripe-node/pull/1616) API Updates for beta branch
|
|
2657
2818
|
* Updated stable APIs to the latest version
|
|
@@ -2845,15 +3006,48 @@ This release includes breaking changes resulting from moving to use the new API
|
|
|
2845
3006
|
|
|
2846
3007
|
## 10.0.0 - 2022-08-02
|
|
2847
3008
|
|
|
2848
|
-
|
|
3009
|
+
This release includes breaking changes resulting from:
|
|
2849
3010
|
|
|
2850
|
-
|
|
3011
|
+
* Moving to use the new API version "2022-08-01". To learn more about these changes to Stripe products, see https://stripe.com/docs/upgrades#2022-08-01
|
|
3012
|
+
* Cleaning up the SDK to remove deprecated/unused APIs and rename classes/methods/properties to sync with product APIs. Read more detailed description at https://github.com/stripe/stripe-node/wiki/Migration-guide-for-v10.
|
|
2851
3013
|
|
|
2852
3014
|
"⚠️" symbol highlights breaking changes.
|
|
2853
3015
|
|
|
2854
3016
|
* [#1497](https://github.com/stripe/stripe-node/pull/1497) API Updates
|
|
2855
3017
|
* [#1493](https://github.com/stripe/stripe-node/pull/1493) Next major release changes
|
|
2856
3018
|
|
|
3019
|
+
### Added
|
|
3020
|
+
* Add support for new value `invalid_tos_acceptance` on enums `Account.future_requirements.errors[].code`, `Account.requirements.errors[].code`, `Capability.future_requirements.errors[].code`, `Capability.requirements.errors[].code`, `Person.future_requirements.errors[].code`, and `Person.requirements.errors[].code`
|
|
3021
|
+
* Add support for `shipping_cost` and `shipping_details` on `Checkout.Session`
|
|
3022
|
+
|
|
3023
|
+
### ⚠️ Changed
|
|
3024
|
+
* Change type of `business_profile`, `business_type`, `country`, `default_currency`, and `settings` properties on `Account` resource to be nullable.
|
|
3025
|
+
* Change type of `currency` property on `Checkout.Session` resource from `string` to `'cad' | 'usd'`.
|
|
3026
|
+
* Change location of TypeScript definitions for `CreditNoteLineItemListPreviewParams`, `CreditNoteLineItemListPreviewParams.Line`, `CreditNoteLineItemListPreviewParams.Line.Type`, and `CreditNoteLineItemListPreviewParams.Line.Reason` interfaces from `CreditNoteLineItems.d.ts` to `CreditNotes.d.ts`.
|
|
3027
|
+
* Change type of `address`, `currency`, `delinquent`, `discount`, `invoice_prefix`, `name`, `phone`, and `preferred_locales` properties on `Customer` resource to be nullable.
|
|
3028
|
+
* Rename `InvoiceRetrieveUpcomingParams` to `InvoiceListUpcomingLinesParams`.
|
|
3029
|
+
|
|
3030
|
+
### ⚠️ Removed
|
|
3031
|
+
* Remove for `AlipayAccount`, `DeletedAlipayAccount`, `BitcoinReceiver`, `DeletedBitcoinReceiver`, `BitcoinTransaction`, and `BitcoinTransactionListParams` definitions.
|
|
3032
|
+
* Remove `AlipayAccount` and `BitcoinReceiver` from `CustomerSource`.
|
|
3033
|
+
* Remove `Stripe.DeletedAlipayAccount` and `Stripe.DeletedBitcoinReceiver` from possible values of `source` property in `PaymentIntent`.
|
|
3034
|
+
* Remove `IssuerFraudRecord`, `IssuerFraudRecordRetrieveParams`, `IssuerFraudRecordListParams`, and `IssuerFraudRecordsResource`, definitions.
|
|
3035
|
+
* Remove `treasury.received_credit.reversed` webhook event constant. Please use `treasury.received_credit.returned` instead.
|
|
3036
|
+
* Remove `order.payment_failed`, `transfer.failed`, and `transfer.paid`. The events were deprecated.
|
|
3037
|
+
* Remove `retrieveDetails` method from `Issuing.Card` resource. The method was unsupported. Read more at https://stripe.com/docs/issuing/cards/virtual.
|
|
3038
|
+
* Remove `Issuing.CardDetails` and `CardRetrieveDetailsParams` definition.
|
|
3039
|
+
* Remove `IssuerFraudRecords` resource.
|
|
3040
|
+
* Remove `Recipient` resource and`recipient` property from `Card` resource.
|
|
3041
|
+
* Remove `InvoiceMarkUncollectibleParams` definition.
|
|
3042
|
+
* Remove deprecated `Stripe.Errors` and `StripeError` (and derived `StripeCardError`, `StripeInvalidRequestError`, `StripeAPIError`, `StripeAuthenticationError`, `StripePermissionError`, `StripeRateLimitError`, `StripeConnectionError`, `StripeSignatureVerificationError`, `StripeIdempotencyError`, and `StripeInvalidGrantError`) definitions.
|
|
3043
|
+
* Remove `redirect_url` from `LoginLinks` definition. The property is no longer supported.
|
|
3044
|
+
* Remove `LineItemListParams` definition. The interface was no longer in use.
|
|
3045
|
+
|
|
3046
|
+
### ⚠️ Renamed
|
|
3047
|
+
* Rename `listUpcomingLineItems` method on `Invoice` resource to `listUpcomingLines`.
|
|
3048
|
+
* Rename `InvoiceLineItemListUpcomingParams` to `InvoiceListUpcomingLinesParams`.
|
|
3049
|
+
* Rename `InvoiceRetrieveUpcomingParams` to `InvoiceListUpcomingLinesParams`.
|
|
3050
|
+
|
|
2857
3051
|
## 9.16.0 - 2022-07-26
|
|
2858
3052
|
* [#1492](https://github.com/stripe/stripe-node/pull/1492) API Updates
|
|
2859
3053
|
* Add support for new value `exempted` on enums `Charge.payment_method_details.card.three_d_secure.result` and `SetupAttempt.payment_method_details.card.three_d_secure.result`
|
|
@@ -5048,6 +5242,10 @@ Pull requests included in this release (cf. [#606](https://github.com/stripe/str
|
|
|
5048
5242
|
|
|
5049
5243
|
- [BUGFIX] Fix incorrect deleteDiscount method & related spec(s)
|
|
5050
5244
|
|
|
5245
|
+
### 2.2.1 - 2013-12-01
|
|
5246
|
+
|
|
5247
|
+
- [BUGFIX] Fix user-agent header issue (see issue #75)
|
|
5248
|
+
|
|
5051
5249
|
## 2.2.1 - 2013-12-01
|
|
5052
5250
|
|
|
5053
5251
|
- [BUGFIX] Fix user-agent header issue (see issue #75)
|
package/OPENAPI_VERSION
CHANGED
|
@@ -1 +1 @@
|
|
|
1
|
-
|
|
1
|
+
v1773
|
package/README.md
CHANGED
|
@@ -523,23 +523,23 @@ const stripe = new Stripe('sk_test_...', {
|
|
|
523
523
|
});
|
|
524
524
|
```
|
|
525
525
|
|
|
526
|
-
###
|
|
526
|
+
### Public Preview SDKs
|
|
527
527
|
|
|
528
|
-
Stripe has features in the
|
|
529
|
-
We would love for you to try these
|
|
530
|
-
The beta versions can be installed in one of two ways
|
|
528
|
+
Stripe has features in the [public preview phase](https://docs.stripe.com/release-phases) that can be accessed via versions of this package that have the `-beta.X` suffix like `15.2.0-beta.2`.
|
|
529
|
+
We would love for you to try these as we incrementally release new features and improve them based on your feedback.
|
|
531
530
|
|
|
532
|
-
|
|
533
|
-
- To install a specific beta version, replace the term "beta" in the above command with the version number like `npm install stripe@1.2.3-beta.1 --save`
|
|
531
|
+
To install, choose the version that includes support for the preview feature you are interested in by reviewing the [releases page](https://github.com/stripe/stripe-node/releases/) and use it in the below command
|
|
534
532
|
|
|
535
|
-
|
|
536
|
-
|
|
533
|
+
```
|
|
534
|
+
npm install stripe@<replace-with-the-version-of-your-choice> --save
|
|
535
|
+
```
|
|
537
536
|
|
|
538
|
-
|
|
537
|
+
> **Note**
|
|
538
|
+
> There can be breaking changes between two versions of the public preview SDKs without a bump in the major version. Therefore we recommend pinning the package version to a specific version in your package.json file. This way you can install the same version each time without breaking changes unless you are intentionally looking for the latest public preview SDK.
|
|
539
539
|
|
|
540
|
-
The versions tab on the [stripe page on npm](https://www.npmjs.com/package/stripe) lists the current tags in use. The `beta` tag here corresponds to the the latest
|
|
540
|
+
The versions tab on the [stripe page on npm](https://www.npmjs.com/package/stripe) lists the current tags in use. The `beta` tag here corresponds to the the latest public preview SDK.
|
|
541
541
|
|
|
542
|
-
|
|
542
|
+
Some preview features require a name and version to be set in the `Stripe-Version` header like `feature_beta=v3`. If your preview feature has this requirement, use the `apiVersion` property of `config` object to set it:
|
|
543
543
|
|
|
544
544
|
```js
|
|
545
545
|
const stripe = new Stripe('sk_test_...', {
|
package/VERSION
CHANGED
|
@@ -1 +1 @@
|
|
|
1
|
-
18.
|
|
1
|
+
18.3.0-beta.1
|
package/cjs/RequestSender.js
CHANGED
package/cjs/StripeResource.js
CHANGED
|
@@ -108,7 +108,7 @@ StripeResource.prototype = {
|
|
|
108
108
|
const data = encode(Object.assign({}, dataFromArgs, overrideData));
|
|
109
109
|
const options = (0, utils_js_1.getOptionsFromArgs)(args);
|
|
110
110
|
const host = options.host || spec.host;
|
|
111
|
-
const streaming = !!spec.streaming;
|
|
111
|
+
const streaming = !!spec.streaming || !!options.streaming;
|
|
112
112
|
// Validate that there are no more args.
|
|
113
113
|
if (args.filter((x) => x != null).length) {
|
|
114
114
|
throw new Error(`Stripe: Unknown arguments (${args}). Did you mean to pass an options object? See https://github.com/stripe/stripe-node/wiki/Passing-Options. (on API request to ${requestMethod} \`${path}\`)`);
|
package/cjs/apiVersion.js
CHANGED
|
@@ -27,6 +27,10 @@ exports.Subscriptions = StripeResource_js_1.StripeResource.extend({
|
|
|
27
27
|
method: 'DELETE',
|
|
28
28
|
fullPath: '/v1/subscriptions/{subscription_exposed_id}/discount',
|
|
29
29
|
}),
|
|
30
|
+
migrate: stripeMethod({
|
|
31
|
+
method: 'POST',
|
|
32
|
+
fullPath: '/v1/subscriptions/{subscription}/migrate',
|
|
33
|
+
}),
|
|
30
34
|
resume: stripeMethod({
|
|
31
35
|
method: 'POST',
|
|
32
36
|
fullPath: '/v1/subscriptions/{subscription}/resume',
|
|
@@ -0,0 +1,25 @@
|
|
|
1
|
+
"use strict";
|
|
2
|
+
// File generated from our OpenAPI spec
|
|
3
|
+
Object.defineProperty(exports, "__esModule", { value: true });
|
|
4
|
+
exports.OffSessionPayments = void 0;
|
|
5
|
+
const StripeResource_js_1 = require("../../../StripeResource.js");
|
|
6
|
+
const stripeMethod = StripeResource_js_1.StripeResource.method;
|
|
7
|
+
exports.OffSessionPayments = StripeResource_js_1.StripeResource.extend({
|
|
8
|
+
create: stripeMethod({
|
|
9
|
+
method: 'POST',
|
|
10
|
+
fullPath: '/v2/payments/off_session_payments',
|
|
11
|
+
}),
|
|
12
|
+
retrieve: stripeMethod({
|
|
13
|
+
method: 'GET',
|
|
14
|
+
fullPath: '/v2/payments/off_session_payments/{id}',
|
|
15
|
+
}),
|
|
16
|
+
list: stripeMethod({
|
|
17
|
+
method: 'GET',
|
|
18
|
+
fullPath: '/v2/payments/off_session_payments',
|
|
19
|
+
methodType: 'list',
|
|
20
|
+
}),
|
|
21
|
+
cancel: stripeMethod({
|
|
22
|
+
method: 'POST',
|
|
23
|
+
fullPath: '/v2/payments/off_session_payments/{id}/cancel',
|
|
24
|
+
}),
|
|
25
|
+
});
|
package/cjs/resources.js
CHANGED
|
@@ -2,7 +2,7 @@
|
|
|
2
2
|
// File generated from our OpenAPI spec
|
|
3
3
|
Object.defineProperty(exports, "__esModule", { value: true });
|
|
4
4
|
exports.ShippingRates = exports.SetupIntents = exports.SetupAttempts = exports.Reviews = exports.Refunds = exports.Quotes = exports.PromotionCodes = exports.Products = exports.Prices = exports.Plans = exports.Payouts = exports.PaymentRecords = exports.PaymentMethods = exports.PaymentMethodDomains = exports.PaymentMethodConfigurations = exports.PaymentLinks = exports.PaymentIntents = exports.PaymentAttemptRecords = exports.Orders = exports.OAuth = exports.Margins = exports.Mandates = exports.Invoices = exports.InvoiceRenderingTemplates = exports.InvoiceItems = exports.FxQuotes = exports.Files = exports.FileLinks = exports.ExternalAccounts = exports.ExchangeRates = exports.Events = exports.EphemeralKeys = exports.Disputes = exports.Customers = exports.CustomerSessions = exports.CreditNotes = exports.Coupons = exports.CountrySpecs = exports.ConfirmationTokens = exports.Charges = exports.BalanceTransactions = exports.BalanceSettings = exports.Balance = exports.ApplicationFees = exports.ApplePayDomains = exports.Accounts = exports.AccountSessions = exports.AccountNotices = exports.AccountLinks = exports.Account = void 0;
|
|
5
|
-
exports.V2 = exports.Treasury = exports.TestHelpers = exports.Terminal = exports.Tax = exports.Sigma = exports.Reporting = exports.Radar = exports.Privacy = exports.Issuing = exports.Identity = exports.
|
|
5
|
+
exports.V2 = exports.Treasury = exports.TestHelpers = exports.Terminal = exports.Tax = exports.Sigma = exports.Reporting = exports.Radar = exports.Privacy = exports.Issuing = exports.Identity = exports.Forwarding = exports.FinancialConnections = exports.Entitlements = exports.Climate = exports.Checkout = exports.Capital = exports.BillingPortal = exports.Billing = exports.Apps = exports.WebhookEndpoints = exports.Transfers = exports.Topups = exports.Tokens = exports.TaxRates = exports.TaxIds = exports.TaxCodes = exports.Subscriptions = exports.SubscriptionSchedules = exports.SubscriptionItems = exports.Sources = void 0;
|
|
6
6
|
const ResourceNamespace_js_1 = require("./ResourceNamespace.js");
|
|
7
7
|
const AccountLinks_js_1 = require("./resources/V2/Core/AccountLinks.js");
|
|
8
8
|
const Accounts_js_1 = require("./resources/FinancialConnections/Accounts.js");
|
|
@@ -16,8 +16,7 @@ const Authorizations_js_2 = require("./resources/Issuing/Authorizations.js");
|
|
|
16
16
|
const Calculations_js_1 = require("./resources/Tax/Calculations.js");
|
|
17
17
|
const Cardholders_js_1 = require("./resources/Issuing/Cardholders.js");
|
|
18
18
|
const Cards_js_1 = require("./resources/TestHelpers/Issuing/Cards.js");
|
|
19
|
-
const Cards_js_2 = require("./resources/
|
|
20
|
-
const Cards_js_3 = require("./resources/Issuing/Cards.js");
|
|
19
|
+
const Cards_js_2 = require("./resources/Issuing/Cards.js");
|
|
21
20
|
const Configurations_js_1 = require("./resources/BillingPortal/Configurations.js");
|
|
22
21
|
const Configurations_js_2 = require("./resources/Terminal/Configurations.js");
|
|
23
22
|
const ConfirmationTokens_js_1 = require("./resources/TestHelpers/ConfirmationTokens.js");
|
|
@@ -57,6 +56,7 @@ const MeterEventStream_js_1 = require("./resources/V2/Billing/MeterEventStream.j
|
|
|
57
56
|
const MeterEvents_js_1 = require("./resources/Billing/MeterEvents.js");
|
|
58
57
|
const MeterEvents_js_2 = require("./resources/V2/Billing/MeterEvents.js");
|
|
59
58
|
const Meters_js_1 = require("./resources/Billing/Meters.js");
|
|
59
|
+
const OffSessionPayments_js_1 = require("./resources/V2/Payments/OffSessionPayments.js");
|
|
60
60
|
const Orders_js_1 = require("./resources/Climate/Orders.js");
|
|
61
61
|
const OutboundPaymentQuotes_js_1 = require("./resources/V2/MoneyManagement/OutboundPaymentQuotes.js");
|
|
62
62
|
const OutboundPayments_js_1 = require("./resources/TestHelpers/Treasury/OutboundPayments.js");
|
|
@@ -100,11 +100,10 @@ const TransactionEntries_js_1 = require("./resources/Treasury/TransactionEntries
|
|
|
100
100
|
const TransactionEntries_js_2 = require("./resources/V2/MoneyManagement/TransactionEntries.js");
|
|
101
101
|
const Transactions_js_1 = require("./resources/TestHelpers/Issuing/Transactions.js");
|
|
102
102
|
const Transactions_js_2 = require("./resources/FinancialConnections/Transactions.js");
|
|
103
|
-
const Transactions_js_3 = require("./resources/
|
|
104
|
-
const Transactions_js_4 = require("./resources/
|
|
105
|
-
const Transactions_js_5 = require("./resources/
|
|
106
|
-
const Transactions_js_6 = require("./resources/
|
|
107
|
-
const Transactions_js_7 = require("./resources/V2/MoneyManagement/Transactions.js");
|
|
103
|
+
const Transactions_js_3 = require("./resources/Issuing/Transactions.js");
|
|
104
|
+
const Transactions_js_4 = require("./resources/Tax/Transactions.js");
|
|
105
|
+
const Transactions_js_5 = require("./resources/Treasury/Transactions.js");
|
|
106
|
+
const Transactions_js_6 = require("./resources/V2/MoneyManagement/Transactions.js");
|
|
108
107
|
const UsBankAccounts_js_1 = require("./resources/V2/Core/Vault/UsBankAccounts.js");
|
|
109
108
|
const ValueListItems_js_1 = require("./resources/Radar/ValueListItems.js");
|
|
110
109
|
const ValueLists_js_1 = require("./resources/Radar/ValueLists.js");
|
|
@@ -272,10 +271,6 @@ exports.FinancialConnections = (0, ResourceNamespace_js_1.resourceNamespace)('fi
|
|
|
272
271
|
exports.Forwarding = (0, ResourceNamespace_js_1.resourceNamespace)('forwarding', {
|
|
273
272
|
Requests: Requests_js_1.Requests,
|
|
274
273
|
});
|
|
275
|
-
exports.GiftCards = (0, ResourceNamespace_js_1.resourceNamespace)('giftCards', {
|
|
276
|
-
Cards: Cards_js_2.Cards,
|
|
277
|
-
Transactions: Transactions_js_3.Transactions,
|
|
278
|
-
});
|
|
279
274
|
exports.Identity = (0, ResourceNamespace_js_1.resourceNamespace)('identity', {
|
|
280
275
|
VerificationReports: VerificationReports_js_1.VerificationReports,
|
|
281
276
|
VerificationSessions: VerificationSessions_js_1.VerificationSessions,
|
|
@@ -283,7 +278,7 @@ exports.Identity = (0, ResourceNamespace_js_1.resourceNamespace)('identity', {
|
|
|
283
278
|
exports.Issuing = (0, ResourceNamespace_js_1.resourceNamespace)('issuing', {
|
|
284
279
|
Authorizations: Authorizations_js_2.Authorizations,
|
|
285
280
|
Cardholders: Cardholders_js_1.Cardholders,
|
|
286
|
-
Cards:
|
|
281
|
+
Cards: Cards_js_2.Cards,
|
|
287
282
|
CreditUnderwritingRecords: CreditUnderwritingRecords_js_1.CreditUnderwritingRecords,
|
|
288
283
|
DisputeSettlementDetails: DisputeSettlementDetails_js_1.DisputeSettlementDetails,
|
|
289
284
|
Disputes: Disputes_js_1.Disputes,
|
|
@@ -291,7 +286,7 @@ exports.Issuing = (0, ResourceNamespace_js_1.resourceNamespace)('issuing', {
|
|
|
291
286
|
PersonalizationDesigns: PersonalizationDesigns_js_2.PersonalizationDesigns,
|
|
292
287
|
PhysicalBundles: PhysicalBundles_js_1.PhysicalBundles,
|
|
293
288
|
Tokens: Tokens_js_1.Tokens,
|
|
294
|
-
Transactions:
|
|
289
|
+
Transactions: Transactions_js_3.Transactions,
|
|
295
290
|
});
|
|
296
291
|
exports.Privacy = (0, ResourceNamespace_js_1.resourceNamespace)('privacy', {
|
|
297
292
|
RedactionJobs: RedactionJobs_js_1.RedactionJobs,
|
|
@@ -314,7 +309,7 @@ exports.Tax = (0, ResourceNamespace_js_1.resourceNamespace)('tax', {
|
|
|
314
309
|
Forms: Forms_js_1.Forms,
|
|
315
310
|
Registrations: Registrations_js_1.Registrations,
|
|
316
311
|
Settings: Settings_js_1.Settings,
|
|
317
|
-
Transactions:
|
|
312
|
+
Transactions: Transactions_js_4.Transactions,
|
|
318
313
|
});
|
|
319
314
|
exports.Terminal = (0, ResourceNamespace_js_1.resourceNamespace)('terminal', {
|
|
320
315
|
Configurations: Configurations_js_2.Configurations,
|
|
@@ -355,7 +350,7 @@ exports.Treasury = (0, ResourceNamespace_js_1.resourceNamespace)('treasury', {
|
|
|
355
350
|
ReceivedCredits: ReceivedCredits_js_2.ReceivedCredits,
|
|
356
351
|
ReceivedDebits: ReceivedDebits_js_2.ReceivedDebits,
|
|
357
352
|
TransactionEntries: TransactionEntries_js_1.TransactionEntries,
|
|
358
|
-
Transactions:
|
|
353
|
+
Transactions: Transactions_js_5.Transactions,
|
|
359
354
|
});
|
|
360
355
|
exports.V2 = (0, ResourceNamespace_js_1.resourceNamespace)('v2', {
|
|
361
356
|
Billing: (0, ResourceNamespace_js_1.resourceNamespace)('billing', {
|
|
@@ -388,7 +383,10 @@ exports.V2 = (0, ResourceNamespace_js_1.resourceNamespace)('v2', {
|
|
|
388
383
|
ReceivedCredits: ReceivedCredits_js_3.ReceivedCredits,
|
|
389
384
|
ReceivedDebits: ReceivedDebits_js_3.ReceivedDebits,
|
|
390
385
|
TransactionEntries: TransactionEntries_js_2.TransactionEntries,
|
|
391
|
-
Transactions:
|
|
386
|
+
Transactions: Transactions_js_6.Transactions,
|
|
387
|
+
}),
|
|
388
|
+
Payment: (0, ResourceNamespace_js_1.resourceNamespace)('payment', {
|
|
389
|
+
OffSessionPayments: OffSessionPayments_js_1.OffSessionPayments,
|
|
392
390
|
}),
|
|
393
391
|
TestHelper: (0, ResourceNamespace_js_1.resourceNamespace)('testHelper', {
|
|
394
392
|
FinancialAddresses: FinancialAddresses_js_2.FinancialAddresses,
|
package/cjs/stripe.core.js
CHANGED
|
@@ -36,7 +36,7 @@ const ALLOWED_CONFIG_PROPERTIES = [
|
|
|
36
36
|
];
|
|
37
37
|
const defaultRequestSenderFactory = (stripe) => new RequestSender_js_1.RequestSender(stripe, StripeResource_js_1.StripeResource.MAX_BUFFERED_REQUEST_METRICS);
|
|
38
38
|
function createStripe(platformFunctions, requestSender = defaultRequestSenderFactory) {
|
|
39
|
-
Stripe.PACKAGE_VERSION = '18.
|
|
39
|
+
Stripe.PACKAGE_VERSION = '18.3.0-beta.1';
|
|
40
40
|
Stripe.USER_AGENT = Object.assign({ bindings_version: Stripe.PACKAGE_VERSION, lang: 'node', publisher: 'stripe', uname: null, typescript: false }, (0, utils_js_1.determineProcessUserAgentProperties)());
|
|
41
41
|
Stripe.StripeResource = StripeResource_js_1.StripeResource;
|
|
42
42
|
Stripe.resources = resources;
|
package/cjs/utils.js
CHANGED
|
@@ -13,6 +13,7 @@ const OPTIONS_KEYS = [
|
|
|
13
13
|
'authenticator',
|
|
14
14
|
'stripeContext',
|
|
15
15
|
'additionalHeaders',
|
|
16
|
+
'streaming',
|
|
16
17
|
];
|
|
17
18
|
function isOptionsHash(o) {
|
|
18
19
|
return (o &&
|
|
@@ -107,6 +108,7 @@ function getOptionsFromArgs(args) {
|
|
|
107
108
|
host: null,
|
|
108
109
|
headers: {},
|
|
109
110
|
settings: {},
|
|
111
|
+
streaming: false,
|
|
110
112
|
};
|
|
111
113
|
if (args.length > 0) {
|
|
112
114
|
const arg = args[args.length - 1];
|
|
@@ -159,6 +161,9 @@ function getOptionsFromArgs(args) {
|
|
|
159
161
|
if (params.additionalHeaders) {
|
|
160
162
|
opts.headers = params.additionalHeaders;
|
|
161
163
|
}
|
|
164
|
+
if (params.streaming) {
|
|
165
|
+
opts.streaming = true;
|
|
166
|
+
}
|
|
162
167
|
}
|
|
163
168
|
}
|
|
164
169
|
return opts;
|
package/esm/RequestSender.js
CHANGED
|
@@ -307,8 +307,8 @@ export class RequestSender {
|
|
|
307
307
|
queryData: {},
|
|
308
308
|
authenticator,
|
|
309
309
|
headers,
|
|
310
|
-
host:
|
|
311
|
-
streaming:
|
|
310
|
+
host: calculatedOptions.host,
|
|
311
|
+
streaming: !!calculatedOptions.streaming,
|
|
312
312
|
settings: {},
|
|
313
313
|
usage: ['raw_request'],
|
|
314
314
|
};
|
package/esm/StripeResource.js
CHANGED
|
@@ -104,7 +104,7 @@ StripeResource.prototype = {
|
|
|
104
104
|
const data = encode(Object.assign({}, dataFromArgs, overrideData));
|
|
105
105
|
const options = getOptionsFromArgs(args);
|
|
106
106
|
const host = options.host || spec.host;
|
|
107
|
-
const streaming = !!spec.streaming;
|
|
107
|
+
const streaming = !!spec.streaming || !!options.streaming;
|
|
108
108
|
// Validate that there are no more args.
|
|
109
109
|
if (args.filter((x) => x != null).length) {
|
|
110
110
|
throw new Error(`Stripe: Unknown arguments (${args}). Did you mean to pass an options object? See https://github.com/stripe/stripe-node/wiki/Passing-Options. (on API request to ${requestMethod} \`${path}\`)`);
|