stripe 16.2.0 → 16.4.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 +768 -109
- package/README.md +33 -0
- package/VERSION +1 -1
- package/cjs/RequestSender.js +66 -5
- package/cjs/ResourceNamespace.js +3 -0
- package/cjs/StripeResource.js +1 -1
- package/cjs/Webhooks.js +29 -17
- package/cjs/apiVersion.js +2 -1
- package/cjs/multipart.js +4 -1
- package/cjs/resources/AccountNotices.js +21 -0
- package/cjs/resources/Capital/FinancingOffers.js +21 -0
- package/cjs/resources/Capital/FinancingSummary.js +12 -0
- package/cjs/resources/Capital/FinancingTransactions.js +17 -0
- package/cjs/resources/FinancialConnections/Accounts.js +5 -0
- package/cjs/resources/FinancialConnections/Institutions.js +17 -0
- package/cjs/resources/GiftCards/Cards.js +23 -0
- package/cjs/resources/GiftCards/Transactions.js +33 -0
- package/cjs/resources/Invoices.js +13 -0
- package/cjs/resources/Issuing/CreditUnderwritingRecords.js +33 -0
- package/cjs/resources/Margins.js +22 -0
- package/cjs/resources/OAuth.js +1 -1
- package/cjs/resources/Orders.js +24 -0
- package/cjs/resources/PaymentIntents.js +4 -0
- package/cjs/resources/QuotePhases.js +22 -0
- package/cjs/resources/Quotes.js +32 -0
- package/cjs/resources/SubscriptionSchedules.js +4 -0
- package/cjs/resources/Tax/Forms.js +20 -0
- package/cjs/resources/Terminal/Readers.js +12 -0
- package/cjs/resources.js +38 -10
- package/cjs/stripe.core.js +16 -7
- package/cjs/utils.js +30 -3
- package/esm/RequestSender.js +67 -6
- package/esm/ResourceNamespace.js +3 -0
- package/esm/StripeResource.js +2 -2
- package/esm/Webhooks.js +29 -17
- package/esm/apiVersion.js +1 -0
- package/esm/multipart.js +5 -2
- package/esm/resources/AccountNotices.js +18 -0
- package/esm/resources/Capital/FinancingOffers.js +18 -0
- package/esm/resources/Capital/FinancingSummary.js +9 -0
- package/esm/resources/Capital/FinancingTransactions.js +14 -0
- package/esm/resources/FinancialConnections/Accounts.js +5 -0
- package/esm/resources/FinancialConnections/Institutions.js +14 -0
- package/esm/resources/GiftCards/Cards.js +20 -0
- package/esm/resources/GiftCards/Transactions.js +30 -0
- package/esm/resources/Invoices.js +13 -0
- package/esm/resources/Issuing/CreditUnderwritingRecords.js +30 -0
- package/esm/resources/Margins.js +19 -0
- package/esm/resources/OAuth.js +2 -2
- package/esm/resources/Orders.js +21 -0
- package/esm/resources/PaymentIntents.js +4 -0
- package/esm/resources/QuotePhases.js +19 -0
- package/esm/resources/Quotes.js +32 -0
- package/esm/resources/SubscriptionSchedules.js +4 -0
- package/esm/resources/Tax/Forms.js +17 -0
- package/esm/resources/Terminal/Readers.js +12 -0
- package/esm/resources.js +24 -0
- package/esm/stripe.core.js +16 -7
- package/esm/utils.js +27 -1
- package/package.json +1 -1
- package/types/AccountLinksResource.d.ts +5 -1
- package/types/AccountNotices.d.ts +110 -0
- package/types/AccountNoticesResource.d.ts +98 -0
- package/types/AccountSessions.d.ts +15 -0
- package/types/AccountSessionsResource.d.ts +205 -0
- package/types/Accounts.d.ts +88 -1
- package/types/AccountsResource.d.ts +204 -0
- package/types/BillingPortal/Sessions.d.ts +1 -1
- package/types/Capital/FinancingOffers.d.ts +188 -0
- package/types/Capital/FinancingOffersResource.d.ts +97 -0
- package/types/Capital/FinancingSummary.d.ts +106 -0
- package/types/Capital/FinancingSummaryResource.d.ts +27 -0
- package/types/Capital/FinancingTransactions.d.ts +135 -0
- package/types/Capital/FinancingTransactionsResource.d.ts +68 -0
- package/types/Charges.d.ts +67 -0
- package/types/ChargesResource.d.ts +1294 -0
- package/types/Checkout/Sessions.d.ts +28 -1
- package/types/Checkout/SessionsResource.d.ts +15 -1
- package/types/ConfirmationTokens.d.ts +83 -0
- package/types/Coupons.d.ts +1 -1
- package/types/CouponsResource.d.ts +1 -1
- package/types/CreditNotes.d.ts +21 -0
- package/types/CreditNotesResource.d.ts +51 -0
- package/types/CustomerSessions.d.ts +76 -0
- package/types/CustomerSessionsResource.d.ts +76 -0
- package/types/CustomersResource.d.ts +2 -0
- package/types/Disputes.d.ts +168 -0
- package/types/DisputesResource.d.ts +120 -0
- package/types/EventTypes.d.ts +426 -0
- package/types/Events.d.ts +83 -0
- package/types/FinancialConnections/AccountInferredBalances.d.ts +38 -0
- package/types/FinancialConnections/Accounts.d.ts +29 -1
- package/types/FinancialConnections/AccountsResource.d.ts +35 -3
- package/types/FinancialConnections/Institutions.d.ts +93 -0
- package/types/FinancialConnections/InstitutionsResource.d.ts +47 -0
- package/types/FinancialConnections/Sessions.d.ts +49 -1
- package/types/FinancialConnections/SessionsResource.d.ts +38 -1
- package/types/GiftCards/Cards.d.ts +118 -0
- package/types/GiftCards/CardsResource.d.ts +159 -0
- package/types/GiftCards/Transactions.d.ts +129 -0
- package/types/GiftCards/TransactionsResource.d.ts +201 -0
- package/types/InvoiceItems.d.ts +5 -0
- package/types/InvoiceItemsResource.d.ts +98 -0
- package/types/InvoiceLineItems.d.ts +22 -0
- package/types/InvoicePayments.d.ts +91 -0
- package/types/Invoices.d.ts +116 -6
- package/types/InvoicesResource.d.ts +5395 -1818
- package/types/Issuing/CardholdersResource.d.ts +2 -1
- package/types/Issuing/Cards.d.ts +34 -0
- package/types/Issuing/CardsResource.d.ts +125 -0
- package/types/Issuing/CreditUnderwritingRecords.d.ts +446 -0
- package/types/Issuing/CreditUnderwritingRecordsResource.d.ts +1017 -0
- package/types/LineItems.d.ts +7 -0
- package/types/Mandates.d.ts +77 -0
- package/types/Margins.d.ts +56 -0
- package/types/MarginsResource.d.ts +114 -0
- package/types/Orders.d.ts +1057 -0
- package/types/OrdersResource.d.ts +2711 -0
- package/types/PaymentIntents.d.ts +469 -6
- package/types/PaymentIntentsResource.d.ts +6721 -3373
- package/types/PaymentMethods.d.ts +62 -0
- package/types/PaymentMethodsResource.d.ts +110 -0
- package/types/Plans.d.ts +1 -1
- package/types/Prices.d.ts +23 -1
- package/types/PricesResource.d.ts +22 -0
- package/types/Products.d.ts +39 -0
- package/types/ProductsResource.d.ts +36 -0
- package/types/QuoteLines.d.ts +634 -0
- package/types/QuotePhases.d.ts +198 -0
- package/types/QuotePhasesResource.d.ts +67 -0
- package/types/QuotePreviewInvoices.d.ts +1530 -0
- package/types/QuotePreviewSubscriptionSchedules.d.ts +778 -0
- package/types/Quotes.d.ts +578 -1
- package/types/QuotesResource.d.ts +3174 -265
- package/types/SetupAttempts.d.ts +9 -5
- package/types/SetupIntents.d.ts +110 -6
- package/types/SetupIntentsResource.d.ts +498 -3
- package/types/Sources.d.ts +23 -0
- package/types/SubscriptionItems.d.ts +21 -0
- package/types/SubscriptionItemsResource.d.ts +109 -0
- package/types/SubscriptionSchedules.d.ts +164 -0
- package/types/SubscriptionSchedulesResource.d.ts +1234 -16
- package/types/Subscriptions.d.ts +46 -1
- package/types/SubscriptionsResource.d.ts +350 -5
- package/types/Tax/Forms.d.ts +133 -0
- package/types/Tax/FormsResource.d.ts +90 -0
- package/types/Terminal/Readers.d.ts +278 -0
- package/types/Terminal/ReadersResource.d.ts +208 -0
- package/types/TestHelpers/ConfirmationTokensResource.d.ts +55 -0
- package/types/TestHelpers/Treasury/ReceivedCreditsResource.d.ts +26 -0
- package/types/TestHelpers/Treasury/ReceivedDebitsResource.d.ts +26 -0
- package/types/Treasury/OutboundTransfers.d.ts +26 -0
- package/types/Treasury/OutboundTransfersResource.d.ts +26 -0
- package/types/Treasury/ReceivedCredits.d.ts +26 -0
- package/types/Treasury/ReceivedDebits.d.ts +31 -0
- package/types/WebhookEndpointsResource.d.ts +50 -0
- package/types/index.d.ts +64 -0
- package/types/lib.d.ts +12 -0
|
@@ -0,0 +1,133 @@
|
|
|
1
|
+
// File generated from our OpenAPI spec
|
|
2
|
+
|
|
3
|
+
declare module 'stripe' {
|
|
4
|
+
namespace Stripe {
|
|
5
|
+
namespace Tax {
|
|
6
|
+
/**
|
|
7
|
+
* Tax forms are legal documents which are delivered to one or more tax authorities for information reporting purposes.
|
|
8
|
+
*
|
|
9
|
+
* Related guide: [US tax reporting for Connect platforms](https://stripe.com/docs/connect/tax-reporting)
|
|
10
|
+
*/
|
|
11
|
+
interface Form {
|
|
12
|
+
/**
|
|
13
|
+
* Unique identifier for the object.
|
|
14
|
+
*/
|
|
15
|
+
id: string;
|
|
16
|
+
|
|
17
|
+
/**
|
|
18
|
+
* String representing the object's type. Objects of the same type share the same value.
|
|
19
|
+
*/
|
|
20
|
+
object: 'tax.form';
|
|
21
|
+
|
|
22
|
+
/**
|
|
23
|
+
* The form that corrects this form, if any.
|
|
24
|
+
*/
|
|
25
|
+
corrected_by: string | Stripe.Tax.Form | null;
|
|
26
|
+
|
|
27
|
+
/**
|
|
28
|
+
* Time at which the object was created. Measured in seconds since the Unix epoch.
|
|
29
|
+
*/
|
|
30
|
+
created: number;
|
|
31
|
+
|
|
32
|
+
/**
|
|
33
|
+
* A list of tax filing statuses. Note that a filing status will only be included if the form has been filed directly with the jurisdiction's tax authority.
|
|
34
|
+
*/
|
|
35
|
+
filing_statuses: Array<Form.FilingStatus>;
|
|
36
|
+
|
|
37
|
+
/**
|
|
38
|
+
* Has the value `true` if the object exists in live mode or the value `false` if the object exists in test mode.
|
|
39
|
+
*/
|
|
40
|
+
livemode: boolean;
|
|
41
|
+
|
|
42
|
+
payee: Form.Payee;
|
|
43
|
+
|
|
44
|
+
/**
|
|
45
|
+
* The type of the tax form. An additional hash is included on the tax form with a name matching this value. It contains additional information specific to the tax form type.
|
|
46
|
+
*/
|
|
47
|
+
type: Form.Type;
|
|
48
|
+
|
|
49
|
+
us_1099_k?: Form.Us1099K;
|
|
50
|
+
|
|
51
|
+
us_1099_misc?: Form.Us1099Misc;
|
|
52
|
+
|
|
53
|
+
us_1099_nec?: Form.Us1099Nec;
|
|
54
|
+
}
|
|
55
|
+
|
|
56
|
+
namespace Form {
|
|
57
|
+
interface FilingStatus {
|
|
58
|
+
/**
|
|
59
|
+
* Time when the filing status was updated.
|
|
60
|
+
*/
|
|
61
|
+
effective_at: number;
|
|
62
|
+
|
|
63
|
+
jurisdiction: FilingStatus.Jurisdiction;
|
|
64
|
+
|
|
65
|
+
/**
|
|
66
|
+
* The current status of the filed form.
|
|
67
|
+
*/
|
|
68
|
+
value: FilingStatus.Value;
|
|
69
|
+
}
|
|
70
|
+
|
|
71
|
+
namespace FilingStatus {
|
|
72
|
+
interface Jurisdiction {
|
|
73
|
+
/**
|
|
74
|
+
* Two-letter country code ([ISO 3166-1 alpha-2](https://en.wikipedia.org/wiki/ISO_3166-1_alpha-2)). Always `US`.
|
|
75
|
+
*/
|
|
76
|
+
country: string;
|
|
77
|
+
|
|
78
|
+
/**
|
|
79
|
+
* Indicates the level of the jurisdiction where the form was filed.
|
|
80
|
+
*/
|
|
81
|
+
level: Jurisdiction.Level;
|
|
82
|
+
|
|
83
|
+
/**
|
|
84
|
+
* [ISO 3166-2 U.S. state code](https://en.wikipedia.org/wiki/ISO_3166-2:US), without country prefix, if any. For example, "NY" for New York, United States.
|
|
85
|
+
*/
|
|
86
|
+
state: string | null;
|
|
87
|
+
}
|
|
88
|
+
|
|
89
|
+
namespace Jurisdiction {
|
|
90
|
+
type Level = 'country' | 'state';
|
|
91
|
+
}
|
|
92
|
+
|
|
93
|
+
type Value = 'accepted' | 'filed' | 'rejected';
|
|
94
|
+
}
|
|
95
|
+
|
|
96
|
+
interface Payee {
|
|
97
|
+
/**
|
|
98
|
+
* The ID of the payee's Stripe account.
|
|
99
|
+
*/
|
|
100
|
+
account: string | Stripe.Account | null;
|
|
101
|
+
|
|
102
|
+
/**
|
|
103
|
+
* Always `account`.
|
|
104
|
+
*/
|
|
105
|
+
type: 'account';
|
|
106
|
+
}
|
|
107
|
+
|
|
108
|
+
type Type = 'us_1099_k' | 'us_1099_misc' | 'us_1099_nec';
|
|
109
|
+
|
|
110
|
+
interface Us1099K {
|
|
111
|
+
/**
|
|
112
|
+
* Year represented by the information reported on the tax form.
|
|
113
|
+
*/
|
|
114
|
+
reporting_year: number;
|
|
115
|
+
}
|
|
116
|
+
|
|
117
|
+
interface Us1099Misc {
|
|
118
|
+
/**
|
|
119
|
+
* Year represented by the information reported on the tax form.
|
|
120
|
+
*/
|
|
121
|
+
reporting_year: number;
|
|
122
|
+
}
|
|
123
|
+
|
|
124
|
+
interface Us1099Nec {
|
|
125
|
+
/**
|
|
126
|
+
* Year represented by the information reported on the tax form.
|
|
127
|
+
*/
|
|
128
|
+
reporting_year: number;
|
|
129
|
+
}
|
|
130
|
+
}
|
|
131
|
+
}
|
|
132
|
+
}
|
|
133
|
+
}
|
|
@@ -0,0 +1,90 @@
|
|
|
1
|
+
// File generated from our OpenAPI spec
|
|
2
|
+
|
|
3
|
+
declare module 'stripe' {
|
|
4
|
+
namespace Stripe {
|
|
5
|
+
namespace Tax {
|
|
6
|
+
interface FormRetrieveParams {
|
|
7
|
+
/**
|
|
8
|
+
* Specifies which fields in the response should be expanded.
|
|
9
|
+
*/
|
|
10
|
+
expand?: Array<string>;
|
|
11
|
+
}
|
|
12
|
+
|
|
13
|
+
interface FormListParams extends PaginationParams {
|
|
14
|
+
/**
|
|
15
|
+
* The payee whose volume is represented on the tax form.
|
|
16
|
+
*/
|
|
17
|
+
payee: FormListParams.Payee;
|
|
18
|
+
|
|
19
|
+
/**
|
|
20
|
+
* Specifies which fields in the response should be expanded.
|
|
21
|
+
*/
|
|
22
|
+
expand?: Array<string>;
|
|
23
|
+
|
|
24
|
+
/**
|
|
25
|
+
* An optional filter on the list, based on the object `type` field. Without the filter, the list includes all current and future tax form types. If your integration expects only one type of tax form in the response, make sure to provide a type value in the request.
|
|
26
|
+
*/
|
|
27
|
+
type?: FormListParams.Type;
|
|
28
|
+
}
|
|
29
|
+
|
|
30
|
+
namespace FormListParams {
|
|
31
|
+
interface Payee {
|
|
32
|
+
/**
|
|
33
|
+
* The ID of the Stripe account whose forms will be retrieved.
|
|
34
|
+
*/
|
|
35
|
+
account?: string;
|
|
36
|
+
|
|
37
|
+
/**
|
|
38
|
+
* Specifies the payee type. Always `account`.
|
|
39
|
+
*/
|
|
40
|
+
type?: 'account';
|
|
41
|
+
}
|
|
42
|
+
|
|
43
|
+
type Type = 'us_1099_k' | 'us_1099_misc' | 'us_1099_nec';
|
|
44
|
+
}
|
|
45
|
+
|
|
46
|
+
interface FormPdfParams {
|
|
47
|
+
/**
|
|
48
|
+
* Specifies which fields in the response should be expanded.
|
|
49
|
+
*/
|
|
50
|
+
expand?: Array<string>;
|
|
51
|
+
}
|
|
52
|
+
|
|
53
|
+
class FormsResource {
|
|
54
|
+
/**
|
|
55
|
+
* Retrieves the details of a tax form that has previously been created. Supply the unique tax form ID that was returned from your previous request, and Stripe will return the corresponding tax form information.
|
|
56
|
+
*/
|
|
57
|
+
retrieve(
|
|
58
|
+
id: string,
|
|
59
|
+
params?: FormRetrieveParams,
|
|
60
|
+
options?: RequestOptions
|
|
61
|
+
): Promise<Stripe.Response<Stripe.Tax.Form>>;
|
|
62
|
+
retrieve(
|
|
63
|
+
id: string,
|
|
64
|
+
options?: RequestOptions
|
|
65
|
+
): Promise<Stripe.Response<Stripe.Tax.Form>>;
|
|
66
|
+
|
|
67
|
+
/**
|
|
68
|
+
* Returns a list of tax forms which were previously created. The tax forms are returned in sorted order, with the oldest tax forms appearing first.
|
|
69
|
+
*/
|
|
70
|
+
list(
|
|
71
|
+
params: FormListParams,
|
|
72
|
+
options?: RequestOptions
|
|
73
|
+
): ApiListPromise<Stripe.Tax.Form>;
|
|
74
|
+
|
|
75
|
+
/**
|
|
76
|
+
* Download the PDF for a tax form.
|
|
77
|
+
*/
|
|
78
|
+
pdf(
|
|
79
|
+
id: string,
|
|
80
|
+
params?: FormPdfParams,
|
|
81
|
+
options?: RequestOptions
|
|
82
|
+
): Promise<StripeStreamResponse>;
|
|
83
|
+
pdf(
|
|
84
|
+
id: string,
|
|
85
|
+
options?: RequestOptions
|
|
86
|
+
): Promise<StripeStreamResponse>;
|
|
87
|
+
}
|
|
88
|
+
}
|
|
89
|
+
}
|
|
90
|
+
}
|
|
@@ -97,6 +97,21 @@ declare module 'stripe' {
|
|
|
97
97
|
|
|
98
98
|
namespace Reader {
|
|
99
99
|
interface Action {
|
|
100
|
+
/**
|
|
101
|
+
* Represents a reader action to collect customer inputs
|
|
102
|
+
*/
|
|
103
|
+
collect_inputs?: Action.CollectInputs;
|
|
104
|
+
|
|
105
|
+
/**
|
|
106
|
+
* Represents a reader action to collect a payment method
|
|
107
|
+
*/
|
|
108
|
+
collect_payment_method?: Action.CollectPaymentMethod;
|
|
109
|
+
|
|
110
|
+
/**
|
|
111
|
+
* Represents a reader action to confirm a payment
|
|
112
|
+
*/
|
|
113
|
+
confirm_payment_intent?: Action.ConfirmPaymentIntent;
|
|
114
|
+
|
|
100
115
|
/**
|
|
101
116
|
* Failure code, only set if status is `failed`.
|
|
102
117
|
*/
|
|
@@ -139,6 +154,262 @@ declare module 'stripe' {
|
|
|
139
154
|
}
|
|
140
155
|
|
|
141
156
|
namespace Action {
|
|
157
|
+
interface CollectInputs {
|
|
158
|
+
/**
|
|
159
|
+
* List of inputs to be collected.
|
|
160
|
+
*/
|
|
161
|
+
inputs: Array<CollectInputs.Input>;
|
|
162
|
+
|
|
163
|
+
/**
|
|
164
|
+
* Set of [key-value pairs](https://stripe.com/docs/api/metadata) that you can attach to an object. This can be useful for storing additional information about the object in a structured format.
|
|
165
|
+
*/
|
|
166
|
+
metadata: Stripe.Metadata | null;
|
|
167
|
+
}
|
|
168
|
+
|
|
169
|
+
namespace CollectInputs {
|
|
170
|
+
interface Input {
|
|
171
|
+
/**
|
|
172
|
+
* Default text of input being collected.
|
|
173
|
+
*/
|
|
174
|
+
custom_text: Input.CustomText | null;
|
|
175
|
+
|
|
176
|
+
/**
|
|
177
|
+
* Information about a email being collected using a reader
|
|
178
|
+
*/
|
|
179
|
+
email?: Input.Email;
|
|
180
|
+
|
|
181
|
+
/**
|
|
182
|
+
* Information about a number being collected using a reader
|
|
183
|
+
*/
|
|
184
|
+
numeric?: Input.Numeric;
|
|
185
|
+
|
|
186
|
+
/**
|
|
187
|
+
* Information about a phone number being collected using a reader
|
|
188
|
+
*/
|
|
189
|
+
phone?: Input.Phone;
|
|
190
|
+
|
|
191
|
+
/**
|
|
192
|
+
* Indicate that this input is required, disabling the skip button.
|
|
193
|
+
*/
|
|
194
|
+
required: boolean | null;
|
|
195
|
+
|
|
196
|
+
/**
|
|
197
|
+
* Information about a selection being collected using a reader
|
|
198
|
+
*/
|
|
199
|
+
selection?: Input.Selection;
|
|
200
|
+
|
|
201
|
+
/**
|
|
202
|
+
* Information about a signature being collected using a reader
|
|
203
|
+
*/
|
|
204
|
+
signature?: Input.Signature;
|
|
205
|
+
|
|
206
|
+
/**
|
|
207
|
+
* Indicate that this input was skipped by the user.
|
|
208
|
+
*/
|
|
209
|
+
skipped?: boolean;
|
|
210
|
+
|
|
211
|
+
/**
|
|
212
|
+
* Information about text being collected using a reader
|
|
213
|
+
*/
|
|
214
|
+
text?: Input.Text;
|
|
215
|
+
|
|
216
|
+
/**
|
|
217
|
+
* List of toggles being collected. Values are present if collection is complete.
|
|
218
|
+
*/
|
|
219
|
+
toggles: Array<Input.Toggle> | null;
|
|
220
|
+
|
|
221
|
+
/**
|
|
222
|
+
* Type of input being collected.
|
|
223
|
+
*/
|
|
224
|
+
type: Input.Type;
|
|
225
|
+
}
|
|
226
|
+
|
|
227
|
+
namespace Input {
|
|
228
|
+
interface CustomText {
|
|
229
|
+
/**
|
|
230
|
+
* Customize the default description for this input
|
|
231
|
+
*/
|
|
232
|
+
description: string | null;
|
|
233
|
+
|
|
234
|
+
/**
|
|
235
|
+
* Customize the default label for this input's skip button
|
|
236
|
+
*/
|
|
237
|
+
skip_button: string | null;
|
|
238
|
+
|
|
239
|
+
/**
|
|
240
|
+
* Customize the default label for this input's submit button
|
|
241
|
+
*/
|
|
242
|
+
submit_button: string | null;
|
|
243
|
+
|
|
244
|
+
/**
|
|
245
|
+
* Customize the default title for this input
|
|
246
|
+
*/
|
|
247
|
+
title: string | null;
|
|
248
|
+
}
|
|
249
|
+
|
|
250
|
+
interface Email {
|
|
251
|
+
/**
|
|
252
|
+
* The collected email address
|
|
253
|
+
*/
|
|
254
|
+
value: string | null;
|
|
255
|
+
}
|
|
256
|
+
|
|
257
|
+
interface Numeric {
|
|
258
|
+
/**
|
|
259
|
+
* The collected number
|
|
260
|
+
*/
|
|
261
|
+
value: string | null;
|
|
262
|
+
}
|
|
263
|
+
|
|
264
|
+
interface Phone {
|
|
265
|
+
/**
|
|
266
|
+
* The collected phone number
|
|
267
|
+
*/
|
|
268
|
+
value: string | null;
|
|
269
|
+
}
|
|
270
|
+
|
|
271
|
+
interface Selection {
|
|
272
|
+
/**
|
|
273
|
+
* List of possible choices to be selected
|
|
274
|
+
*/
|
|
275
|
+
choices: Array<Selection.Choice>;
|
|
276
|
+
|
|
277
|
+
/**
|
|
278
|
+
* The value of the selected choice
|
|
279
|
+
*/
|
|
280
|
+
value: string | null;
|
|
281
|
+
}
|
|
282
|
+
|
|
283
|
+
namespace Selection {
|
|
284
|
+
interface Choice {
|
|
285
|
+
/**
|
|
286
|
+
* The button style for the choice
|
|
287
|
+
*/
|
|
288
|
+
style: Choice.Style | null;
|
|
289
|
+
|
|
290
|
+
/**
|
|
291
|
+
* A value to be selected
|
|
292
|
+
*/
|
|
293
|
+
value: string;
|
|
294
|
+
}
|
|
295
|
+
|
|
296
|
+
namespace Choice {
|
|
297
|
+
type Style = 'primary' | 'secondary';
|
|
298
|
+
}
|
|
299
|
+
}
|
|
300
|
+
|
|
301
|
+
interface Signature {
|
|
302
|
+
/**
|
|
303
|
+
* The File ID of a collected signature image
|
|
304
|
+
*/
|
|
305
|
+
value: string | null;
|
|
306
|
+
}
|
|
307
|
+
|
|
308
|
+
interface Text {
|
|
309
|
+
/**
|
|
310
|
+
* The collected text value
|
|
311
|
+
*/
|
|
312
|
+
value: string | null;
|
|
313
|
+
}
|
|
314
|
+
|
|
315
|
+
interface Toggle {
|
|
316
|
+
/**
|
|
317
|
+
* The toggle's default value
|
|
318
|
+
*/
|
|
319
|
+
default_value: Toggle.DefaultValue | null;
|
|
320
|
+
|
|
321
|
+
/**
|
|
322
|
+
* The toggle's description text
|
|
323
|
+
*/
|
|
324
|
+
description: string | null;
|
|
325
|
+
|
|
326
|
+
/**
|
|
327
|
+
* The toggle's title text
|
|
328
|
+
*/
|
|
329
|
+
title: string | null;
|
|
330
|
+
|
|
331
|
+
/**
|
|
332
|
+
* The toggle's collected value
|
|
333
|
+
*/
|
|
334
|
+
value: Toggle.Value | null;
|
|
335
|
+
}
|
|
336
|
+
|
|
337
|
+
namespace Toggle {
|
|
338
|
+
type DefaultValue = 'disabled' | 'enabled';
|
|
339
|
+
|
|
340
|
+
type Value = 'disabled' | 'enabled';
|
|
341
|
+
}
|
|
342
|
+
|
|
343
|
+
type Type =
|
|
344
|
+
| 'email'
|
|
345
|
+
| 'numeric'
|
|
346
|
+
| 'phone'
|
|
347
|
+
| 'selection'
|
|
348
|
+
| 'signature'
|
|
349
|
+
| 'text';
|
|
350
|
+
}
|
|
351
|
+
}
|
|
352
|
+
|
|
353
|
+
interface CollectPaymentMethod {
|
|
354
|
+
/**
|
|
355
|
+
* Represents a per-transaction override of a reader configuration
|
|
356
|
+
*/
|
|
357
|
+
collect_config?: CollectPaymentMethod.CollectConfig;
|
|
358
|
+
|
|
359
|
+
/**
|
|
360
|
+
* Most recent PaymentIntent processed by the reader.
|
|
361
|
+
*/
|
|
362
|
+
payment_intent: string | Stripe.PaymentIntent;
|
|
363
|
+
|
|
364
|
+
/**
|
|
365
|
+
* PaymentMethod objects represent your customer's payment instruments.
|
|
366
|
+
* You can use them with [PaymentIntents](https://stripe.com/docs/payments/payment-intents) to collect payments or save them to
|
|
367
|
+
* Customer objects to store instrument details for future payments.
|
|
368
|
+
*
|
|
369
|
+
* Related guides: [Payment Methods](https://stripe.com/docs/payments/payment-methods) and [More Payment Scenarios](https://stripe.com/docs/payments/more-payment-scenarios).
|
|
370
|
+
*/
|
|
371
|
+
payment_method?: Stripe.PaymentMethod;
|
|
372
|
+
|
|
373
|
+
stripe_account?: string;
|
|
374
|
+
}
|
|
375
|
+
|
|
376
|
+
namespace CollectPaymentMethod {
|
|
377
|
+
interface CollectConfig {
|
|
378
|
+
/**
|
|
379
|
+
* Enable customer initiated cancellation when processing this payment.
|
|
380
|
+
*/
|
|
381
|
+
enable_customer_cancellation?: boolean;
|
|
382
|
+
|
|
383
|
+
/**
|
|
384
|
+
* Override showing a tipping selection screen on this transaction.
|
|
385
|
+
*/
|
|
386
|
+
skip_tipping?: boolean;
|
|
387
|
+
|
|
388
|
+
/**
|
|
389
|
+
* Represents a per-transaction tipping configuration
|
|
390
|
+
*/
|
|
391
|
+
tipping?: CollectConfig.Tipping;
|
|
392
|
+
}
|
|
393
|
+
|
|
394
|
+
namespace CollectConfig {
|
|
395
|
+
interface Tipping {
|
|
396
|
+
/**
|
|
397
|
+
* Amount used to calculate tip suggestions on tipping selection screen for this transaction. Must be a positive integer in the smallest currency unit (e.g., 100 cents to represent $1.00 or 100 to represent ¥100, a zero-decimal currency).
|
|
398
|
+
*/
|
|
399
|
+
amount_eligible?: number;
|
|
400
|
+
}
|
|
401
|
+
}
|
|
402
|
+
}
|
|
403
|
+
|
|
404
|
+
interface ConfirmPaymentIntent {
|
|
405
|
+
/**
|
|
406
|
+
* Most recent PaymentIntent processed by the reader.
|
|
407
|
+
*/
|
|
408
|
+
payment_intent: string | Stripe.PaymentIntent;
|
|
409
|
+
|
|
410
|
+
stripe_account?: string;
|
|
411
|
+
}
|
|
412
|
+
|
|
142
413
|
interface ProcessPaymentIntent {
|
|
143
414
|
/**
|
|
144
415
|
* Most recent PaymentIntent processed by the reader.
|
|
@@ -149,6 +420,8 @@ declare module 'stripe' {
|
|
|
149
420
|
* Represents a per-transaction override of a reader configuration
|
|
150
421
|
*/
|
|
151
422
|
process_config?: ProcessPaymentIntent.ProcessConfig;
|
|
423
|
+
|
|
424
|
+
stripe_account?: string;
|
|
152
425
|
}
|
|
153
426
|
|
|
154
427
|
namespace ProcessPaymentIntent {
|
|
@@ -250,6 +523,8 @@ declare module 'stripe' {
|
|
|
250
523
|
* Boolean indicating whether the transfer should be reversed when refunding this charge. The transfer will be reversed proportionally to the amount being refunded (either the entire or partial amount). A transfer can be reversed only by the application that created the charge.
|
|
251
524
|
*/
|
|
252
525
|
reverse_transfer?: boolean;
|
|
526
|
+
|
|
527
|
+
stripe_account?: string;
|
|
253
528
|
}
|
|
254
529
|
|
|
255
530
|
namespace RefundPayment {
|
|
@@ -321,6 +596,9 @@ declare module 'stripe' {
|
|
|
321
596
|
type Status = 'failed' | 'in_progress' | 'succeeded';
|
|
322
597
|
|
|
323
598
|
type Type =
|
|
599
|
+
| 'collect_inputs'
|
|
600
|
+
| 'collect_payment_method'
|
|
601
|
+
| 'confirm_payment_intent'
|
|
324
602
|
| 'process_payment_intent'
|
|
325
603
|
| 'process_setup_intent'
|
|
326
604
|
| 'refund_payment'
|