@capacitor-community/stripe-terminal 6.0.2 → 6.2.0

This diff represents the content of publicly available package versions that have been released to one of the supported registries. The information contained in this diff is provided for informational purposes only and reflects changes between package versions as they appear in their respective public registries.
Files changed (36) hide show
  1. package/CapacitorCommunityStripeTerminal.podspec +1 -1
  2. package/README.md +767 -28
  3. package/android/build.gradle +1 -1
  4. package/android/src/main/java/com/getcapacitor/community/stripe/terminal/StripeTerminal.java +372 -51
  5. package/android/src/main/java/com/getcapacitor/community/stripe/terminal/StripeTerminalPlugin.java +61 -5
  6. package/android/src/main/java/com/getcapacitor/community/stripe/terminal/TerminalEvent.kt +14 -0
  7. package/android/src/main/java/com/getcapacitor/community/stripe/terminal/helper/TerminalMappers.java +96 -0
  8. package/dist/docs.json +1389 -111
  9. package/dist/esm/definitions.d.ts +263 -11
  10. package/dist/esm/definitions.js +1 -8
  11. package/dist/esm/definitions.js.map +1 -1
  12. package/dist/esm/events.enum.d.ts +15 -1
  13. package/dist/esm/events.enum.js +14 -0
  14. package/dist/esm/events.enum.js.map +1 -1
  15. package/dist/esm/stripe-types/proto.d.ts +501 -0
  16. package/dist/esm/stripe-types/proto.js +2 -0
  17. package/dist/esm/stripe-types/proto.js.map +1 -0
  18. package/dist/esm/stripe.enum.d.ts +154 -0
  19. package/dist/esm/stripe.enum.js +170 -0
  20. package/dist/esm/stripe.enum.js.map +1 -0
  21. package/dist/esm/terminalMappers.d.ts +23 -0
  22. package/dist/esm/terminalMappers.js +119 -0
  23. package/dist/esm/terminalMappers.js.map +1 -0
  24. package/dist/esm/web.d.ts +25 -2
  25. package/dist/esm/web.js +137 -13
  26. package/dist/esm/web.js.map +1 -1
  27. package/dist/plugin.cjs.js +428 -13
  28. package/dist/plugin.cjs.js.map +1 -1
  29. package/dist/plugin.js +429 -15
  30. package/dist/plugin.js.map +1 -1
  31. package/ios/Plugin/StripeTerminal.swift +345 -61
  32. package/ios/Plugin/StripeTerminalPlugin.m +7 -0
  33. package/ios/Plugin/StripeTerminalPlugin.swift +29 -4
  34. package/ios/Plugin/TerminalEvents.swift +14 -0
  35. package/ios/Plugin/TerminalMappers.swift +269 -0
  36. package/package.json +4 -1
@@ -0,0 +1,501 @@
1
+ /** Properties of a TipOption. */
2
+ interface ITipOption {
3
+ /** REQUIRED: Amount of this tip option */
4
+ amount?: number | null;
5
+ /** Descriptor of the amount, displayed in the button */
6
+ label?: string | null;
7
+ }
8
+ /** Properties of a TipConfiguration. */
9
+ export interface ITipConfiguration {
10
+ /** List of at most 3 options */
11
+ options?: ITipOption[] | null;
12
+ /** Hide the custom amount button */
13
+ hide_custom_amount?: boolean | null;
14
+ }
15
+ /** Properties of a TipSelection. */
16
+ interface ITipSelection {
17
+ /** Amount associated with the selection */
18
+ amount?: number | null;
19
+ }
20
+ /** CreditCardBrand enum. */
21
+ declare type CreditCardBrand = 'INVALID_CREDIT_CARD_BRAND' | 'UNKNOWN_CREDIT' | 'AMERICAN_EXPRESS' | 'DINERS' | 'DISCOVER' | 'JCB' | 'MASTERCARD' | 'VISA' | 'CUP';
22
+ /** CardEntryMethod enum. */
23
+ declare type CardEntryMethod = 'INVALID_ENTRY_METHOD' | 'CHIP_READ' | 'CONTACTLESS' | 'FSWIPE' | 'KEYED' | 'SWIPED' | 'BARCODE_READ';
24
+ /** Properties of a CardPaymentMethod. */
25
+ interface ICardPaymentMethod {
26
+ /** Masked card data */
27
+ masked_pan?: string | null;
28
+ /** The card expiration date */
29
+ expiration_date?: string | null;
30
+ /** Brand of credit card tender, determined by BIN table lookup */
31
+ card_brand?: CreditCardBrand | null;
32
+ /** Entry method of payment */
33
+ card_entry_method?: CardEntryMethod | null;
34
+ }
35
+ /** Properties of a PaymentMethod. */
36
+ export interface IPaymentMethod {
37
+ /** PaymentMethod card_payment */
38
+ card_payment?: ICardPaymentMethod | null;
39
+ /** Tip selection chosen by the cardholder */
40
+ tip_selection?: ITipSelection | null;
41
+ }
42
+ /** Properties of a PaymentMethod. */
43
+ export interface IPaymentMethodReadReusableResponse {
44
+ /** Unique identifier for the Payment Method object */
45
+ id?: string | null;
46
+ /** Time at which the Payment Method object was created. Measured in seconds since the Unix epoch */
47
+ created?: number | null;
48
+ /** Customer ID */
49
+ customer?: string | null;
50
+ /** Whether this charge was made in live mode or not */
51
+ livemode?: boolean | null;
52
+ /** Meta data in JSON format */
53
+ metadata?: {
54
+ [k: string]: string;
55
+ } | null;
56
+ /** PaymentMethod type */
57
+ type?: string | null;
58
+ /** Card representation of payment method */
59
+ card?: ICardPaymentMethodReadReusableResponse | null;
60
+ }
61
+ /** Properties of a CardPaymentMethod. */
62
+ interface ICardPaymentMethodReadReusableResponse {
63
+ /** Masked card data */
64
+ masked_pan?: string | null;
65
+ /** The card expiration date */
66
+ expiration_date?: string | null;
67
+ /** Brand of credit card tender, determined by BIN table lookup */
68
+ card_brand?: CreditCardBrand | null;
69
+ /** Entry method of payment */
70
+ card_entry_method?: CardEntryMethod | null;
71
+ }
72
+ /** Properties of an ErrorResponse. */
73
+ export interface IErrorResponse {
74
+ /** The type of error returned. */
75
+ type?: string | null;
76
+ /** ID of failed charge */
77
+ charge?: string | null;
78
+ /** For some errors that could be handled programmatically, a short string indicating the error code reported. (https://stripe.com/docs/error-codes) */
79
+ code?: string | null;
80
+ /** For card errors resulting from a card issuer decline, a short string indicating the card issuer’s reason for the decline if they provide one. (https://stripe.com/docs/declines#issuer-declines) */
81
+ decline_code?: string | null;
82
+ /** A URL to more information about the error code reported. */
83
+ doc_url?: string | null;
84
+ /** A human-readable message providing more details about the error. For card errors, these messages can be shown to your users. */
85
+ message?: string | null;
86
+ /** If the error is parameter-specific, the parameter related to the error. For example, you can use this to display a message near the correct form field. */
87
+ param?: string | null;
88
+ /** Source used for the error */
89
+ source?: ISource | null;
90
+ /** Payment intent used for the error */
91
+ payment_intent?: IPaymentIntent | null;
92
+ }
93
+ /** Properties of an Owner. */
94
+ export interface IOwner {
95
+ /** Owner address */
96
+ address?: string | null;
97
+ /** Owner email */
98
+ email?: string | null;
99
+ /** Owner name */
100
+ name?: string | null;
101
+ /** Owner phone */
102
+ phone?: string | null;
103
+ /** Owner verified_address */
104
+ verified_address?: string | null;
105
+ /** Owner verified_email */
106
+ verified_email?: string | null;
107
+ /** Owner verified_name */
108
+ verified_name?: string | null;
109
+ /** Owner verified_phone */
110
+ verified_phone?: string | null;
111
+ }
112
+ /** Properties of a PaymentMethodDetails. */
113
+ export interface IPaymentMethodDetails {
114
+ /** Payment Method type (e.g. "card_present") */
115
+ type?: string | null;
116
+ /** PaymentMethodDetails card_present */
117
+ card_present?: ICardPresent | null;
118
+ /** PaymentMethodDetails interac_present */
119
+ interac_present?: ICardPresent | null;
120
+ }
121
+ /** Properties of a Refund. */
122
+ interface IRefund {
123
+ /** Refund id */
124
+ id?: string | null;
125
+ /** Refund amount */
126
+ amount?: number | null;
127
+ /** Refund charge */
128
+ charge?: string | null;
129
+ /** Time at which the Refund object was created. Measured in seconds since the Unix epoch */
130
+ created?: number | null;
131
+ /** Three-letter ISO currency code, in lowercase. Must be a supported currency */
132
+ currency?: string | null;
133
+ /** Meta data in JSON format */
134
+ metadata?: {
135
+ [k: string]: string;
136
+ } | null;
137
+ /** Reason for refund */
138
+ reason?: string | null;
139
+ /** Status of refund */
140
+ status?: string | null;
141
+ /** Actual details of the payment method */
142
+ payment_method_details?: IPaymentMethodDetails | null;
143
+ /** If the refund failed, the reason for refund failure if known. */
144
+ failure_reason?: string | null;
145
+ }
146
+ /** Properties of a Refunds. */
147
+ interface IRefunds {
148
+ /** Refunds data */
149
+ data?: IRefund[] | null;
150
+ /** Refunds has_more */
151
+ has_more?: boolean | null;
152
+ /** Refunds total_count */
153
+ total_count?: number | null;
154
+ }
155
+ /** Properties of a Charge. */
156
+ interface ICharge {
157
+ /** ID for charge */
158
+ id?: string | null;
159
+ /** Amount that is associated with the charge */
160
+ amount?: number | null;
161
+ /** Amount that is associated with a refund of the charge */
162
+ amount_refunded?: number | null;
163
+ /** Whether this charge has been captured */
164
+ captured?: boolean | null;
165
+ /** Whether this charge has been refunded */
166
+ refunded?: boolean | null;
167
+ /** Time at which the Charge object was created. Measured in seconds since the Unix epoch */
168
+ created?: number | null;
169
+ /** Three-letter ISO currency code, in lowercase. Must be a supported currency. */
170
+ currency?: string | null;
171
+ /** An arbitrary string attached to the object. Often useful for displaying to users. */
172
+ description?: string | null;
173
+ /** An arbitrary string to be displayed on your customer's credit card statement. */
174
+ statement_descriptor?: string | null;
175
+ /** Email address that the receipt for the resulting payment will be sent to. */
176
+ receipt_email?: string | null;
177
+ /** Failure code if the charge was declined */
178
+ failure_code?: string | null;
179
+ /** Message associated with the failure code */
180
+ failure_message?: string | null;
181
+ /** Whether this charge was made in live mode or not */
182
+ livemode?: boolean | null;
183
+ /** Meta data in JSON format */
184
+ metadata?: {
185
+ [k: string]: string;
186
+ } | null;
187
+ /** Source associated with the charge */
188
+ source?: ISource | null;
189
+ /** Payment intent ID associated with the charge */
190
+ payment_intent?: string | null;
191
+ /** Status of the charge */
192
+ status?: string | null;
193
+ /** Payment method ID */
194
+ payment_method?: string | null;
195
+ /** Actual details of the payment method */
196
+ payment_method_details?: IPaymentMethodDetails | null;
197
+ /** Whether the charge was paid */
198
+ paid?: boolean | null;
199
+ /** Receipt URL */
200
+ receipt_url?: string | null;
201
+ /** Refunds associated with charge */
202
+ refunds?: IRefunds | null;
203
+ }
204
+ /** Properties of a Charges. */
205
+ interface ICharges {
206
+ /** Charges data */
207
+ data?: ICharge[] | null;
208
+ /** Charges has_more */
209
+ has_more?: boolean | null;
210
+ /** Charges total_count */
211
+ total_count?: number | null;
212
+ }
213
+ /** Properties of a CardPresent. */
214
+ interface ICardPresent {
215
+ /** The last four digits of the card. */
216
+ last4?: string | null;
217
+ /** Card brand */
218
+ brand?: string | null;
219
+ /** Customer's signature if signed */
220
+ evidence_customer_signature?: string | null;
221
+ /** Method used by POS to read the card */
222
+ read_method?: string | null;
223
+ /** The EMV authorization response payload */
224
+ emv_auth_data?: string | null;
225
+ /** The EMV authorization response code */
226
+ authorization_response_code?: string | null;
227
+ /** AID */
228
+ dedicated_file_name?: string | null;
229
+ /** AID name */
230
+ application_preferred_name?: string | null;
231
+ /** TVR */
232
+ terminal_verification_results?: string | null;
233
+ /** TSI */
234
+ transaction_status_information?: string | null;
235
+ /** CVM type */
236
+ cvm_type?: string | null;
237
+ /** CardPresent reader */
238
+ reader?: string | null;
239
+ /** CardPresent fingerprint */
240
+ fingerprint?: string | null;
241
+ /** CardPresent authorization_code */
242
+ authorization_code?: string | null;
243
+ }
244
+ /** Properties of a Source. */
245
+ export interface ISource {
246
+ /** Unique identifier for the source card object. */
247
+ id?: string | null;
248
+ /** Source type (e.g. "card_present") */
249
+ type?: string | null;
250
+ /** Card payment method */
251
+ card_present?: ICardPresent | null;
252
+ /** Interac version of card present */
253
+ interac_present?: ICardPresent | null;
254
+ /** Meta data in JSON format */
255
+ metadata?: {
256
+ [k: string]: string;
257
+ } | null;
258
+ /** Owner data */
259
+ owner?: IOwner | null;
260
+ }
261
+ export interface IPaymentIntent {
262
+ /** Unique identifier for the Payment Intent object */
263
+ id?: string | null;
264
+ /** Time at which the Payment Intent object was created. Measured in seconds since the Unix epoch */
265
+ created?: number | null;
266
+ /** Status of this PaymentIntent */
267
+ status?: string | null;
268
+ /** Amount intended to be collected by this Payment Intent */
269
+ amount?: number | null;
270
+ /** Three-letter ISO currency code, in lowercase. Must be a supported currency. */
271
+ currency?: string | null;
272
+ /** Card present payment source field map */
273
+ source?: ISource | null;
274
+ /** An arbitrary string to be displayed on your customer's credit card statement. */
275
+ statement_descriptor?: string | null;
276
+ /** An arbitrary string attached to the object. Often useful for displaying to users. */
277
+ description?: string | null;
278
+ /** Email address that the receipt for the resulting payment will be sent to. */
279
+ receipt_email?: string | null;
280
+ /** Whether this charge was made in live mode or not */
281
+ livemode?: boolean | null;
282
+ /** Last payment error on a charge (if retrieved) */
283
+ last_payment_error?: IErrorResponse | null;
284
+ /** Meta data in JSON format */
285
+ metadata?: {
286
+ [k: string]: string;
287
+ } | null;
288
+ /** Charges associated with the payment intent */
289
+ charges?: ICharges | null;
290
+ /** ID for payment method */
291
+ payment_method?: string | null;
292
+ }
293
+ export interface ISetupIntent {
294
+ /** Unique identifier for the object. */
295
+ id?: string | null;
296
+ /** The client secret of this SetupIntent. Used for client-side retrieval using a publishable key. */
297
+ client_secret?: string | null;
298
+ /** ID of the Customer this SetupIntent belongs to, if one exists. */
299
+ customer?: string | null;
300
+ /** An arbitrary string attached to the object. Often useful for displaying to users. */
301
+ description?: string | null;
302
+ /** The error encountered in the previous SetupIntent confirmation. */
303
+ last_setup_error?: ILastSetupError | null;
304
+ /** Meta data in JSON format */
305
+ metadata?: {
306
+ [k: string]: string;
307
+ } | null;
308
+ /** If present, this property tells you what actions you need to take in order for your customer to continue payment setup. */
309
+ next_action?: INextAction | null;
310
+ /** ID of the payment method used with this SetupIntent. */
311
+ payment_method?: string | null;
312
+ /** The list of payment method types (e.g. card) that this SetupIntent is allowed to set up. */
313
+ payment_method_types?: string[] | null;
314
+ /** Status of this SetupIntent, one of requires_payment_method, requires_confirmation, requires_action, processing, canceled, or succeeded. */
315
+ status?: string | null;
316
+ /** Indicates how the payment method is intended to be used in the future. */
317
+ usage?: string | null;
318
+ /** Time at which the object was created. Measured in seconds since the Unix epoch. */
319
+ created?: number | null;
320
+ /** The most recent SetupAttempt for this SetupIntent. */
321
+ latest_attempt?: ISetupAttempt | null;
322
+ /** Has the value true if the object exists in live mode or the value false if the object exists in test mode. */
323
+ livemode?: boolean | null;
324
+ /** ID of the multi use Mandate generated by the SetupIntent. */
325
+ mandate?: string | null;
326
+ /** ID of the single_use Mandate generated by the SetupIntent. */
327
+ single_use_mandate?: string | null;
328
+ /** ID of the Connect application that created the SetupIntent. */
329
+ application?: string | null;
330
+ /** The account (if any) for which the setup is intended. */
331
+ on_behalf_of?: string | null;
332
+ /** Payment-method-specific configuration for this SetupIntent. */
333
+ payment_method_options?: IPaymentMethodOptions | null;
334
+ }
335
+ /** Properties of a SetupAttempt. */
336
+ export interface ISetupAttempt {
337
+ /** Unique identifier for the object. */
338
+ id?: string | null;
339
+ /** String representing the object’s type: "setup_attempt" */
340
+ object?: string | null;
341
+ /** ID of the Connect application that created the SetupIntent. */
342
+ application?: string | null;
343
+ /** Time at which the object was created. Measured in seconds since the Unix epoch. */
344
+ created?: number | null;
345
+ /** ID of the Customer this SetupIntent belongs to, if one exists. */
346
+ customer?: string | null;
347
+ /** Has the value true if the object exists in live mode or the value false if the object exists in test mode. */
348
+ livemode?: boolean | null;
349
+ /** The account (if any) for which the setup is intended. */
350
+ on_behalf_of?: string | null;
351
+ /** ID of the payment method used with this SetupAttempt. */
352
+ payment_method?: string | null;
353
+ /** Details about the payment method at the time of SetupIntent confirmation. */
354
+ payment_method_details?: IPaymentMethodDetails | null;
355
+ /** The error encountered during this attempt to confirm the SetupIntent, if any. */
356
+ setup_error?: ISetupError | null;
357
+ /** ID of the SetupIntent that this attempt belongs to. */
358
+ setup_intent?: string | null;
359
+ /** Status of this SetupAttempt, one of requires_confirmation, requires_action, processing, succeeded, failed, or abandoned. */
360
+ status?: string | null;
361
+ /** The value of usage on the SetupIntent at the time of this confirmation, one of off_session or on_session. */
362
+ usage?: string | null;
363
+ }
364
+ /** Properties of a SetupError. */
365
+ export interface ISetupError {
366
+ /** For some errors that could be handled programmatically, a short string indicating the error code reported. */
367
+ code?: string | null;
368
+ /** For card errors resulting from a card issuer decline, a short string indicating the card issuer’s reason for the decline if they provide one. */
369
+ decline_code?: string | null;
370
+ /** A URL to more information about the error code reported. */
371
+ doc_url?: string | null;
372
+ /** A human-readable message providing more details about the error. For card errors, these messages can be shown to your users. */
373
+ message?: string | null;
374
+ /** If the error is parameter-specific, the parameter related to the error. For example, you can use this to display a message near the correct form field. */
375
+ param?: string | null;
376
+ /** The PaymentMethod object for errors returned on a request involving a PaymentMethod. */
377
+ payment_method?: IPaymentMethod | null;
378
+ /** If the error is specific to the type of payment method, the payment method type that had a problem. This field is only populated for invoice-related errors. */
379
+ payment_method_type?: string | null;
380
+ /** The type of error returned. One of api_connection_error, api_error, authentication_error, card_error, idempotency_error, invalid_request_error, or rate_limit_error */
381
+ type?: string | null;
382
+ }
383
+ /** Properties of an ActivateTerminalRequest. */
384
+ export interface IActivateTerminalRequest {
385
+ /** An activation token obtained from Stripe that can be used to activate the reader */
386
+ pos_activation_token?: string | null;
387
+ /** The fingerprint for the POS authenticating to rabbit */
388
+ pos_device_id?: string | null;
389
+ /** The terminal hardware information */
390
+ pos_hardware_info?: any | null;
391
+ /** The terminal software information */
392
+ pos_software_info?: any | null;
393
+ /** Provide RPC error if reader is currently in use */
394
+ fail_if_in_use?: boolean | null;
395
+ /** The logical identity of terminal (i.e. lane number) authenticating to rabbit. */
396
+ terminal_id?: string | null;
397
+ /** ActivateTerminalRequest terminal_ip */
398
+ terminal_ip?: string | null;
399
+ /** The store name associated with the POS */
400
+ store_name?: string | null;
401
+ /** The store address associated with the POS */
402
+ store_address?: any | null;
403
+ }
404
+ /** Properties of a SetReaderDisplayRequest. */
405
+ export interface ISetReaderDisplayRequest {
406
+ /** SetReaderDisplayRequest type */
407
+ type?: string | null;
408
+ /** SetReaderDisplayRequest cart */
409
+ cart?: ICart | null;
410
+ }
411
+ export interface ICart {
412
+ /** All line items in the basket */
413
+ line_items?: ILineItem[] | null;
414
+ /** Modifiers that have been applied to the basket. */
415
+ modifiers?: IModifier[] | null;
416
+ /** Any discounts that have been added to the basket. */
417
+ discounts?: IDiscount[] | null;
418
+ /** Tenders that have been charged/refunded */
419
+ tenders?: ITender[] | null;
420
+ /** Total amount of tax */
421
+ tax?: number | null;
422
+ /** Total balance of cart due */
423
+ total?: number | null;
424
+ /** The currency of the basket (i.e. USD or AUD). */
425
+ currency?: string | null;
426
+ }
427
+ /** Properties of a LineItem. */
428
+ interface ILineItem {
429
+ /** LineItem quantity */
430
+ quantity?: number | null;
431
+ /** A detailed description of the item. */
432
+ description?: string | null;
433
+ /** This is equal to extended_price - discount + modifiers */
434
+ amount?: number | null;
435
+ /** The discounts that have been applied to this line item. */
436
+ discounts?: IDiscount[] | null;
437
+ /** The modifiers that have been applied to this line item. */
438
+ modifiers?: IModifier[] | null;
439
+ }
440
+ interface IModifier {
441
+ /** A detailed description of discount. */
442
+ description?: string | null;
443
+ /** Amount in cents of the modification. */
444
+ amount?: number | null;
445
+ }
446
+ /** Properties of a Discount. */
447
+ interface IDiscount {
448
+ /** A detailed description of discount. */
449
+ description?: string | null;
450
+ /** The amount and mechanism of the discount */
451
+ amount?: number | null;
452
+ }
453
+ /** Properties of a Tender. */
454
+ interface ITender {
455
+ /** A detailed description of tender. */
456
+ description?: string | null;
457
+ /** Amount in cents of the tender. */
458
+ amount?: number | null;
459
+ }
460
+ interface ILastSetupError {
461
+ /** For some errors that could be handled programmatically, a short string indicating the error code reported. */
462
+ code?: string | null;
463
+ /** For card errors resulting from a card issuer decline, a short string indicating the card issuer’s reason for the decline if they provide one. */
464
+ decline_code?: string | null;
465
+ /** A URL to more information about the error code reported. */
466
+ doc_url?: string | null;
467
+ /** A human-readable message providing more details about the error. For card errors, these messages can be shown to users. */
468
+ message?: string | null;
469
+ /** If the error is parameter-specific, the parameter related to the error. For example, you can use this to display a message near the correct form field. */
470
+ param?: string | null;
471
+ /** The PaymentMethod object for errors returned on a request involving a PaymentMethod. */
472
+ payment_method?: IPaymentMethod | null;
473
+ /** One of: api_connection_error, api_error, authentication_error, card_error, idempotency_error, invalid_request_error, or rate_limit_error */
474
+ type?: string | null;
475
+ }
476
+ interface INextAction {
477
+ /** Contains instructions for authenticating by redirecting your customer to another page or application. */
478
+ redirect_to_url?: IRedirectToUrl | null;
479
+ /** Type of the next action to perform, one of redirect_to_url or use_stripe_sdk. */
480
+ type?: string | null;
481
+ /** When confirming a SetupIntent with Stripe.js, Stripe.js depends on the contents of this dictionary to invoke authentication flows. */
482
+ use_stripe_sdk?: {
483
+ [k: string]: string;
484
+ } | null;
485
+ }
486
+ interface IRedirectToUrl {
487
+ /** If the customer does not exit their browser while authenticating, they will be redirected to this specified URL after completion. */
488
+ return_url?: string | null;
489
+ /** The URL you must redirect your customer to in order to authenticate. */
490
+ url?: string | null;
491
+ }
492
+ interface IPaymentMethodOptions {
493
+ /** PaymentMethodOptions card */
494
+ card?: ICardOptions | null;
495
+ }
496
+ interface ICardOptions {
497
+ /** CardOptions request_three_d_secure */
498
+ request_three_d_secure?: Request3dSecureType | null;
499
+ }
500
+ declare type Request3dSecureType = 'automatic' | 'any';
501
+ export {};
@@ -0,0 +1,2 @@
1
+ export {};
2
+ //# sourceMappingURL=proto.js.map
@@ -0,0 +1 @@
1
+ {"version":3,"file":"proto.js","sourceRoot":"","sources":["../../../src/stripe-types/proto.ts"],"names":[],"mappings":"","sourcesContent":["/** Properties of a TipOption. */\ninterface ITipOption {\n /** REQUIRED: Amount of this tip option */\n amount?: number | null;\n\n /** Descriptor of the amount, displayed in the button */\n label?: string | null;\n}\n/** Properties of a TipConfiguration. */\nexport interface ITipConfiguration {\n /** List of at most 3 options */\n options?: ITipOption[] | null;\n\n /** Hide the custom amount button */\n hide_custom_amount?: boolean | null;\n}\n/** Properties of a TipSelection. */\ninterface ITipSelection {\n /** Amount associated with the selection */\n amount?: number | null;\n}\n/** CreditCardBrand enum. */\ntype CreditCardBrand =\n | 'INVALID_CREDIT_CARD_BRAND'\n | 'UNKNOWN_CREDIT'\n | 'AMERICAN_EXPRESS'\n | 'DINERS'\n | 'DISCOVER'\n | 'JCB'\n | 'MASTERCARD'\n | 'VISA'\n | 'CUP';\n\n/** CardEntryMethod enum. */\ntype CardEntryMethod =\n | 'INVALID_ENTRY_METHOD'\n | 'CHIP_READ'\n | 'CONTACTLESS'\n | 'FSWIPE'\n | 'KEYED'\n | 'SWIPED'\n | 'BARCODE_READ';\n/** Properties of a CardPaymentMethod. */\ninterface ICardPaymentMethod {\n /** Masked card data */\n masked_pan?: string | null;\n\n /** The card expiration date */\n expiration_date?: string | null;\n\n /** Brand of credit card tender, determined by BIN table lookup */\n card_brand?: CreditCardBrand | null;\n\n /** Entry method of payment */\n card_entry_method?: CardEntryMethod | null;\n}\n/** Properties of a PaymentMethod. */\nexport interface IPaymentMethod {\n /** PaymentMethod card_payment */\n card_payment?: ICardPaymentMethod | null;\n\n /** Tip selection chosen by the cardholder */\n tip_selection?: ITipSelection | null;\n}\n/** Properties of a PaymentMethod. */\nexport interface IPaymentMethodReadReusableResponse {\n /** Unique identifier for the Payment Method object */\n id?: string | null;\n\n /** Time at which the Payment Method object was created. Measured in seconds since the Unix epoch */\n created?: number | null;\n\n /** Customer ID */\n customer?: string | null;\n\n /** Whether this charge was made in live mode or not */\n livemode?: boolean | null;\n\n /** Meta data in JSON format */\n metadata?: { [k: string]: string } | null;\n\n /** PaymentMethod type */\n type?: string | null;\n\n /** Card representation of payment method */\n card?: ICardPaymentMethodReadReusableResponse | null;\n}\n\n/** Properties of a CardPaymentMethod. */\ninterface ICardPaymentMethodReadReusableResponse {\n /** Masked card data */\n masked_pan?: string | null;\n\n /** The card expiration date */\n expiration_date?: string | null;\n\n /** Brand of credit card tender, determined by BIN table lookup */\n card_brand?: CreditCardBrand | null;\n\n /** Entry method of payment */\n card_entry_method?: CardEntryMethod | null;\n}\n\n/** Properties of an ErrorResponse. */\nexport interface IErrorResponse {\n /** The type of error returned. */\n type?: string | null;\n\n /** ID of failed charge */\n charge?: string | null;\n\n /** For some errors that could be handled programmatically, a short string indicating the error code reported. (https://stripe.com/docs/error-codes) */\n code?: string | null;\n\n /** For card errors resulting from a card issuer decline, a short string indicating the card issuer’s reason for the decline if they provide one. (https://stripe.com/docs/declines#issuer-declines) */\n decline_code?: string | null;\n\n /** A URL to more information about the error code reported. */\n doc_url?: string | null;\n\n /** A human-readable message providing more details about the error. For card errors, these messages can be shown to your users. */\n message?: string | null;\n\n /** If the error is parameter-specific, the parameter related to the error. For example, you can use this to display a message near the correct form field. */\n param?: string | null;\n\n /** Source used for the error */\n source?: ISource | null;\n\n /** Payment intent used for the error */\n payment_intent?: IPaymentIntent | null;\n}\n/** Properties of an Owner. */\nexport interface IOwner {\n /** Owner address */\n address?: string | null;\n\n /** Owner email */\n email?: string | null;\n\n /** Owner name */\n name?: string | null;\n\n /** Owner phone */\n phone?: string | null;\n\n /** Owner verified_address */\n verified_address?: string | null;\n\n /** Owner verified_email */\n verified_email?: string | null;\n\n /** Owner verified_name */\n verified_name?: string | null;\n\n /** Owner verified_phone */\n verified_phone?: string | null;\n}\n/** Properties of a PaymentMethodDetails. */\nexport interface IPaymentMethodDetails {\n /** Payment Method type (e.g. \"card_present\") */\n type?: string | null;\n\n /** PaymentMethodDetails card_present */\n card_present?: ICardPresent | null;\n\n /** PaymentMethodDetails interac_present */\n interac_present?: ICardPresent | null;\n}\n/** Properties of a Refund. */\ninterface IRefund {\n /** Refund id */\n id?: string | null;\n\n /** Refund amount */\n amount?: number | null;\n\n /** Refund charge */\n charge?: string | null;\n\n /** Time at which the Refund object was created. Measured in seconds since the Unix epoch */\n created?: number | null;\n\n /** Three-letter ISO currency code, in lowercase. Must be a supported currency */\n currency?: string | null;\n\n /** Meta data in JSON format */\n metadata?: { [k: string]: string } | null;\n\n /** Reason for refund */\n reason?: string | null;\n\n /** Status of refund */\n status?: string | null;\n\n /** Actual details of the payment method */\n payment_method_details?: IPaymentMethodDetails | null;\n\n /** If the refund failed, the reason for refund failure if known. */\n failure_reason?: string | null;\n}\n/** Properties of a Refunds. */\ninterface IRefunds {\n /** Refunds data */\n data?: IRefund[] | null;\n\n /** Refunds has_more */\n has_more?: boolean | null;\n\n /** Refunds total_count */\n total_count?: number | null;\n}\n/** Properties of a Charge. */\ninterface ICharge {\n /** ID for charge */\n id?: string | null;\n\n /** Amount that is associated with the charge */\n amount?: number | null;\n\n /** Amount that is associated with a refund of the charge */\n amount_refunded?: number | null;\n\n /** Whether this charge has been captured */\n captured?: boolean | null;\n\n /** Whether this charge has been refunded */\n refunded?: boolean | null;\n\n /** Time at which the Charge object was created. Measured in seconds since the Unix epoch */\n created?: number | null;\n\n /** Three-letter ISO currency code, in lowercase. Must be a supported currency. */\n currency?: string | null;\n\n /** An arbitrary string attached to the object. Often useful for displaying to users. */\n description?: string | null;\n\n /** An arbitrary string to be displayed on your customer's credit card statement. */\n statement_descriptor?: string | null;\n\n /** Email address that the receipt for the resulting payment will be sent to. */\n receipt_email?: string | null;\n\n /** Failure code if the charge was declined */\n failure_code?: string | null;\n\n /** Message associated with the failure code */\n failure_message?: string | null;\n\n /** Whether this charge was made in live mode or not */\n livemode?: boolean | null;\n\n /** Meta data in JSON format */\n metadata?: { [k: string]: string } | null;\n\n /** Source associated with the charge */\n source?: ISource | null;\n\n /** Payment intent ID associated with the charge */\n payment_intent?: string | null;\n\n /** Status of the charge */\n status?: string | null;\n\n /** Payment method ID */\n payment_method?: string | null;\n\n /** Actual details of the payment method */\n payment_method_details?: IPaymentMethodDetails | null;\n\n /** Whether the charge was paid */\n paid?: boolean | null;\n\n /** Receipt URL */\n receipt_url?: string | null;\n\n /** Refunds associated with charge */\n refunds?: IRefunds | null;\n}\n/** Properties of a Charges. */\ninterface ICharges {\n /** Charges data */\n data?: ICharge[] | null;\n\n /** Charges has_more */\n has_more?: boolean | null;\n\n /** Charges total_count */\n total_count?: number | null;\n}\n/** Properties of a CardPresent. */\ninterface ICardPresent {\n /** The last four digits of the card. */\n last4?: string | null;\n\n /** Card brand */\n brand?: string | null;\n\n /** Customer's signature if signed */\n evidence_customer_signature?: string | null;\n\n /** Method used by POS to read the card */\n read_method?: string | null;\n\n /** The EMV authorization response payload */\n emv_auth_data?: string | null;\n\n /** The EMV authorization response code */\n authorization_response_code?: string | null;\n\n /** AID */\n dedicated_file_name?: string | null;\n\n /** AID name */\n application_preferred_name?: string | null;\n\n /** TVR */\n terminal_verification_results?: string | null;\n\n /** TSI */\n transaction_status_information?: string | null;\n\n /** CVM type */\n cvm_type?: string | null;\n\n /** CardPresent reader */\n reader?: string | null;\n\n /** CardPresent fingerprint */\n fingerprint?: string | null;\n\n /** CardPresent authorization_code */\n authorization_code?: string | null;\n}\n/** Properties of a Source. */\nexport interface ISource {\n /** Unique identifier for the source card object. */\n id?: string | null;\n\n /** Source type (e.g. \"card_present\") */\n type?: string | null;\n\n /** Card payment method */\n card_present?: ICardPresent | null;\n\n /** Interac version of card present */\n interac_present?: ICardPresent | null;\n\n /** Meta data in JSON format */\n metadata?: { [k: string]: string } | null;\n\n /** Owner data */\n owner?: IOwner | null;\n}\nexport interface IPaymentIntent {\n /** Unique identifier for the Payment Intent object */\n id?: string | null;\n\n /** Time at which the Payment Intent object was created. Measured in seconds since the Unix epoch */\n created?: number | null;\n\n /** Status of this PaymentIntent */\n status?: string | null;\n\n /** Amount intended to be collected by this Payment Intent */\n amount?: number | null;\n\n /** Three-letter ISO currency code, in lowercase. Must be a supported currency. */\n currency?: string | null;\n\n /** Card present payment source field map */\n source?: ISource | null;\n\n /** An arbitrary string to be displayed on your customer's credit card statement. */\n statement_descriptor?: string | null;\n\n /** An arbitrary string attached to the object. Often useful for displaying to users. */\n description?: string | null;\n\n /** Email address that the receipt for the resulting payment will be sent to. */\n receipt_email?: string | null;\n\n /** Whether this charge was made in live mode or not */\n livemode?: boolean | null;\n\n /** Last payment error on a charge (if retrieved) */\n last_payment_error?: IErrorResponse | null;\n\n /** Meta data in JSON format */\n metadata?: { [k: string]: string } | null;\n\n /** Charges associated with the payment intent */\n charges?: ICharges | null;\n\n /** ID for payment method */\n payment_method?: string | null;\n}\n\nexport interface ISetupIntent {\n /** Unique identifier for the object. */\n id?: string | null;\n\n /** The client secret of this SetupIntent. Used for client-side retrieval using a publishable key. */\n client_secret?: string | null;\n\n /** ID of the Customer this SetupIntent belongs to, if one exists. */\n customer?: string | null;\n\n /** An arbitrary string attached to the object. Often useful for displaying to users. */\n description?: string | null;\n\n /** The error encountered in the previous SetupIntent confirmation. */\n last_setup_error?: ILastSetupError | null;\n\n /** Meta data in JSON format */\n metadata?: { [k: string]: string } | null;\n\n /** If present, this property tells you what actions you need to take in order for your customer to continue payment setup. */\n next_action?: INextAction | null;\n\n /** ID of the payment method used with this SetupIntent. */\n payment_method?: string | null;\n\n /** The list of payment method types (e.g. card) that this SetupIntent is allowed to set up. */\n payment_method_types?: string[] | null;\n\n /** Status of this SetupIntent, one of requires_payment_method, requires_confirmation, requires_action, processing, canceled, or succeeded. */\n status?: string | null;\n\n /** Indicates how the payment method is intended to be used in the future. */\n usage?: string | null;\n\n /** Time at which the object was created. Measured in seconds since the Unix epoch. */\n created?: number | null;\n\n /** The most recent SetupAttempt for this SetupIntent. */\n latest_attempt?: ISetupAttempt | null;\n\n /** Has the value true if the object exists in live mode or the value false if the object exists in test mode. */\n livemode?: boolean | null;\n\n /** ID of the multi use Mandate generated by the SetupIntent. */\n mandate?: string | null;\n\n /** ID of the single_use Mandate generated by the SetupIntent. */\n single_use_mandate?: string | null;\n\n /** ID of the Connect application that created the SetupIntent. */\n application?: string | null;\n\n /** The account (if any) for which the setup is intended. */\n on_behalf_of?: string | null;\n\n /** Payment-method-specific configuration for this SetupIntent. */\n payment_method_options?: IPaymentMethodOptions | null;\n}\n\n/** Properties of a SetupAttempt. */\nexport interface ISetupAttempt {\n /** Unique identifier for the object. */\n id?: string | null;\n\n /** String representing the object’s type: \"setup_attempt\" */\n object?: string | null;\n\n /** ID of the Connect application that created the SetupIntent. */\n application?: string | null;\n\n /** Time at which the object was created. Measured in seconds since the Unix epoch. */\n created?: number | null;\n\n /** ID of the Customer this SetupIntent belongs to, if one exists. */\n customer?: string | null;\n\n /** Has the value true if the object exists in live mode or the value false if the object exists in test mode. */\n livemode?: boolean | null;\n\n /** The account (if any) for which the setup is intended. */\n on_behalf_of?: string | null;\n\n /** ID of the payment method used with this SetupAttempt. */\n payment_method?: string | null;\n\n /** Details about the payment method at the time of SetupIntent confirmation. */\n payment_method_details?: IPaymentMethodDetails | null;\n\n /** The error encountered during this attempt to confirm the SetupIntent, if any. */\n setup_error?: ISetupError | null;\n\n /** ID of the SetupIntent that this attempt belongs to. */\n setup_intent?: string | null;\n\n /** Status of this SetupAttempt, one of requires_confirmation, requires_action, processing, succeeded, failed, or abandoned. */\n status?: string | null;\n\n /** The value of usage on the SetupIntent at the time of this confirmation, one of off_session or on_session. */\n usage?: string | null;\n}\n\n/** Properties of a SetupError. */\nexport interface ISetupError {\n /** For some errors that could be handled programmatically, a short string indicating the error code reported. */\n code?: string | null;\n\n /** For card errors resulting from a card issuer decline, a short string indicating the card issuer’s reason for the decline if they provide one. */\n decline_code?: string | null;\n\n /** A URL to more information about the error code reported. */\n doc_url?: string | null;\n\n /** A human-readable message providing more details about the error. For card errors, these messages can be shown to your users. */\n message?: string | null;\n\n /** If the error is parameter-specific, the parameter related to the error. For example, you can use this to display a message near the correct form field. */\n param?: string | null;\n\n /** The PaymentMethod object for errors returned on a request involving a PaymentMethod. */\n payment_method?: IPaymentMethod | null;\n\n /** If the error is specific to the type of payment method, the payment method type that had a problem. This field is only populated for invoice-related errors. */\n payment_method_type?: string | null;\n\n /** The type of error returned. One of api_connection_error, api_error, authentication_error, card_error, idempotency_error, invalid_request_error, or rate_limit_error */\n type?: string | null;\n}\n\n/** Properties of an ActivateTerminalRequest. */\nexport interface IActivateTerminalRequest {\n /** An activation token obtained from Stripe that can be used to activate the reader */\n pos_activation_token?: string | null;\n\n /** The fingerprint for the POS authenticating to rabbit */\n pos_device_id?: string | null;\n\n /** The terminal hardware information */\n pos_hardware_info?: any | null;\n\n /** The terminal software information */\n pos_software_info?: any | null;\n\n /** Provide RPC error if reader is currently in use */\n fail_if_in_use?: boolean | null;\n\n /** The logical identity of terminal (i.e. lane number) authenticating to rabbit. */\n terminal_id?: string | null;\n\n /** ActivateTerminalRequest terminal_ip */\n terminal_ip?: string | null;\n\n /** The store name associated with the POS */\n store_name?: string | null;\n\n /** The store address associated with the POS */\n store_address?: any | null;\n}\n\n/** Properties of a SetReaderDisplayRequest. */\nexport interface ISetReaderDisplayRequest {\n /** SetReaderDisplayRequest type */\n type?: string | null;\n\n /** SetReaderDisplayRequest cart */\n cart?: ICart | null;\n}\n\nexport interface ICart {\n /** All line items in the basket */\n line_items?: ILineItem[] | null;\n\n /** Modifiers that have been applied to the basket. */\n modifiers?: IModifier[] | null;\n\n /** Any discounts that have been added to the basket. */\n discounts?: IDiscount[] | null;\n\n /** Tenders that have been charged/refunded */\n tenders?: ITender[] | null;\n\n /** Total amount of tax */\n tax?: number | null;\n\n /** Total balance of cart due */\n total?: number | null;\n\n /** The currency of the basket (i.e. USD or AUD). */\n currency?: string | null;\n}\n\n/** Properties of a LineItem. */\ninterface ILineItem {\n /** LineItem quantity */\n quantity?: number | null;\n\n /** A detailed description of the item. */\n description?: string | null;\n\n /** This is equal to extended_price - discount + modifiers */\n amount?: number | null;\n\n /** The discounts that have been applied to this line item. */\n discounts?: IDiscount[] | null;\n\n /** The modifiers that have been applied to this line item. */\n modifiers?: IModifier[] | null;\n}\n\ninterface IModifier {\n /** A detailed description of discount. */\n description?: string | null;\n\n /** Amount in cents of the modification. */\n amount?: number | null;\n}\n/** Properties of a Discount. */\ninterface IDiscount {\n /** A detailed description of discount. */\n description?: string | null;\n\n /** The amount and mechanism of the discount */\n amount?: number | null;\n}\n/** Properties of a Tender. */\ninterface ITender {\n /** A detailed description of tender. */\n description?: string | null;\n\n /** Amount in cents of the tender. */\n amount?: number | null;\n}\n\ninterface ILastSetupError {\n /** For some errors that could be handled programmatically, a short string indicating the error code reported. */\n code?: string | null;\n\n /** For card errors resulting from a card issuer decline, a short string indicating the card issuer’s reason for the decline if they provide one. */\n decline_code?: string | null;\n\n /** A URL to more information about the error code reported. */\n doc_url?: string | null;\n\n /** A human-readable message providing more details about the error. For card errors, these messages can be shown to users. */\n message?: string | null;\n\n /** If the error is parameter-specific, the parameter related to the error. For example, you can use this to display a message near the correct form field. */\n param?: string | null;\n\n /** The PaymentMethod object for errors returned on a request involving a PaymentMethod. */\n payment_method?: IPaymentMethod | null;\n\n /** One of: api_connection_error, api_error, authentication_error, card_error, idempotency_error, invalid_request_error, or rate_limit_error */\n type?: string | null;\n}\n\ninterface INextAction {\n /** Contains instructions for authenticating by redirecting your customer to another page or application. */\n redirect_to_url?: IRedirectToUrl | null;\n\n /** Type of the next action to perform, one of redirect_to_url or use_stripe_sdk. */\n type?: string | null;\n\n /** When confirming a SetupIntent with Stripe.js, Stripe.js depends on the contents of this dictionary to invoke authentication flows. */\n use_stripe_sdk?: { [k: string]: string } | null;\n}\n\ninterface IRedirectToUrl {\n /** If the customer does not exit their browser while authenticating, they will be redirected to this specified URL after completion. */\n return_url?: string | null;\n\n /** The URL you must redirect your customer to in order to authenticate. */\n url?: string | null;\n}\ninterface IPaymentMethodOptions {\n /** PaymentMethodOptions card */\n card?: ICardOptions | null;\n}\n\ninterface ICardOptions {\n /** CardOptions request_three_d_secure */\n request_three_d_secure?: Request3dSecureType | null;\n}\n\ntype Request3dSecureType = 'automatic' | 'any';\n"]}