stripe 13.3.0 → 13.4.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.
- package/CHANGELOG.md +9 -0
- package/README.md +6 -0
- package/VERSION +1 -1
- package/cjs/resources/AccountSessions.js +9 -0
- package/cjs/resources.js +4 -2
- package/cjs/stripe.core.js +1 -1
- package/esm/resources/AccountSessions.js +6 -0
- package/esm/resources.js +1 -0
- package/esm/stripe.core.js +1 -1
- package/package.json +1 -1
- package/types/AccountSessions.d.ts +62 -0
- package/types/AccountSessionsResource.d.ts +50 -0
- package/types/AccountsResource.d.ts +4 -2
- package/types/BalanceTransactions.d.ts +7 -1
- package/types/BalanceTransactionsResource.d.ts +1 -1
- package/types/BankAccounts.d.ts +1 -1
- package/types/Checkout/Sessions.d.ts +1 -1
- package/types/Checkout/SessionsResource.d.ts +2 -2
- package/types/Events.d.ts +198 -1
- package/types/Invoices.d.ts +9 -1
- package/types/PaymentLinks.d.ts +9 -0
- package/types/Persons.d.ts +1 -1
- package/types/Reporting/ReportRunsResource.d.ts +1 -0
- package/types/TokensResource.d.ts +39 -0
- package/types/index.d.ts +3 -0
package/CHANGELOG.md
CHANGED
|
@@ -1,5 +1,14 @@
|
|
|
1
1
|
# Changelog
|
|
2
2
|
|
|
3
|
+
## 13.4.0 - 2023-08-31
|
|
4
|
+
* [#1884](https://github.com/stripe/stripe-node/pull/1884) Update generated code
|
|
5
|
+
* Add support for new resource `AccountSession`
|
|
6
|
+
* Add support for `create` method on resource `AccountSession`
|
|
7
|
+
* Add support for new values `obligation_inbound`, `obligation_outbound`, `obligation_payout_failure`, `obligation_payout`, `obligation_reversal_inbound`, and `obligation_reversal_outbound` on enum `BalanceTransaction.type`
|
|
8
|
+
* Change type of `Event.type` from `string` to `enum`
|
|
9
|
+
* Add support for `application` on `PaymentLink`
|
|
10
|
+
* Add support for new value `obligation` on enum `Reporting.ReportRunCreateParams.parameters.reporting_category`
|
|
11
|
+
|
|
3
12
|
## 13.3.0 - 2023-08-24
|
|
4
13
|
* [#1879](https://github.com/stripe/stripe-node/pull/1879) Update generated code
|
|
5
14
|
* Add support for `retention` on `BillingPortal.Session.flow.subscription_cancel` and `BillingPortal.SessionCreateParams.flow_data.subscription_cancel`
|
package/README.md
CHANGED
|
@@ -118,6 +118,12 @@ const paymentIntent: Stripe.PaymentIntent = await stripe.paymentIntents.retrieve
|
|
|
118
118
|
const customerEmail: string = (paymentIntent.customer as Stripe.Customer).email;
|
|
119
119
|
```
|
|
120
120
|
|
|
121
|
+
#### Typescript and the stripe-node versioning policy
|
|
122
|
+
|
|
123
|
+
The Typescript types in stripe-node always reflect the latest shape of the Stripe API. When the Stripe API changes in a [backwards-incompatible way](https://stripe.com/docs/upgrades#what-changes-does-stripe-consider-to-be-backwards-compatible), there is a new Stripe API version, and we release a new major version of stripe-node. Sometimes, though, the Stripe API changes in a way that weakens the guarantees provided by the Typescript types, but that cannot result in any backwards incompatibility at runtime. For example, we might add a new enum value on a response, along with a new parameter to a request. Adding a new value to a response enum weakens the Typescript type. However, if the new enum value is only returned when the new parameter is provided, this cannot break any existing usages and so would not be considered a breaking API change. In stripe-node, we do NOT consider such changes to be breaking under our current versioning policy. This means that you might see new type errors from Typescript as you upgrade minor versions of stripe-node, that you can resolve by adding additional type guards.
|
|
124
|
+
|
|
125
|
+
Please feel welcome to share your thoughts about the versioning policy in a Github issue. For now, we judge it to be better than the two alternatives: outdated, inaccurate types, or vastly more frequent major releases, which would distract from any future breaking changes with potentially more disruptive runtime implications.
|
|
126
|
+
|
|
121
127
|
### Using Promises
|
|
122
128
|
|
|
123
129
|
Every method returns a chainable promise which can be used instead of a regular
|
package/VERSION
CHANGED
|
@@ -1 +1 @@
|
|
|
1
|
-
13.
|
|
1
|
+
13.4.0
|
|
@@ -0,0 +1,9 @@
|
|
|
1
|
+
"use strict";
|
|
2
|
+
// File generated from our OpenAPI spec
|
|
3
|
+
Object.defineProperty(exports, "__esModule", { value: true });
|
|
4
|
+
exports.AccountSessions = void 0;
|
|
5
|
+
const StripeResource_js_1 = require("../StripeResource.js");
|
|
6
|
+
const stripeMethod = StripeResource_js_1.StripeResource.method;
|
|
7
|
+
exports.AccountSessions = StripeResource_js_1.StripeResource.extend({
|
|
8
|
+
create: stripeMethod({ method: 'POST', fullPath: '/v1/account_sessions' }),
|
|
9
|
+
});
|
package/cjs/resources.js
CHANGED
|
@@ -1,8 +1,8 @@
|
|
|
1
1
|
"use strict";
|
|
2
2
|
// File generated from our OpenAPI spec
|
|
3
3
|
Object.defineProperty(exports, "__esModule", { value: true });
|
|
4
|
-
exports.
|
|
5
|
-
exports.Treasury = exports.TestHelpers = exports.Terminal = exports.Tax = exports.Sigma = exports.Reporting = exports.Radar = exports.Issuing = exports.Identity = void 0;
|
|
4
|
+
exports.Checkout = exports.BillingPortal = exports.Apps = exports.WebhookEndpoints = exports.Transfers = exports.Topups = exports.Tokens = exports.TaxRates = exports.TaxCodes = exports.Subscriptions = exports.SubscriptionSchedules = exports.SubscriptionItems = exports.Sources = exports.ShippingRates = exports.SetupIntents = exports.SetupAttempts = exports.Reviews = exports.Refunds = exports.Quotes = exports.PromotionCodes = exports.Products = exports.Prices = exports.Plans = exports.Payouts = exports.PaymentMethods = exports.PaymentLinks = exports.PaymentIntents = exports.OAuth = exports.Mandates = exports.Invoices = exports.InvoiceItems = exports.Files = exports.FileLinks = exports.ExchangeRates = exports.Events = exports.EphemeralKeys = exports.Disputes = exports.Customers = exports.CreditNotes = exports.Coupons = exports.CountrySpecs = exports.Charges = exports.BalanceTransactions = exports.Balance = exports.ApplicationFees = exports.ApplePayDomains = exports.Accounts = exports.AccountSessions = exports.AccountLinks = exports.Account = void 0;
|
|
5
|
+
exports.Treasury = exports.TestHelpers = exports.Terminal = exports.Tax = exports.Sigma = exports.Reporting = exports.Radar = exports.Issuing = exports.Identity = exports.FinancialConnections = void 0;
|
|
6
6
|
const ResourceNamespace_js_1 = require("./ResourceNamespace.js");
|
|
7
7
|
const Accounts_js_1 = require("./resources/FinancialConnections/Accounts.js");
|
|
8
8
|
const Authorizations_js_1 = require("./resources/Issuing/Authorizations.js");
|
|
@@ -54,6 +54,8 @@ var Accounts_js_2 = require("./resources/Accounts.js");
|
|
|
54
54
|
Object.defineProperty(exports, "Account", { enumerable: true, get: function () { return Accounts_js_2.Accounts; } });
|
|
55
55
|
var AccountLinks_js_1 = require("./resources/AccountLinks.js");
|
|
56
56
|
Object.defineProperty(exports, "AccountLinks", { enumerable: true, get: function () { return AccountLinks_js_1.AccountLinks; } });
|
|
57
|
+
var AccountSessions_js_1 = require("./resources/AccountSessions.js");
|
|
58
|
+
Object.defineProperty(exports, "AccountSessions", { enumerable: true, get: function () { return AccountSessions_js_1.AccountSessions; } });
|
|
57
59
|
var Accounts_js_3 = require("./resources/Accounts.js");
|
|
58
60
|
Object.defineProperty(exports, "Accounts", { enumerable: true, get: function () { return Accounts_js_3.Accounts; } });
|
|
59
61
|
var ApplePayDomains_js_1 = require("./resources/ApplePayDomains.js");
|
package/cjs/stripe.core.js
CHANGED
|
@@ -34,7 +34,7 @@ const ALLOWED_CONFIG_PROPERTIES = [
|
|
|
34
34
|
];
|
|
35
35
|
const defaultRequestSenderFactory = (stripe) => new RequestSender_js_1.RequestSender(stripe, StripeResource_js_1.StripeResource.MAX_BUFFERED_REQUEST_METRICS);
|
|
36
36
|
function createStripe(platformFunctions, requestSender = defaultRequestSenderFactory) {
|
|
37
|
-
Stripe.PACKAGE_VERSION = '13.
|
|
37
|
+
Stripe.PACKAGE_VERSION = '13.4.0';
|
|
38
38
|
Stripe.USER_AGENT = Object.assign({ bindings_version: Stripe.PACKAGE_VERSION, lang: 'node', publisher: 'stripe', uname: null, typescript: false }, (0, utils_js_1.determineProcessUserAgentProperties)());
|
|
39
39
|
Stripe.StripeResource = StripeResource_js_1.StripeResource;
|
|
40
40
|
Stripe.resources = resources;
|
|
@@ -0,0 +1,6 @@
|
|
|
1
|
+
// File generated from our OpenAPI spec
|
|
2
|
+
import { StripeResource } from '../StripeResource.js';
|
|
3
|
+
const stripeMethod = StripeResource.method;
|
|
4
|
+
export const AccountSessions = StripeResource.extend({
|
|
5
|
+
create: stripeMethod({ method: 'POST', fullPath: '/v1/account_sessions' }),
|
|
6
|
+
});
|
package/esm/resources.js
CHANGED
|
@@ -48,6 +48,7 @@ import { VerificationReports as IdentityVerificationReports } from './resources/
|
|
|
48
48
|
import { VerificationSessions as IdentityVerificationSessions } from './resources/Identity/VerificationSessions.js';
|
|
49
49
|
export { Accounts as Account } from './resources/Accounts.js';
|
|
50
50
|
export { AccountLinks } from './resources/AccountLinks.js';
|
|
51
|
+
export { AccountSessions } from './resources/AccountSessions.js';
|
|
51
52
|
export { Accounts } from './resources/Accounts.js';
|
|
52
53
|
export { ApplePayDomains } from './resources/ApplePayDomains.js';
|
|
53
54
|
export { ApplicationFees } from './resources/ApplicationFees.js';
|
package/esm/stripe.core.js
CHANGED
|
@@ -31,7 +31,7 @@ const ALLOWED_CONFIG_PROPERTIES = [
|
|
|
31
31
|
];
|
|
32
32
|
const defaultRequestSenderFactory = (stripe) => new RequestSender(stripe, StripeResource.MAX_BUFFERED_REQUEST_METRICS);
|
|
33
33
|
export function createStripe(platformFunctions, requestSender = defaultRequestSenderFactory) {
|
|
34
|
-
Stripe.PACKAGE_VERSION = '13.
|
|
34
|
+
Stripe.PACKAGE_VERSION = '13.4.0';
|
|
35
35
|
Stripe.USER_AGENT = Object.assign({ bindings_version: Stripe.PACKAGE_VERSION, lang: 'node', publisher: 'stripe', uname: null, typescript: false }, determineProcessUserAgentProperties());
|
|
36
36
|
Stripe.StripeResource = StripeResource;
|
|
37
37
|
Stripe.resources = resources;
|
package/package.json
CHANGED
|
@@ -0,0 +1,62 @@
|
|
|
1
|
+
// File generated from our OpenAPI spec
|
|
2
|
+
|
|
3
|
+
declare module 'stripe' {
|
|
4
|
+
namespace Stripe {
|
|
5
|
+
/**
|
|
6
|
+
* An AccountSession allows a Connect platform to grant access to a connected account in Connect embedded components.
|
|
7
|
+
*
|
|
8
|
+
* We recommend that you create an AccountSession each time you need to display an embedded component
|
|
9
|
+
* to your user. Do not save AccountSessions to your database as they expire relatively
|
|
10
|
+
* quickly, and cannot be used more than once.
|
|
11
|
+
*
|
|
12
|
+
* Related guide: [Connect embedded components](https://stripe.com/docs/connect/get-started-connect-embedded-components)
|
|
13
|
+
*/
|
|
14
|
+
interface AccountSession {
|
|
15
|
+
/**
|
|
16
|
+
* String representing the object's type. Objects of the same type share the same value.
|
|
17
|
+
*/
|
|
18
|
+
object: 'account_session';
|
|
19
|
+
|
|
20
|
+
/**
|
|
21
|
+
* The ID of the account the AccountSession was created for
|
|
22
|
+
*/
|
|
23
|
+
account: string;
|
|
24
|
+
|
|
25
|
+
/**
|
|
26
|
+
* The client secret of this AccountSession. Used on the client to set up secure access to the given `account`.
|
|
27
|
+
*
|
|
28
|
+
* The client secret can be used to provide access to `account` from your frontend. It should not be stored, logged, or exposed to anyone other than the connected account. Make sure that you have TLS enabled on any page that includes the client secret.
|
|
29
|
+
*
|
|
30
|
+
* Refer to our docs to [setup Connect embedded components](https://stripe.com/docs/connect/get-started-connect-embedded-components) and learn about how `client_secret` should be handled.
|
|
31
|
+
*/
|
|
32
|
+
client_secret: string;
|
|
33
|
+
|
|
34
|
+
components: AccountSession.Components;
|
|
35
|
+
|
|
36
|
+
/**
|
|
37
|
+
* The timestamp at which this AccountSession will expire.
|
|
38
|
+
*/
|
|
39
|
+
expires_at: number;
|
|
40
|
+
|
|
41
|
+
/**
|
|
42
|
+
* Has the value `true` if the object exists in live mode or the value `false` if the object exists in test mode.
|
|
43
|
+
*/
|
|
44
|
+
livemode: boolean;
|
|
45
|
+
}
|
|
46
|
+
|
|
47
|
+
namespace AccountSession {
|
|
48
|
+
interface Components {
|
|
49
|
+
account_onboarding: Components.AccountOnboarding;
|
|
50
|
+
}
|
|
51
|
+
|
|
52
|
+
namespace Components {
|
|
53
|
+
interface AccountOnboarding {
|
|
54
|
+
/**
|
|
55
|
+
* Whether the embedded component is enabled.
|
|
56
|
+
*/
|
|
57
|
+
enabled: boolean;
|
|
58
|
+
}
|
|
59
|
+
}
|
|
60
|
+
}
|
|
61
|
+
}
|
|
62
|
+
}
|
|
@@ -0,0 +1,50 @@
|
|
|
1
|
+
// File generated from our OpenAPI spec
|
|
2
|
+
|
|
3
|
+
declare module 'stripe' {
|
|
4
|
+
namespace Stripe {
|
|
5
|
+
interface AccountSessionCreateParams {
|
|
6
|
+
/**
|
|
7
|
+
* The identifier of the account to create an Account Session for.
|
|
8
|
+
*/
|
|
9
|
+
account: string;
|
|
10
|
+
|
|
11
|
+
/**
|
|
12
|
+
* Each key of the dictionary represents an embedded component, and each embedded component maps to its configuration (e.g. whether it has been enabled or not).
|
|
13
|
+
*/
|
|
14
|
+
components: AccountSessionCreateParams.Components;
|
|
15
|
+
|
|
16
|
+
/**
|
|
17
|
+
* Specifies which fields in the response should be expanded.
|
|
18
|
+
*/
|
|
19
|
+
expand?: Array<string>;
|
|
20
|
+
}
|
|
21
|
+
|
|
22
|
+
namespace AccountSessionCreateParams {
|
|
23
|
+
interface Components {
|
|
24
|
+
/**
|
|
25
|
+
* Configuration for the account onboarding embedded component.
|
|
26
|
+
*/
|
|
27
|
+
account_onboarding?: Components.AccountOnboarding;
|
|
28
|
+
}
|
|
29
|
+
|
|
30
|
+
namespace Components {
|
|
31
|
+
interface AccountOnboarding {
|
|
32
|
+
/**
|
|
33
|
+
* Whether the embedded component is enabled.
|
|
34
|
+
*/
|
|
35
|
+
enabled: boolean;
|
|
36
|
+
}
|
|
37
|
+
}
|
|
38
|
+
}
|
|
39
|
+
|
|
40
|
+
class AccountSessionsResource {
|
|
41
|
+
/**
|
|
42
|
+
* Creates a AccountSession object that includes a single-use token that the platform can use on their front-end to grant client-side API access.
|
|
43
|
+
*/
|
|
44
|
+
create(
|
|
45
|
+
params: AccountSessionCreateParams,
|
|
46
|
+
options?: RequestOptions
|
|
47
|
+
): Promise<Stripe.Response<Stripe.AccountSession>>;
|
|
48
|
+
}
|
|
49
|
+
}
|
|
50
|
+
}
|
|
@@ -2936,7 +2936,9 @@ declare module 'stripe' {
|
|
|
2936
2936
|
expand?: Array<string>;
|
|
2937
2937
|
|
|
2938
2938
|
/**
|
|
2939
|
-
*
|
|
2939
|
+
* To request a new capability for an account, pass true. There can be a delay before the requested capability becomes active. If the capability has any activation requirements, the response includes them in the `requirements` arrays.
|
|
2940
|
+
*
|
|
2941
|
+
* If a capability isn't permanent, you can remove it from the account by passing false. Most capabilities are permanent after they've been requested. Attempting to remove a permanent capability returns an error.
|
|
2940
2942
|
*/
|
|
2941
2943
|
requested?: boolean;
|
|
2942
2944
|
}
|
|
@@ -3565,7 +3567,7 @@ declare module 'stripe' {
|
|
|
3565
3567
|
): Promise<Stripe.Response<Stripe.Person>>;
|
|
3566
3568
|
|
|
3567
3569
|
/**
|
|
3568
|
-
* Updates an existing Account Capability.
|
|
3570
|
+
* Updates an existing Account Capability. Request or remove a capability by updating its requested parameter.
|
|
3569
3571
|
*/
|
|
3570
3572
|
updateCapability(
|
|
3571
3573
|
accountId: string,
|
|
@@ -98,7 +98,7 @@ declare module 'stripe' {
|
|
|
98
98
|
status: string;
|
|
99
99
|
|
|
100
100
|
/**
|
|
101
|
-
* Transaction type: `adjustment`, `advance`, `advance_funding`, `anticipation_repayment`, `application_fee`, `application_fee_refund`, `charge`, `connect_collection_transfer`, `contribution`, `issuing_authorization_hold`, `issuing_authorization_release`, `issuing_dispute`, `issuing_transaction`, `payment`, `payment_failure_refund`, `payment_refund`, `payment_reversal`, `payout`, `payout_cancel`, `payout_failure`, `refund`, `refund_failure`, `reserve_transaction`, `reserved_funds`, `stripe_fee`, `stripe_fx_fee`, `tax_fee`, `topup`, `topup_reversal`, `transfer`, `transfer_cancel`, `transfer_failure`, or `transfer_refund`. [Learn more](https://stripe.com/docs/reports/balance-transaction-types) about balance transaction types and what they represent. If you are looking to classify transactions for accounting purposes, you might want to consider `reporting_category` instead.
|
|
101
|
+
* Transaction type: `adjustment`, `advance`, `advance_funding`, `anticipation_repayment`, `application_fee`, `application_fee_refund`, `charge`, `connect_collection_transfer`, `contribution`, `issuing_authorization_hold`, `issuing_authorization_release`, `issuing_dispute`, `issuing_transaction`, `obligation_inbound`, `obligation_outbound`, `obligation_reversal_inbound`, `obligation_reversal_outbound`, `obligation_payout`, `obligation_payout_failure`, `payment`, `payment_failure_refund`, `payment_refund`, `payment_reversal`, `payout`, `payout_cancel`, `payout_failure`, `refund`, `refund_failure`, `reserve_transaction`, `reserved_funds`, `stripe_fee`, `stripe_fx_fee`, `tax_fee`, `topup`, `topup_reversal`, `transfer`, `transfer_cancel`, `transfer_failure`, or `transfer_refund`. [Learn more](https://stripe.com/docs/reports/balance-transaction-types) about balance transaction types and what they represent. If you are looking to classify transactions for accounting purposes, you might want to consider `reporting_category` instead.
|
|
102
102
|
*/
|
|
103
103
|
type: BalanceTransaction.Type;
|
|
104
104
|
}
|
|
@@ -145,6 +145,12 @@ declare module 'stripe' {
|
|
|
145
145
|
| 'issuing_authorization_release'
|
|
146
146
|
| 'issuing_dispute'
|
|
147
147
|
| 'issuing_transaction'
|
|
148
|
+
| 'obligation_inbound'
|
|
149
|
+
| 'obligation_outbound'
|
|
150
|
+
| 'obligation_payout'
|
|
151
|
+
| 'obligation_payout_failure'
|
|
152
|
+
| 'obligation_reversal_inbound'
|
|
153
|
+
| 'obligation_reversal_outbound'
|
|
148
154
|
| 'payment'
|
|
149
155
|
| 'payment_failure_refund'
|
|
150
156
|
| 'payment_refund'
|
|
@@ -33,7 +33,7 @@ declare module 'stripe' {
|
|
|
33
33
|
source?: string;
|
|
34
34
|
|
|
35
35
|
/**
|
|
36
|
-
* Only returns transactions of the given type. One of: `adjustment`, `advance`, `advance_funding`, `anticipation_repayment`, `application_fee`, `application_fee_refund`, `charge`, `connect_collection_transfer`, `contribution`, `issuing_authorization_hold`, `issuing_authorization_release`, `issuing_dispute`, `issuing_transaction`, `payment`, `payment_failure_refund`, `payment_refund`, `payment_reversal`, `payout`, `payout_cancel`, `payout_failure`, `refund`, `refund_failure`, `reserve_transaction`, `reserved_funds`, `stripe_fee`, `stripe_fx_fee`, `tax_fee`, `topup`, `topup_reversal`, `transfer`, `transfer_cancel`, `transfer_failure`, or `transfer_refund`.
|
|
36
|
+
* Only returns transactions of the given type. One of: `adjustment`, `advance`, `advance_funding`, `anticipation_repayment`, `application_fee`, `application_fee_refund`, `charge`, `connect_collection_transfer`, `contribution`, `issuing_authorization_hold`, `issuing_authorization_release`, `issuing_dispute`, `issuing_transaction`, `obligation_inbound`, `obligation_outbound`, `obligation_reversal_inbound`, `obligation_reversal_outbound`, `obligation_payout`, `obligation_payout_failure`, `payment`, `payment_failure_refund`, `payment_refund`, `payment_reversal`, `payout`, `payout_cancel`, `payout_failure`, `refund`, `refund_failure`, `reserve_transaction`, `reserved_funds`, `stripe_fee`, `stripe_fx_fee`, `tax_fee`, `topup`, `topup_reversal`, `transfer`, `transfer_cancel`, `transfer_failure`, or `transfer_refund`.
|
|
37
37
|
*/
|
|
38
38
|
type?: string;
|
|
39
39
|
}
|
package/types/BankAccounts.d.ts
CHANGED
|
@@ -82,7 +82,7 @@ declare module 'stripe' {
|
|
|
82
82
|
fingerprint: string | null;
|
|
83
83
|
|
|
84
84
|
/**
|
|
85
|
-
* Information about upcoming new requirements for the bank account, including what information needs to be collected.
|
|
85
|
+
* Information about the [upcoming new requirements for the bank account](https://stripe.com/docs/connect/custom-accounts/future-requirements), including what information needs to be collected, and by when.
|
|
86
86
|
*/
|
|
87
87
|
future_requirements?: BankAccount.FutureRequirements | null;
|
|
88
88
|
|
|
@@ -103,7 +103,7 @@ declare module 'stripe' {
|
|
|
103
103
|
|
|
104
104
|
/**
|
|
105
105
|
* The ID of the customer for this Session.
|
|
106
|
-
* For Checkout Sessions in `
|
|
106
|
+
* For Checkout Sessions in `subscription` mode or Checkout Sessions with `customer_creation` set as `always` in `payment` mode, Checkout
|
|
107
107
|
* will create a new customer object based on information provided
|
|
108
108
|
* during the payment flow unless an existing customer was provided when
|
|
109
109
|
* the Session was created.
|
|
@@ -73,7 +73,7 @@ declare module 'stripe' {
|
|
|
73
73
|
* If the Customer already has a valid [email](https://stripe.com/docs/api/customers/object#customer_object-email) set, the email will be prefilled and not editable in Checkout.
|
|
74
74
|
* If the Customer does not have a valid `email`, Checkout will set the email entered during the session on the Customer.
|
|
75
75
|
*
|
|
76
|
-
* If blank for Checkout Sessions in `
|
|
76
|
+
* If blank for Checkout Sessions in `subscription` mode or with `customer_creation` set as `always` in `payment` mode, Checkout will create a new Customer object based on information provided during the payment flow.
|
|
77
77
|
*
|
|
78
78
|
* You can set [`payment_intent_data.setup_future_usage`](https://stripe.com/docs/api/checkout/sessions/create#create_checkout_session-payment_intent_data-setup_future_usage) to have Checkout automatically attach the payment method to the Customer you pass in for future reuse.
|
|
79
79
|
*/
|
|
@@ -1233,7 +1233,7 @@ declare module 'stripe' {
|
|
|
1233
1233
|
>;
|
|
1234
1234
|
|
|
1235
1235
|
/**
|
|
1236
|
-
* The list of bank transfer types that this PaymentIntent is allowed to use for funding.
|
|
1236
|
+
* The list of bank transfer types that this PaymentIntent is allowed to use for funding.
|
|
1237
1237
|
*/
|
|
1238
1238
|
type: BankTransfer.Type;
|
|
1239
1239
|
}
|
package/types/Events.d.ts
CHANGED
|
@@ -79,7 +79,7 @@ declare module 'stripe' {
|
|
|
79
79
|
/**
|
|
80
80
|
* Description of the event (e.g., `invoice.created` or `charge.refunded`).
|
|
81
81
|
*/
|
|
82
|
-
type:
|
|
82
|
+
type: Event.Type;
|
|
83
83
|
}
|
|
84
84
|
|
|
85
85
|
namespace Event {
|
|
@@ -112,6 +112,203 @@ declare module 'stripe' {
|
|
|
112
112
|
*/
|
|
113
113
|
idempotency_key: string | null;
|
|
114
114
|
}
|
|
115
|
+
|
|
116
|
+
type Type =
|
|
117
|
+
| 'account.application.authorized'
|
|
118
|
+
| 'account.application.deauthorized'
|
|
119
|
+
| 'account.external_account.created'
|
|
120
|
+
| 'account.external_account.deleted'
|
|
121
|
+
| 'account.external_account.updated'
|
|
122
|
+
| 'account.updated'
|
|
123
|
+
| 'application_fee.created'
|
|
124
|
+
| 'application_fee.refund.updated'
|
|
125
|
+
| 'application_fee.refunded'
|
|
126
|
+
| 'balance.available'
|
|
127
|
+
| 'billing_portal.configuration.created'
|
|
128
|
+
| 'billing_portal.configuration.updated'
|
|
129
|
+
| 'billing_portal.session.created'
|
|
130
|
+
| 'capability.updated'
|
|
131
|
+
| 'cash_balance.funds_available'
|
|
132
|
+
| 'charge.captured'
|
|
133
|
+
| 'charge.dispute.closed'
|
|
134
|
+
| 'charge.dispute.created'
|
|
135
|
+
| 'charge.dispute.funds_reinstated'
|
|
136
|
+
| 'charge.dispute.funds_withdrawn'
|
|
137
|
+
| 'charge.dispute.updated'
|
|
138
|
+
| 'charge.expired'
|
|
139
|
+
| 'charge.failed'
|
|
140
|
+
| 'charge.pending'
|
|
141
|
+
| 'charge.refund.updated'
|
|
142
|
+
| 'charge.refunded'
|
|
143
|
+
| 'charge.succeeded'
|
|
144
|
+
| 'charge.updated'
|
|
145
|
+
| 'checkout.session.async_payment_failed'
|
|
146
|
+
| 'checkout.session.async_payment_succeeded'
|
|
147
|
+
| 'checkout.session.completed'
|
|
148
|
+
| 'checkout.session.expired'
|
|
149
|
+
| 'coupon.created'
|
|
150
|
+
| 'coupon.deleted'
|
|
151
|
+
| 'coupon.updated'
|
|
152
|
+
| 'credit_note.created'
|
|
153
|
+
| 'credit_note.updated'
|
|
154
|
+
| 'credit_note.voided'
|
|
155
|
+
| 'customer.created'
|
|
156
|
+
| 'customer.deleted'
|
|
157
|
+
| 'customer.discount.created'
|
|
158
|
+
| 'customer.discount.deleted'
|
|
159
|
+
| 'customer.discount.updated'
|
|
160
|
+
| 'customer.source.created'
|
|
161
|
+
| 'customer.source.deleted'
|
|
162
|
+
| 'customer.source.expiring'
|
|
163
|
+
| 'customer.source.updated'
|
|
164
|
+
| 'customer.subscription.created'
|
|
165
|
+
| 'customer.subscription.deleted'
|
|
166
|
+
| 'customer.subscription.paused'
|
|
167
|
+
| 'customer.subscription.pending_update_applied'
|
|
168
|
+
| 'customer.subscription.pending_update_expired'
|
|
169
|
+
| 'customer.subscription.resumed'
|
|
170
|
+
| 'customer.subscription.trial_will_end'
|
|
171
|
+
| 'customer.subscription.updated'
|
|
172
|
+
| 'customer.tax_id.created'
|
|
173
|
+
| 'customer.tax_id.deleted'
|
|
174
|
+
| 'customer.tax_id.updated'
|
|
175
|
+
| 'customer.updated'
|
|
176
|
+
| 'customer_cash_balance_transaction.created'
|
|
177
|
+
| 'file.created'
|
|
178
|
+
| 'financial_connections.account.created'
|
|
179
|
+
| 'financial_connections.account.deactivated'
|
|
180
|
+
| 'financial_connections.account.disconnected'
|
|
181
|
+
| 'financial_connections.account.reactivated'
|
|
182
|
+
| 'financial_connections.account.refreshed_balance'
|
|
183
|
+
| 'identity.verification_session.canceled'
|
|
184
|
+
| 'identity.verification_session.created'
|
|
185
|
+
| 'identity.verification_session.processing'
|
|
186
|
+
| 'identity.verification_session.redacted'
|
|
187
|
+
| 'identity.verification_session.requires_input'
|
|
188
|
+
| 'identity.verification_session.verified'
|
|
189
|
+
| 'invoice.created'
|
|
190
|
+
| 'invoice.deleted'
|
|
191
|
+
| 'invoice.finalization_failed'
|
|
192
|
+
| 'invoice.finalized'
|
|
193
|
+
| 'invoice.marked_uncollectible'
|
|
194
|
+
| 'invoice.paid'
|
|
195
|
+
| 'invoice.payment_action_required'
|
|
196
|
+
| 'invoice.payment_failed'
|
|
197
|
+
| 'invoice.payment_succeeded'
|
|
198
|
+
| 'invoice.sent'
|
|
199
|
+
| 'invoice.upcoming'
|
|
200
|
+
| 'invoice.updated'
|
|
201
|
+
| 'invoice.voided'
|
|
202
|
+
| 'invoiceitem.created'
|
|
203
|
+
| 'invoiceitem.deleted'
|
|
204
|
+
| 'invoiceitem.updated'
|
|
205
|
+
| 'issuing_authorization.created'
|
|
206
|
+
| 'issuing_authorization.request'
|
|
207
|
+
| 'issuing_authorization.updated'
|
|
208
|
+
| 'issuing_card.created'
|
|
209
|
+
| 'issuing_card.updated'
|
|
210
|
+
| 'issuing_cardholder.created'
|
|
211
|
+
| 'issuing_cardholder.updated'
|
|
212
|
+
| 'issuing_dispute.closed'
|
|
213
|
+
| 'issuing_dispute.created'
|
|
214
|
+
| 'issuing_dispute.funds_reinstated'
|
|
215
|
+
| 'issuing_dispute.submitted'
|
|
216
|
+
| 'issuing_dispute.updated'
|
|
217
|
+
| 'issuing_transaction.created'
|
|
218
|
+
| 'issuing_transaction.updated'
|
|
219
|
+
| 'mandate.updated'
|
|
220
|
+
| 'order.created'
|
|
221
|
+
| 'payment_intent.amount_capturable_updated'
|
|
222
|
+
| 'payment_intent.canceled'
|
|
223
|
+
| 'payment_intent.created'
|
|
224
|
+
| 'payment_intent.partially_funded'
|
|
225
|
+
| 'payment_intent.payment_failed'
|
|
226
|
+
| 'payment_intent.processing'
|
|
227
|
+
| 'payment_intent.requires_action'
|
|
228
|
+
| 'payment_intent.succeeded'
|
|
229
|
+
| 'payment_link.created'
|
|
230
|
+
| 'payment_link.updated'
|
|
231
|
+
| 'payment_method.attached'
|
|
232
|
+
| 'payment_method.automatically_updated'
|
|
233
|
+
| 'payment_method.detached'
|
|
234
|
+
| 'payment_method.updated'
|
|
235
|
+
| 'payout.canceled'
|
|
236
|
+
| 'payout.created'
|
|
237
|
+
| 'payout.failed'
|
|
238
|
+
| 'payout.paid'
|
|
239
|
+
| 'payout.reconciliation_completed'
|
|
240
|
+
| 'payout.updated'
|
|
241
|
+
| 'person.created'
|
|
242
|
+
| 'person.deleted'
|
|
243
|
+
| 'person.updated'
|
|
244
|
+
| 'plan.created'
|
|
245
|
+
| 'plan.deleted'
|
|
246
|
+
| 'plan.updated'
|
|
247
|
+
| 'price.created'
|
|
248
|
+
| 'price.deleted'
|
|
249
|
+
| 'price.updated'
|
|
250
|
+
| 'product.created'
|
|
251
|
+
| 'product.deleted'
|
|
252
|
+
| 'product.updated'
|
|
253
|
+
| 'promotion_code.created'
|
|
254
|
+
| 'promotion_code.updated'
|
|
255
|
+
| 'quote.accepted'
|
|
256
|
+
| 'quote.canceled'
|
|
257
|
+
| 'quote.created'
|
|
258
|
+
| 'quote.finalized'
|
|
259
|
+
| 'radar.early_fraud_warning.created'
|
|
260
|
+
| 'radar.early_fraud_warning.updated'
|
|
261
|
+
| 'recipient.created'
|
|
262
|
+
| 'recipient.deleted'
|
|
263
|
+
| 'recipient.updated'
|
|
264
|
+
| 'refund.created'
|
|
265
|
+
| 'refund.updated'
|
|
266
|
+
| 'reporting.report_run.failed'
|
|
267
|
+
| 'reporting.report_run.succeeded'
|
|
268
|
+
| 'reporting.report_type.updated'
|
|
269
|
+
| 'review.closed'
|
|
270
|
+
| 'review.opened'
|
|
271
|
+
| 'setup_intent.canceled'
|
|
272
|
+
| 'setup_intent.created'
|
|
273
|
+
| 'setup_intent.requires_action'
|
|
274
|
+
| 'setup_intent.setup_failed'
|
|
275
|
+
| 'setup_intent.succeeded'
|
|
276
|
+
| 'sigma.scheduled_query_run.created'
|
|
277
|
+
| 'sku.created'
|
|
278
|
+
| 'sku.deleted'
|
|
279
|
+
| 'sku.updated'
|
|
280
|
+
| 'source.canceled'
|
|
281
|
+
| 'source.chargeable'
|
|
282
|
+
| 'source.failed'
|
|
283
|
+
| 'source.mandate_notification'
|
|
284
|
+
| 'source.refund_attributes_required'
|
|
285
|
+
| 'source.transaction.created'
|
|
286
|
+
| 'source.transaction.updated'
|
|
287
|
+
| 'subscription_schedule.aborted'
|
|
288
|
+
| 'subscription_schedule.canceled'
|
|
289
|
+
| 'subscription_schedule.completed'
|
|
290
|
+
| 'subscription_schedule.created'
|
|
291
|
+
| 'subscription_schedule.expiring'
|
|
292
|
+
| 'subscription_schedule.released'
|
|
293
|
+
| 'subscription_schedule.updated'
|
|
294
|
+
| 'tax.settings.updated'
|
|
295
|
+
| 'tax_rate.created'
|
|
296
|
+
| 'tax_rate.updated'
|
|
297
|
+
| 'terminal.reader.action_failed'
|
|
298
|
+
| 'terminal.reader.action_succeeded'
|
|
299
|
+
| 'test_helpers.test_clock.advancing'
|
|
300
|
+
| 'test_helpers.test_clock.created'
|
|
301
|
+
| 'test_helpers.test_clock.deleted'
|
|
302
|
+
| 'test_helpers.test_clock.internal_failure'
|
|
303
|
+
| 'test_helpers.test_clock.ready'
|
|
304
|
+
| 'topup.canceled'
|
|
305
|
+
| 'topup.created'
|
|
306
|
+
| 'topup.failed'
|
|
307
|
+
| 'topup.reversed'
|
|
308
|
+
| 'topup.succeeded'
|
|
309
|
+
| 'transfer.created'
|
|
310
|
+
| 'transfer.reversed'
|
|
311
|
+
| 'transfer.updated';
|
|
115
312
|
}
|
|
116
313
|
}
|
|
117
314
|
}
|
package/types/Invoices.d.ts
CHANGED
|
@@ -116,7 +116,15 @@ declare module 'stripe' {
|
|
|
116
116
|
automatic_tax: Invoice.AutomaticTax;
|
|
117
117
|
|
|
118
118
|
/**
|
|
119
|
-
* Indicates the reason why the invoice was created.
|
|
119
|
+
* Indicates the reason why the invoice was created.
|
|
120
|
+
*
|
|
121
|
+
* * `manual`: Unrelated to a subscription, for example, created via the invoice editor.
|
|
122
|
+
* * `subscription`: No longer in use. Applies to subscriptions from before May 2018 where no distinction was made between updates, cycles, and thresholds.
|
|
123
|
+
* * `subscription_create`: A new subscription was created.
|
|
124
|
+
* * `subscription_cycle`: A subscription advanced into a new period.
|
|
125
|
+
* * `subscription_threshold`: A subscription reached a billing threshold.
|
|
126
|
+
* * `subscription_update`: A subscription was updated.
|
|
127
|
+
* * `upcoming`: Reserved for simulated invoices, per the upcoming invoice endpoint.
|
|
120
128
|
*/
|
|
121
129
|
billing_reason: Invoice.BillingReason | null;
|
|
122
130
|
|
package/types/PaymentLinks.d.ts
CHANGED
|
@@ -32,6 +32,15 @@ declare module 'stripe' {
|
|
|
32
32
|
*/
|
|
33
33
|
allow_promotion_codes: boolean;
|
|
34
34
|
|
|
35
|
+
/**
|
|
36
|
+
* The ID of the Connect application that created the Payment Link.
|
|
37
|
+
*/
|
|
38
|
+
application:
|
|
39
|
+
| string
|
|
40
|
+
| Stripe.Application
|
|
41
|
+
| Stripe.DeletedApplication
|
|
42
|
+
| null;
|
|
43
|
+
|
|
35
44
|
/**
|
|
36
45
|
* The amount of the application fee (if any) that will be requested to be applied to the payment and transferred to the application owner's Stripe account.
|
|
37
46
|
*/
|
package/types/Persons.d.ts
CHANGED
|
@@ -73,7 +73,7 @@ declare module 'stripe' {
|
|
|
73
73
|
full_name_aliases?: Array<string>;
|
|
74
74
|
|
|
75
75
|
/**
|
|
76
|
-
* Information about the upcoming new requirements for this person, including what information needs to be collected, and by when.
|
|
76
|
+
* Information about the [upcoming new requirements for this person](https://stripe.com/docs/connect/custom-accounts/future-requirements), including what information needs to be collected, and by when.
|
|
77
77
|
*/
|
|
78
78
|
future_requirements?: Person.FutureRequirements | null;
|
|
79
79
|
|
|
@@ -13,6 +13,9 @@ declare module 'stripe' {
|
|
|
13
13
|
*/
|
|
14
14
|
bank_account?: string | TokenCreateParams.BankAccount;
|
|
15
15
|
|
|
16
|
+
/**
|
|
17
|
+
* The card this token will represent. If you also pass in a customer, the card must be the ID of a card belonging to the customer. Otherwise, if you do not pass in a customer, this is a dictionary containing a user's credit card details, with the options described below.
|
|
18
|
+
*/
|
|
16
19
|
card?: TokenCreateParams.Card | string;
|
|
17
20
|
|
|
18
21
|
/**
|
|
@@ -453,28 +456,64 @@ declare module 'stripe' {
|
|
|
453
456
|
}
|
|
454
457
|
|
|
455
458
|
interface Card {
|
|
459
|
+
/**
|
|
460
|
+
* City / District / Suburb / Town / Village.
|
|
461
|
+
*/
|
|
456
462
|
address_city?: string;
|
|
457
463
|
|
|
464
|
+
/**
|
|
465
|
+
* Billing address country, if provided.
|
|
466
|
+
*/
|
|
458
467
|
address_country?: string;
|
|
459
468
|
|
|
469
|
+
/**
|
|
470
|
+
* Address line 1 (Street address / PO Box / Company name).
|
|
471
|
+
*/
|
|
460
472
|
address_line1?: string;
|
|
461
473
|
|
|
474
|
+
/**
|
|
475
|
+
* Address line 2 (Apartment / Suite / Unit / Building).
|
|
476
|
+
*/
|
|
462
477
|
address_line2?: string;
|
|
463
478
|
|
|
479
|
+
/**
|
|
480
|
+
* State / County / Province / Region.
|
|
481
|
+
*/
|
|
464
482
|
address_state?: string;
|
|
465
483
|
|
|
484
|
+
/**
|
|
485
|
+
* ZIP or postal code.
|
|
486
|
+
*/
|
|
466
487
|
address_zip?: string;
|
|
467
488
|
|
|
489
|
+
/**
|
|
490
|
+
* Required in order to add the card to an account; in all other cases, this parameter is not used. When added to an account, the card (which must be a debit card) can be used as a transfer destination for funds in this currency.
|
|
491
|
+
*/
|
|
468
492
|
currency?: string;
|
|
469
493
|
|
|
494
|
+
/**
|
|
495
|
+
* Card security code. Highly recommended to always include this value.
|
|
496
|
+
*/
|
|
470
497
|
cvc?: string;
|
|
471
498
|
|
|
499
|
+
/**
|
|
500
|
+
* Two-digit number representing the card's expiration month.
|
|
501
|
+
*/
|
|
472
502
|
exp_month: string;
|
|
473
503
|
|
|
504
|
+
/**
|
|
505
|
+
* Two- or four-digit number representing the card's expiration year.
|
|
506
|
+
*/
|
|
474
507
|
exp_year: string;
|
|
475
508
|
|
|
509
|
+
/**
|
|
510
|
+
* Cardholder's full name.
|
|
511
|
+
*/
|
|
476
512
|
name?: string;
|
|
477
513
|
|
|
514
|
+
/**
|
|
515
|
+
* The card number, as a string without any separators.
|
|
516
|
+
*/
|
|
478
517
|
number: string;
|
|
479
518
|
}
|
|
480
519
|
|
package/types/index.d.ts
CHANGED
|
@@ -8,6 +8,7 @@
|
|
|
8
8
|
///<reference path='./UpcomingInvoices.d.ts' />
|
|
9
9
|
// Imports: The beginning of the section generated from our OpenAPI spec
|
|
10
10
|
///<reference path='./AccountLinksResource.d.ts' />
|
|
11
|
+
///<reference path='./AccountSessionsResource.d.ts' />
|
|
11
12
|
///<reference path='./AccountsResource.d.ts' />
|
|
12
13
|
///<reference path='./ApplePayDomainsResource.d.ts' />
|
|
13
14
|
///<reference path='./ApplicationFeesResource.d.ts' />
|
|
@@ -98,6 +99,7 @@
|
|
|
98
99
|
///<reference path='./Treasury/TransactionsResource.d.ts' />
|
|
99
100
|
///<reference path='./WebhookEndpointsResource.d.ts' />
|
|
100
101
|
///<reference path='./AccountLinks.d.ts' />
|
|
102
|
+
///<reference path='./AccountSessions.d.ts' />
|
|
101
103
|
///<reference path='./Accounts.d.ts' />
|
|
102
104
|
///<reference path='./ApplePayDomains.d.ts' />
|
|
103
105
|
///<reference path='./ApplicationFees.d.ts' />
|
|
@@ -223,6 +225,7 @@ declare module 'stripe' {
|
|
|
223
225
|
|
|
224
226
|
// Fields: The beginning of the section generated from our OpenAPI spec
|
|
225
227
|
accountLinks: Stripe.AccountLinksResource;
|
|
228
|
+
accountSessions: Stripe.AccountSessionsResource;
|
|
226
229
|
accounts: Stripe.AccountsResource;
|
|
227
230
|
applePayDomains: Stripe.ApplePayDomainsResource;
|
|
228
231
|
applicationFees: Stripe.ApplicationFeesResource;
|