increase 0.11.3 → 0.11.5

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 (97) hide show
  1. package/CHANGELOG.md +23 -0
  2. package/README.md +1 -1
  3. package/index.d.mts +12 -0
  4. package/index.d.ts +12 -0
  5. package/index.d.ts.map +1 -1
  6. package/index.js +6 -0
  7. package/index.js.map +1 -1
  8. package/index.mjs +6 -0
  9. package/index.mjs.map +1 -1
  10. package/package.json +1 -1
  11. package/resources/card-payments.d.ts +1797 -0
  12. package/resources/card-payments.d.ts.map +1 -0
  13. package/resources/card-payments.js +28 -0
  14. package/resources/card-payments.js.map +1 -0
  15. package/resources/card-payments.mjs +23 -0
  16. package/resources/card-payments.mjs.map +1 -0
  17. package/resources/cards.d.ts +7 -1
  18. package/resources/cards.d.ts.map +1 -1
  19. package/resources/cards.js.map +1 -1
  20. package/resources/cards.mjs.map +1 -1
  21. package/resources/entities/entities.d.ts +16 -6
  22. package/resources/entities/entities.d.ts.map +1 -1
  23. package/resources/entities/entities.js.map +1 -1
  24. package/resources/entities/entities.mjs.map +1 -1
  25. package/resources/event-subscriptions.d.ts +40 -2
  26. package/resources/event-subscriptions.d.ts.map +1 -1
  27. package/resources/event-subscriptions.js.map +1 -1
  28. package/resources/event-subscriptions.mjs.map +1 -1
  29. package/resources/events.d.ts +21 -2
  30. package/resources/events.d.ts.map +1 -1
  31. package/resources/events.js.map +1 -1
  32. package/resources/events.mjs.map +1 -1
  33. package/resources/files.d.ts +4 -0
  34. package/resources/files.d.ts.map +1 -1
  35. package/resources/files.js.map +1 -1
  36. package/resources/files.mjs.map +1 -1
  37. package/resources/index.d.ts +2 -0
  38. package/resources/index.d.ts.map +1 -1
  39. package/resources/index.js +8 -2
  40. package/resources/index.js.map +1 -1
  41. package/resources/index.mjs +2 -0
  42. package/resources/index.mjs.map +1 -1
  43. package/resources/physical-cards.d.ts +318 -0
  44. package/resources/physical-cards.d.ts.map +1 -0
  45. package/resources/physical-cards.js +40 -0
  46. package/resources/physical-cards.js.map +1 -0
  47. package/resources/physical-cards.mjs +35 -0
  48. package/resources/physical-cards.mjs.map +1 -0
  49. package/resources/simulations/ach-transfers.d.ts +5 -5
  50. package/resources/simulations/ach-transfers.d.ts.map +1 -1
  51. package/resources/simulations/index.d.ts +1 -0
  52. package/resources/simulations/index.d.ts.map +1 -1
  53. package/resources/simulations/index.js +3 -1
  54. package/resources/simulations/index.js.map +1 -1
  55. package/resources/simulations/index.mjs +1 -0
  56. package/resources/simulations/index.mjs.map +1 -1
  57. package/resources/simulations/interest-payments.d.ts +5 -5
  58. package/resources/simulations/interest-payments.d.ts.map +1 -1
  59. package/resources/simulations/physical-cards.d.ts +34 -0
  60. package/resources/simulations/physical-cards.d.ts.map +1 -0
  61. package/resources/simulations/physical-cards.js +19 -0
  62. package/resources/simulations/physical-cards.js.map +1 -0
  63. package/resources/simulations/physical-cards.mjs +15 -0
  64. package/resources/simulations/physical-cards.mjs.map +1 -0
  65. package/resources/simulations/real-time-payments-transfers.d.ts +5 -5
  66. package/resources/simulations/real-time-payments-transfers.d.ts.map +1 -1
  67. package/resources/simulations/simulations.d.ts +4 -0
  68. package/resources/simulations/simulations.d.ts.map +1 -1
  69. package/resources/simulations/simulations.js +3 -0
  70. package/resources/simulations/simulations.js.map +1 -1
  71. package/resources/simulations/simulations.mjs +3 -0
  72. package/resources/simulations/simulations.mjs.map +1 -1
  73. package/resources/simulations/wire-transfers.d.ts +5 -5
  74. package/resources/simulations/wire-transfers.d.ts.map +1 -1
  75. package/resources/transactions.d.ts +6 -6
  76. package/resources/transactions.d.ts.map +1 -1
  77. package/src/index.ts +14 -0
  78. package/src/resources/card-payments.ts +2284 -0
  79. package/src/resources/cards.ts +8 -1
  80. package/src/resources/entities/entities.ts +18 -6
  81. package/src/resources/event-subscriptions.ts +64 -0
  82. package/src/resources/events.ts +45 -0
  83. package/src/resources/files.ts +5 -0
  84. package/src/resources/index.ts +9 -0
  85. package/src/resources/physical-cards.ts +394 -0
  86. package/src/resources/simulations/ach-transfers.ts +6 -6
  87. package/src/resources/simulations/index.ts +1 -0
  88. package/src/resources/simulations/interest-payments.ts +6 -6
  89. package/src/resources/simulations/physical-cards.ts +51 -0
  90. package/src/resources/simulations/real-time-payments-transfers.ts +6 -6
  91. package/src/resources/simulations/simulations.ts +5 -0
  92. package/src/resources/simulations/wire-transfers.ts +6 -6
  93. package/src/resources/transactions.ts +8 -8
  94. package/src/version.ts +1 -1
  95. package/version.d.ts +1 -1
  96. package/version.js +1 -1
  97. package/version.mjs +1 -1
@@ -0,0 +1,2284 @@
1
+ // File generated from our OpenAPI spec by Stainless.
2
+
3
+ import * as Core from "../e/core";
4
+ import { APIResource } from "../e/resource";
5
+ import { isRequestOptions } from "../e/core";
6
+ import * as API from './index';
7
+ import { Page, PageParams } from "../e/pagination";
8
+
9
+ export class CardPayments extends APIResource {
10
+ /**
11
+ * Retrieve a Card Payment
12
+ */
13
+ retrieve(cardPaymentId: string, options?: Core.RequestOptions): Core.APIPromise<CardPayment> {
14
+ return this.get(`/card_payments/${cardPaymentId}`, options);
15
+ }
16
+
17
+ /**
18
+ * List Card Payments
19
+ */
20
+ list(
21
+ query?: CardPaymentListParams,
22
+ options?: Core.RequestOptions,
23
+ ): Core.PagePromise<CardPaymentsPage, CardPayment>;
24
+ list(options?: Core.RequestOptions): Core.PagePromise<CardPaymentsPage, CardPayment>;
25
+ list(
26
+ query: CardPaymentListParams | Core.RequestOptions = {},
27
+ options?: Core.RequestOptions,
28
+ ): Core.PagePromise<CardPaymentsPage, CardPayment> {
29
+ if (isRequestOptions(query)) {
30
+ return this.list({}, query);
31
+ }
32
+ return this.getAPIList('/card_payments', CardPaymentsPage, { query, ...options });
33
+ }
34
+ }
35
+
36
+ export class CardPaymentsPage extends Page<CardPayment> {}
37
+ // alias so we can export it in the namespace
38
+ type _CardPaymentsPage = CardPaymentsPage;
39
+
40
+ /**
41
+ * Card Payments group together interactions related to a single card payment, such
42
+ * as an authorization and its corresponding settlement.
43
+ */
44
+ export interface CardPayment {
45
+ /**
46
+ * The Card Payment identifier.
47
+ */
48
+ id: string;
49
+
50
+ /**
51
+ * The identifier for the Account the Transaction belongs to.
52
+ */
53
+ account_id: string;
54
+
55
+ /**
56
+ * The Card identifier for this payment.
57
+ */
58
+ card_id: string;
59
+
60
+ /**
61
+ * The [ISO 8601](https://en.wikipedia.org/wiki/ISO_8601) time at which the Card
62
+ * Payment was created.
63
+ */
64
+ created_at: string;
65
+
66
+ /**
67
+ * The interactions related to this card payment.
68
+ */
69
+ elements: Array<CardPayment.Element>;
70
+
71
+ /**
72
+ * The summarized state of this card payment.
73
+ */
74
+ state: CardPayment.State;
75
+
76
+ /**
77
+ * A constant representing the object's type. For this resource it will always be
78
+ * `card_payment`.
79
+ */
80
+ type: 'card_payment';
81
+ }
82
+
83
+ export namespace CardPayment {
84
+ export interface Element {
85
+ /**
86
+ * A Card Authorization object. This field will be present in the JSON response if
87
+ * and only if `category` is equal to `card_authorization`.
88
+ */
89
+ card_authorization: Element.CardAuthorization | null;
90
+
91
+ /**
92
+ * A Card Authorization Expiration object. This field will be present in the JSON
93
+ * response if and only if `category` is equal to `card_authorization_expiration`.
94
+ */
95
+ card_authorization_expiration: Element.CardAuthorizationExpiration | null;
96
+
97
+ /**
98
+ * A Card Decline object. This field will be present in the JSON response if and
99
+ * only if `category` is equal to `card_decline`.
100
+ */
101
+ card_decline: Element.CardDecline | null;
102
+
103
+ /**
104
+ * A Card Increment object. This field will be present in the JSON response if and
105
+ * only if `category` is equal to `card_increment`.
106
+ */
107
+ card_increment: Element.CardIncrement | null;
108
+
109
+ /**
110
+ * A Card Refund object. This field will be present in the JSON response if and
111
+ * only if `category` is equal to `card_refund`.
112
+ */
113
+ card_refund: Element.CardRefund | null;
114
+
115
+ /**
116
+ * A Card Reversal object. This field will be present in the JSON response if and
117
+ * only if `category` is equal to `card_reversal`.
118
+ */
119
+ card_reversal: Element.CardReversal | null;
120
+
121
+ /**
122
+ * A Card Settlement object. This field will be present in the JSON response if and
123
+ * only if `category` is equal to `card_settlement`.
124
+ */
125
+ card_settlement: Element.CardSettlement | null;
126
+
127
+ /**
128
+ * A Card Validation object. This field will be present in the JSON response if and
129
+ * only if `category` is equal to `card_validation`.
130
+ */
131
+ card_validation: Element.CardValidation | null;
132
+
133
+ /**
134
+ * The type of the resource. We may add additional possible values for this enum
135
+ * over time; your application should be able to handle such additions gracefully.
136
+ *
137
+ * - `card_authorization` - Card Authorization: details will be under the
138
+ * `card_authorization` object.
139
+ * - `card_validation` - Card Validation: details will be under the
140
+ * `card_validation` object.
141
+ * - `card_decline` - Card Decline: details will be under the `card_decline`
142
+ * object.
143
+ * - `card_reversal` - Card Reversal: details will be under the `card_reversal`
144
+ * object.
145
+ * - `card_authorization_expiration` - Card Authorization Expiration: details will
146
+ * be under the `card_authorization_expiration` object.
147
+ * - `card_increment` - Card Increment: details will be under the `card_increment`
148
+ * object.
149
+ * - `card_settlement` - Card Settlement: details will be under the
150
+ * `card_settlement` object.
151
+ * - `card_refund` - Card Refund: details will be under the `card_refund` object.
152
+ * - `other` - Unknown card payment element.
153
+ */
154
+ category:
155
+ | 'card_authorization'
156
+ | 'card_validation'
157
+ | 'card_decline'
158
+ | 'card_reversal'
159
+ | 'card_authorization_expiration'
160
+ | 'card_increment'
161
+ | 'card_settlement'
162
+ | 'card_refund'
163
+ | 'other';
164
+
165
+ /**
166
+ * The [ISO 8601](https://en.wikipedia.org/wiki/ISO_8601) date and time at which
167
+ * the card payment element was created.
168
+ */
169
+ created_at: string;
170
+ }
171
+
172
+ export namespace Element {
173
+ /**
174
+ * A Card Authorization object. This field will be present in the JSON response if
175
+ * and only if `category` is equal to `card_authorization`.
176
+ */
177
+ export interface CardAuthorization {
178
+ /**
179
+ * The Card Authorization identifier.
180
+ */
181
+ id: string;
182
+
183
+ /**
184
+ * The pending amount in the minor unit of the transaction's currency. For dollars,
185
+ * for example, this is cents.
186
+ */
187
+ amount: number;
188
+
189
+ /**
190
+ * The ID of the Card Payment this transaction belongs to.
191
+ */
192
+ card_payment_id: string | null;
193
+
194
+ /**
195
+ * The [ISO 4217](https://en.wikipedia.org/wiki/ISO_4217) code for the
196
+ * transaction's currency.
197
+ *
198
+ * - `CAD` - Canadian Dollar (CAD)
199
+ * - `CHF` - Swiss Franc (CHF)
200
+ * - `EUR` - Euro (EUR)
201
+ * - `GBP` - British Pound (GBP)
202
+ * - `JPY` - Japanese Yen (JPY)
203
+ * - `USD` - US Dollar (USD)
204
+ */
205
+ currency: 'CAD' | 'CHF' | 'EUR' | 'GBP' | 'JPY' | 'USD';
206
+
207
+ /**
208
+ * If the authorization was made via a Digital Wallet Token (such as an Apple Pay
209
+ * purchase), the identifier of the token that was used.
210
+ */
211
+ digital_wallet_token_id: string | null;
212
+
213
+ /**
214
+ * The [ISO 8601](https://en.wikipedia.org/wiki/ISO_8601) when this authorization
215
+ * will expire and the pending transaction will be released.
216
+ */
217
+ expires_at: string;
218
+
219
+ /**
220
+ * The merchant identifier (commonly abbreviated as MID) of the merchant the card
221
+ * is transacting with.
222
+ */
223
+ merchant_acceptor_id: string;
224
+
225
+ /**
226
+ * The Merchant Category Code (commonly abbreviated as MCC) of the merchant the
227
+ * card is transacting with.
228
+ */
229
+ merchant_category_code: string | null;
230
+
231
+ /**
232
+ * The city the merchant resides in.
233
+ */
234
+ merchant_city: string | null;
235
+
236
+ /**
237
+ * The country the merchant resides in.
238
+ */
239
+ merchant_country: string | null;
240
+
241
+ /**
242
+ * The merchant descriptor of the merchant the card is transacting with.
243
+ */
244
+ merchant_descriptor: string;
245
+
246
+ /**
247
+ * Fields specific to the `network`.
248
+ */
249
+ network_details: CardAuthorization.NetworkDetails;
250
+
251
+ /**
252
+ * The identifier of the Pending Transaction associated with this Transaction.
253
+ */
254
+ pending_transaction_id: string | null;
255
+
256
+ /**
257
+ * If the authorization was made in-person with a physical card, the Physical Card
258
+ * that was used.
259
+ */
260
+ physical_card_id: string | null;
261
+
262
+ /**
263
+ * The identifier of the Real-Time Decision sent to approve or decline this
264
+ * transaction.
265
+ */
266
+ real_time_decision_id: string | null;
267
+
268
+ /**
269
+ * A constant representing the object's type. For this resource it will always be
270
+ * `card_authorization`.
271
+ */
272
+ type: 'card_authorization';
273
+ }
274
+
275
+ export namespace CardAuthorization {
276
+ /**
277
+ * Fields specific to the `network`.
278
+ */
279
+ export interface NetworkDetails {
280
+ /**
281
+ * The payment network used to process this card authorization.
282
+ *
283
+ * - `visa` - Visa
284
+ */
285
+ category: 'visa';
286
+
287
+ /**
288
+ * Fields specific to the `visa` network.
289
+ */
290
+ visa: NetworkDetails.Visa | null;
291
+ }
292
+
293
+ export namespace NetworkDetails {
294
+ /**
295
+ * Fields specific to the `visa` network.
296
+ */
297
+ export interface Visa {
298
+ /**
299
+ * For electronic commerce transactions, this identifies the level of security used
300
+ * in obtaining the customer's payment credential. For mail or telephone order
301
+ * transactions, identifies the type of mail or telephone order.
302
+ *
303
+ * - `mail_phone_order` - Single transaction of a mail/phone order: Use to indicate
304
+ * that the transaction is a mail/phone order purchase, not a recurring
305
+ * transaction or installment payment. For domestic transactions in the US
306
+ * region, this value may also indicate one bill payment transaction in the
307
+ * card-present or card-absent environments.
308
+ * - `recurring` - Recurring transaction: Payment indicator used to indicate a
309
+ * recurring transaction that originates from an acquirer in the US region.
310
+ * - `installment` - Installment payment: Payment indicator used to indicate one
311
+ * purchase of goods or services that is billed to the account in multiple
312
+ * charges over a period of time agreed upon by the cardholder and merchant from
313
+ * transactions that originate from an acquirer in the US region.
314
+ * - `unknown_mail_phone_order` - Unknown classification: other mail order: Use to
315
+ * indicate that the type of mail/telephone order is unknown.
316
+ * - `secure_electronic_commerce` - Secure electronic commerce transaction: Use to
317
+ * indicate that the electronic commerce transaction has been authenticated using
318
+ * e.g., 3-D Secure
319
+ * - `non_authenticated_security_transaction_at_3ds_capable_merchant` -
320
+ * Non-authenticated security transaction at a 3-D Secure-capable merchant, and
321
+ * merchant attempted to authenticate the cardholder using 3-D Secure: Use to
322
+ * identify an electronic commerce transaction where the merchant attempted to
323
+ * authenticate the cardholder using 3-D Secure, but was unable to complete the
324
+ * authentication because the issuer or cardholder does not participate in the
325
+ * 3-D Secure program.
326
+ * - `non_authenticated_security_transaction` - Non-authenticated security
327
+ * transaction: Use to identify an electronic commerce transaction that uses data
328
+ * encryption for security however , cardholder authentication is not performed
329
+ * using 3-D Secure.
330
+ * - `non_secure_transaction` - Non-secure transaction: Use to identify an
331
+ * electronic commerce transaction that has no data protection.
332
+ */
333
+ electronic_commerce_indicator:
334
+ | 'mail_phone_order'
335
+ | 'recurring'
336
+ | 'installment'
337
+ | 'unknown_mail_phone_order'
338
+ | 'secure_electronic_commerce'
339
+ | 'non_authenticated_security_transaction_at_3ds_capable_merchant'
340
+ | 'non_authenticated_security_transaction'
341
+ | 'non_secure_transaction'
342
+ | null;
343
+
344
+ /**
345
+ * The method used to enter the cardholder's primary account number and card
346
+ * expiration date.
347
+ *
348
+ * - `unknown` - Unknown
349
+ * - `manual` - Manual key entry
350
+ * - `magnetic_stripe_no_cvv` - Magnetic stripe read, without card verification
351
+ * value
352
+ * - `optical_code` - Optical code
353
+ * - `integrated_circuit_card` - Contact chip card
354
+ * - `contactless` - Contactless read of chip card
355
+ * - `credential_on_file` - Transaction initiated using a credential that has
356
+ * previously been stored on file
357
+ * - `magnetic_stripe` - Magnetic stripe read
358
+ * - `contactless_magnetic_stripe` - Contactless read of magnetic stripe data
359
+ * - `integrated_circuit_card_no_cvv` - Contact chip card, without card
360
+ * verification value
361
+ */
362
+ point_of_service_entry_mode:
363
+ | 'unknown'
364
+ | 'manual'
365
+ | 'magnetic_stripe_no_cvv'
366
+ | 'optical_code'
367
+ | 'integrated_circuit_card'
368
+ | 'contactless'
369
+ | 'credential_on_file'
370
+ | 'magnetic_stripe'
371
+ | 'contactless_magnetic_stripe'
372
+ | 'integrated_circuit_card_no_cvv'
373
+ | null;
374
+ }
375
+ }
376
+ }
377
+
378
+ /**
379
+ * A Card Authorization Expiration object. This field will be present in the JSON
380
+ * response if and only if `category` is equal to `card_authorization_expiration`.
381
+ */
382
+ export interface CardAuthorizationExpiration {
383
+ /**
384
+ * The Card Authorization Expiration identifier.
385
+ */
386
+ id: string;
387
+
388
+ /**
389
+ * The identifier for the Card Authorization this reverses.
390
+ */
391
+ card_authorization_id: string;
392
+
393
+ /**
394
+ * The [ISO 4217](https://en.wikipedia.org/wiki/ISO_4217) code for the reversal's
395
+ * currency.
396
+ *
397
+ * - `CAD` - Canadian Dollar (CAD)
398
+ * - `CHF` - Swiss Franc (CHF)
399
+ * - `EUR` - Euro (EUR)
400
+ * - `GBP` - British Pound (GBP)
401
+ * - `JPY` - Japanese Yen (JPY)
402
+ * - `USD` - US Dollar (USD)
403
+ */
404
+ currency: 'CAD' | 'CHF' | 'EUR' | 'GBP' | 'JPY' | 'USD';
405
+
406
+ /**
407
+ * The amount of this authorization expiration in the minor unit of the
408
+ * transaction's currency. For dollars, for example, this is cents.
409
+ */
410
+ expired_amount: number;
411
+
412
+ /**
413
+ * The card network used to process this card authorization.
414
+ *
415
+ * - `visa` - Visa
416
+ */
417
+ network: 'visa';
418
+
419
+ /**
420
+ * A constant representing the object's type. For this resource it will always be
421
+ * `card_authorization_expiration`.
422
+ */
423
+ type: 'card_authorization_expiration';
424
+ }
425
+
426
+ /**
427
+ * A Card Decline object. This field will be present in the JSON response if and
428
+ * only if `category` is equal to `card_decline`.
429
+ */
430
+ export interface CardDecline {
431
+ /**
432
+ * The Card Decline identifier.
433
+ */
434
+ id: string;
435
+
436
+ /**
437
+ * The declined amount in the minor unit of the destination account currency. For
438
+ * dollars, for example, this is cents.
439
+ */
440
+ amount: number;
441
+
442
+ /**
443
+ * The ID of the Card Payment this transaction belongs to.
444
+ */
445
+ card_payment_id: string | null;
446
+
447
+ /**
448
+ * The [ISO 4217](https://en.wikipedia.org/wiki/ISO_4217) code for the destination
449
+ * account currency.
450
+ *
451
+ * - `CAD` - Canadian Dollar (CAD)
452
+ * - `CHF` - Swiss Franc (CHF)
453
+ * - `EUR` - Euro (EUR)
454
+ * - `GBP` - British Pound (GBP)
455
+ * - `JPY` - Japanese Yen (JPY)
456
+ * - `USD` - US Dollar (USD)
457
+ */
458
+ currency: 'CAD' | 'CHF' | 'EUR' | 'GBP' | 'JPY' | 'USD';
459
+
460
+ /**
461
+ * If the authorization was made via a Digital Wallet Token (such as an Apple Pay
462
+ * purchase), the identifier of the token that was used.
463
+ */
464
+ digital_wallet_token_id: string | null;
465
+
466
+ /**
467
+ * The merchant identifier (commonly abbreviated as MID) of the merchant the card
468
+ * is transacting with.
469
+ */
470
+ merchant_acceptor_id: string;
471
+
472
+ /**
473
+ * The Merchant Category Code (commonly abbreviated as MCC) of the merchant the
474
+ * card is transacting with.
475
+ */
476
+ merchant_category_code: string | null;
477
+
478
+ /**
479
+ * The city the merchant resides in.
480
+ */
481
+ merchant_city: string | null;
482
+
483
+ /**
484
+ * The country the merchant resides in.
485
+ */
486
+ merchant_country: string | null;
487
+
488
+ /**
489
+ * The merchant descriptor of the merchant the card is transacting with.
490
+ */
491
+ merchant_descriptor: string;
492
+
493
+ /**
494
+ * The state the merchant resides in.
495
+ */
496
+ merchant_state: string | null;
497
+
498
+ /**
499
+ * Fields specific to the `network`.
500
+ */
501
+ network_details: CardDecline.NetworkDetails;
502
+
503
+ /**
504
+ * If the authorization was made in-person with a physical card, the Physical Card
505
+ * that was used.
506
+ */
507
+ physical_card_id: string | null;
508
+
509
+ /**
510
+ * The identifier of the Real-Time Decision sent to approve or decline this
511
+ * transaction.
512
+ */
513
+ real_time_decision_id: string | null;
514
+
515
+ /**
516
+ * Why the transaction was declined.
517
+ *
518
+ * - `card_not_active` - The Card was not active.
519
+ * - `physical_card_not_active` - The Physical Card was not active.
520
+ * - `entity_not_active` - The account's entity was not active.
521
+ * - `group_locked` - The account was inactive.
522
+ * - `insufficient_funds` - The Card's Account did not have a sufficient available
523
+ * balance.
524
+ * - `cvv2_mismatch` - The given CVV2 did not match the card's value.
525
+ * - `transaction_not_allowed` - The attempted card transaction is not allowed per
526
+ * Increase's terms.
527
+ * - `breaches_limit` - The transaction was blocked by a Limit.
528
+ * - `webhook_declined` - Your application declined the transaction via webhook.
529
+ * - `webhook_timed_out` - Your application webhook did not respond without the
530
+ * required timeout.
531
+ * - `declined_by_stand_in_processing` - Declined by stand-in processing.
532
+ * - `invalid_physical_card` - The card read had an invalid CVV, dCVV, or
533
+ * authorization request cryptogram.
534
+ * - `missing_original_authorization` - The original card authorization for this
535
+ * incremental authorization does not exist.
536
+ * - `suspected_fraud` - The transaction was suspected to be fraudulent. Please
537
+ * reach out to support@increase.com for more information.
538
+ */
539
+ reason:
540
+ | 'card_not_active'
541
+ | 'physical_card_not_active'
542
+ | 'entity_not_active'
543
+ | 'group_locked'
544
+ | 'insufficient_funds'
545
+ | 'cvv2_mismatch'
546
+ | 'transaction_not_allowed'
547
+ | 'breaches_limit'
548
+ | 'webhook_declined'
549
+ | 'webhook_timed_out'
550
+ | 'declined_by_stand_in_processing'
551
+ | 'invalid_physical_card'
552
+ | 'missing_original_authorization'
553
+ | 'suspected_fraud';
554
+ }
555
+
556
+ export namespace CardDecline {
557
+ /**
558
+ * Fields specific to the `network`.
559
+ */
560
+ export interface NetworkDetails {
561
+ /**
562
+ * The payment network used to process this card authorization.
563
+ *
564
+ * - `visa` - Visa
565
+ */
566
+ category: 'visa';
567
+
568
+ /**
569
+ * Fields specific to the `visa` network.
570
+ */
571
+ visa: NetworkDetails.Visa | null;
572
+ }
573
+
574
+ export namespace NetworkDetails {
575
+ /**
576
+ * Fields specific to the `visa` network.
577
+ */
578
+ export interface Visa {
579
+ /**
580
+ * For electronic commerce transactions, this identifies the level of security used
581
+ * in obtaining the customer's payment credential. For mail or telephone order
582
+ * transactions, identifies the type of mail or telephone order.
583
+ *
584
+ * - `mail_phone_order` - Single transaction of a mail/phone order: Use to indicate
585
+ * that the transaction is a mail/phone order purchase, not a recurring
586
+ * transaction or installment payment. For domestic transactions in the US
587
+ * region, this value may also indicate one bill payment transaction in the
588
+ * card-present or card-absent environments.
589
+ * - `recurring` - Recurring transaction: Payment indicator used to indicate a
590
+ * recurring transaction that originates from an acquirer in the US region.
591
+ * - `installment` - Installment payment: Payment indicator used to indicate one
592
+ * purchase of goods or services that is billed to the account in multiple
593
+ * charges over a period of time agreed upon by the cardholder and merchant from
594
+ * transactions that originate from an acquirer in the US region.
595
+ * - `unknown_mail_phone_order` - Unknown classification: other mail order: Use to
596
+ * indicate that the type of mail/telephone order is unknown.
597
+ * - `secure_electronic_commerce` - Secure electronic commerce transaction: Use to
598
+ * indicate that the electronic commerce transaction has been authenticated using
599
+ * e.g., 3-D Secure
600
+ * - `non_authenticated_security_transaction_at_3ds_capable_merchant` -
601
+ * Non-authenticated security transaction at a 3-D Secure-capable merchant, and
602
+ * merchant attempted to authenticate the cardholder using 3-D Secure: Use to
603
+ * identify an electronic commerce transaction where the merchant attempted to
604
+ * authenticate the cardholder using 3-D Secure, but was unable to complete the
605
+ * authentication because the issuer or cardholder does not participate in the
606
+ * 3-D Secure program.
607
+ * - `non_authenticated_security_transaction` - Non-authenticated security
608
+ * transaction: Use to identify an electronic commerce transaction that uses data
609
+ * encryption for security however , cardholder authentication is not performed
610
+ * using 3-D Secure.
611
+ * - `non_secure_transaction` - Non-secure transaction: Use to identify an
612
+ * electronic commerce transaction that has no data protection.
613
+ */
614
+ electronic_commerce_indicator:
615
+ | 'mail_phone_order'
616
+ | 'recurring'
617
+ | 'installment'
618
+ | 'unknown_mail_phone_order'
619
+ | 'secure_electronic_commerce'
620
+ | 'non_authenticated_security_transaction_at_3ds_capable_merchant'
621
+ | 'non_authenticated_security_transaction'
622
+ | 'non_secure_transaction'
623
+ | null;
624
+
625
+ /**
626
+ * The method used to enter the cardholder's primary account number and card
627
+ * expiration date.
628
+ *
629
+ * - `unknown` - Unknown
630
+ * - `manual` - Manual key entry
631
+ * - `magnetic_stripe_no_cvv` - Magnetic stripe read, without card verification
632
+ * value
633
+ * - `optical_code` - Optical code
634
+ * - `integrated_circuit_card` - Contact chip card
635
+ * - `contactless` - Contactless read of chip card
636
+ * - `credential_on_file` - Transaction initiated using a credential that has
637
+ * previously been stored on file
638
+ * - `magnetic_stripe` - Magnetic stripe read
639
+ * - `contactless_magnetic_stripe` - Contactless read of magnetic stripe data
640
+ * - `integrated_circuit_card_no_cvv` - Contact chip card, without card
641
+ * verification value
642
+ */
643
+ point_of_service_entry_mode:
644
+ | 'unknown'
645
+ | 'manual'
646
+ | 'magnetic_stripe_no_cvv'
647
+ | 'optical_code'
648
+ | 'integrated_circuit_card'
649
+ | 'contactless'
650
+ | 'credential_on_file'
651
+ | 'magnetic_stripe'
652
+ | 'contactless_magnetic_stripe'
653
+ | 'integrated_circuit_card_no_cvv'
654
+ | null;
655
+ }
656
+ }
657
+ }
658
+
659
+ /**
660
+ * A Card Increment object. This field will be present in the JSON response if and
661
+ * only if `category` is equal to `card_increment`.
662
+ */
663
+ export interface CardIncrement {
664
+ /**
665
+ * The Card Increment identifier.
666
+ */
667
+ id: string;
668
+
669
+ /**
670
+ * The amount of this increment in the minor unit of the transaction's currency.
671
+ * For dollars, for example, this is cents.
672
+ */
673
+ amount: number;
674
+
675
+ /**
676
+ * The identifier for the Card Authorization this reverses.
677
+ */
678
+ card_authorization_id: string;
679
+
680
+ /**
681
+ * The [ISO 4217](https://en.wikipedia.org/wiki/ISO_4217) code for the increment's
682
+ * currency.
683
+ *
684
+ * - `CAD` - Canadian Dollar (CAD)
685
+ * - `CHF` - Swiss Franc (CHF)
686
+ * - `EUR` - Euro (EUR)
687
+ * - `GBP` - British Pound (GBP)
688
+ * - `JPY` - Japanese Yen (JPY)
689
+ * - `USD` - US Dollar (USD)
690
+ */
691
+ currency: 'CAD' | 'CHF' | 'EUR' | 'GBP' | 'JPY' | 'USD';
692
+
693
+ /**
694
+ * The card network used to process this card authorization.
695
+ *
696
+ * - `visa` - Visa
697
+ */
698
+ network: 'visa';
699
+
700
+ /**
701
+ * The identifier of the Real-Time Decision sent to approve or decline this
702
+ * incremental authorization.
703
+ */
704
+ real_time_decision_id: string | null;
705
+
706
+ /**
707
+ * A constant representing the object's type. For this resource it will always be
708
+ * `card_increment`.
709
+ */
710
+ type: 'card_increment';
711
+
712
+ /**
713
+ * The updated authorization amount after this increment, in the minor unit of the
714
+ * transaction's currency. For dollars, for example, this is cents.
715
+ */
716
+ updated_authorization_amount: number;
717
+ }
718
+
719
+ /**
720
+ * A Card Refund object. This field will be present in the JSON response if and
721
+ * only if `category` is equal to `card_refund`.
722
+ */
723
+ export interface CardRefund {
724
+ /**
725
+ * The Card Refund identifier.
726
+ */
727
+ id: string;
728
+
729
+ /**
730
+ * The pending amount in the minor unit of the transaction's currency. For dollars,
731
+ * for example, this is cents.
732
+ */
733
+ amount: number;
734
+
735
+ /**
736
+ * The ID of the Card Payment this transaction belongs to.
737
+ */
738
+ card_payment_id: string | null;
739
+
740
+ /**
741
+ * The [ISO 4217](https://en.wikipedia.org/wiki/ISO_4217) code for the
742
+ * transaction's currency.
743
+ *
744
+ * - `CAD` - Canadian Dollar (CAD)
745
+ * - `CHF` - Swiss Franc (CHF)
746
+ * - `EUR` - Euro (EUR)
747
+ * - `GBP` - British Pound (GBP)
748
+ * - `JPY` - Japanese Yen (JPY)
749
+ * - `USD` - US Dollar (USD)
750
+ */
751
+ currency: 'CAD' | 'CHF' | 'EUR' | 'GBP' | 'JPY' | 'USD';
752
+
753
+ /**
754
+ * The merchant identifier (commonly abbreviated as MID) of the merchant the card
755
+ * is transacting with.
756
+ */
757
+ merchant_acceptor_id: string | null;
758
+
759
+ /**
760
+ * The 4-digit MCC describing the merchant's business.
761
+ */
762
+ merchant_category_code: string;
763
+
764
+ /**
765
+ * The city the merchant resides in.
766
+ */
767
+ merchant_city: string | null;
768
+
769
+ /**
770
+ * The country the merchant resides in.
771
+ */
772
+ merchant_country: string;
773
+
774
+ /**
775
+ * The name of the merchant.
776
+ */
777
+ merchant_name: string | null;
778
+
779
+ /**
780
+ * The state the merchant resides in.
781
+ */
782
+ merchant_state: string | null;
783
+
784
+ /**
785
+ * Additional details about the card purchase, such as tax and industry-specific
786
+ * fields.
787
+ */
788
+ purchase_details: CardRefund.PurchaseDetails | null;
789
+
790
+ /**
791
+ * The identifier of the Transaction associated with this Transaction.
792
+ */
793
+ transaction_id: string;
794
+
795
+ /**
796
+ * A constant representing the object's type. For this resource it will always be
797
+ * `card_refund`.
798
+ */
799
+ type: 'card_refund';
800
+ }
801
+
802
+ export namespace CardRefund {
803
+ /**
804
+ * Additional details about the card purchase, such as tax and industry-specific
805
+ * fields.
806
+ */
807
+ export interface PurchaseDetails {
808
+ /**
809
+ * Fields specific to car rentals.
810
+ */
811
+ car_rental: PurchaseDetails.CarRental | null;
812
+
813
+ /**
814
+ * An identifier from the merchant for the customer or consumer.
815
+ */
816
+ customer_reference_identifier: string | null;
817
+
818
+ /**
819
+ * The state or provincial tax amount in minor units.
820
+ */
821
+ local_tax_amount: number | null;
822
+
823
+ /**
824
+ * The [ISO 4217](https://en.wikipedia.org/wiki/ISO_4217) code for the local tax
825
+ * assessed.
826
+ */
827
+ local_tax_currency: string | null;
828
+
829
+ /**
830
+ * Fields specific to lodging.
831
+ */
832
+ lodging: PurchaseDetails.Lodging | null;
833
+
834
+ /**
835
+ * The national tax amount in minor units.
836
+ */
837
+ national_tax_amount: number | null;
838
+
839
+ /**
840
+ * The [ISO 4217](https://en.wikipedia.org/wiki/ISO_4217) code for the local tax
841
+ * assessed.
842
+ */
843
+ national_tax_currency: string | null;
844
+
845
+ /**
846
+ * An identifier from the merchant for the purchase to the issuer and cardholder.
847
+ */
848
+ purchase_identifier: string | null;
849
+
850
+ /**
851
+ * The format of the purchase identifier.
852
+ *
853
+ * - `free_text` - Free text
854
+ * - `order_number` - Order number
855
+ * - `rental_agreement_number` - Rental agreement number
856
+ * - `hotel_folio_number` - Hotel folio number
857
+ * - `invoice_number` - Invoice number
858
+ */
859
+ purchase_identifier_format:
860
+ | 'free_text'
861
+ | 'order_number'
862
+ | 'rental_agreement_number'
863
+ | 'hotel_folio_number'
864
+ | 'invoice_number'
865
+ | null;
866
+
867
+ /**
868
+ * Fields specific to travel.
869
+ */
870
+ travel: PurchaseDetails.Travel | null;
871
+ }
872
+
873
+ export namespace PurchaseDetails {
874
+ /**
875
+ * Fields specific to car rentals.
876
+ */
877
+ export interface CarRental {
878
+ /**
879
+ * Code indicating the vehicle's class.
880
+ */
881
+ car_class_code: string | null;
882
+
883
+ /**
884
+ * Date the customer picked up the car or, in the case of a no-show or pre-pay
885
+ * transaction, the scheduled pick up date.
886
+ */
887
+ checkout_date: string | null;
888
+
889
+ /**
890
+ * Daily rate being charged for the vehicle.
891
+ */
892
+ daily_rental_rate_amount: number | null;
893
+
894
+ /**
895
+ * The [ISO 4217](https://en.wikipedia.org/wiki/ISO_4217) code for the daily rental
896
+ * rate.
897
+ */
898
+ daily_rental_rate_currency: string | null;
899
+
900
+ /**
901
+ * Number of days the vehicle was rented.
902
+ */
903
+ days_rented: number | null;
904
+
905
+ /**
906
+ * Additional charges (gas, late fee, etc.) being billed.
907
+ *
908
+ * - `no_extra_charge` - No extra charge
909
+ * - `gas` - Gas
910
+ * - `extra_mileage` - Extra mileage
911
+ * - `late_return` - Late return
912
+ * - `one_way_service_fee` - One way service fee
913
+ * - `parking_violation` - Parking violation
914
+ */
915
+ extra_charges:
916
+ | 'no_extra_charge'
917
+ | 'gas'
918
+ | 'extra_mileage'
919
+ | 'late_return'
920
+ | 'one_way_service_fee'
921
+ | 'parking_violation'
922
+ | null;
923
+
924
+ /**
925
+ * Fuel charges for the vehicle.
926
+ */
927
+ fuel_charges_amount: number | null;
928
+
929
+ /**
930
+ * The [ISO 4217](https://en.wikipedia.org/wiki/ISO_4217) code for the fuel charges
931
+ * assessed.
932
+ */
933
+ fuel_charges_currency: string | null;
934
+
935
+ /**
936
+ * Any insurance being charged for the vehicle.
937
+ */
938
+ insurance_charges_amount: number | null;
939
+
940
+ /**
941
+ * The [ISO 4217](https://en.wikipedia.org/wiki/ISO_4217) code for the insurance
942
+ * charges assessed.
943
+ */
944
+ insurance_charges_currency: string | null;
945
+
946
+ /**
947
+ * An indicator that the cardholder is being billed for a reserved vehicle that was
948
+ * not actually rented (that is, a "no-show" charge).
949
+ *
950
+ * - `not_applicable` - Not applicable
951
+ * - `no_show_for_specialized_vehicle` - No show for specialized vehicle
952
+ */
953
+ no_show_indicator: 'not_applicable' | 'no_show_for_specialized_vehicle' | null;
954
+
955
+ /**
956
+ * Charges for returning the vehicle at a different location than where it was
957
+ * picked up.
958
+ */
959
+ one_way_drop_off_charges_amount: number | null;
960
+
961
+ /**
962
+ * The [ISO 4217](https://en.wikipedia.org/wiki/ISO_4217) code for the one-way
963
+ * drop-off charges assessed.
964
+ */
965
+ one_way_drop_off_charges_currency: string | null;
966
+
967
+ /**
968
+ * Name of the person renting the vehicle.
969
+ */
970
+ renter_name: string | null;
971
+
972
+ /**
973
+ * Weekly rate being charged for the vehicle.
974
+ */
975
+ weekly_rental_rate_amount: number | null;
976
+
977
+ /**
978
+ * The [ISO 4217](https://en.wikipedia.org/wiki/ISO_4217) code for the weekly
979
+ * rental rate.
980
+ */
981
+ weekly_rental_rate_currency: string | null;
982
+ }
983
+
984
+ /**
985
+ * Fields specific to lodging.
986
+ */
987
+ export interface Lodging {
988
+ /**
989
+ * Date the customer checked in.
990
+ */
991
+ check_in_date: string | null;
992
+
993
+ /**
994
+ * Daily rate being charged for the room.
995
+ */
996
+ daily_room_rate_amount: number | null;
997
+
998
+ /**
999
+ * The [ISO 4217](https://en.wikipedia.org/wiki/ISO_4217) code for the daily room
1000
+ * rate.
1001
+ */
1002
+ daily_room_rate_currency: string | null;
1003
+
1004
+ /**
1005
+ * Additional charges (phone, late check-out, etc.) being billed.
1006
+ *
1007
+ * - `no_extra_charge` - No extra charge
1008
+ * - `restaurant` - Restaurant
1009
+ * - `gift_shop` - Gift shop
1010
+ * - `mini_bar` - Mini bar
1011
+ * - `telephone` - Telephone
1012
+ * - `other` - Other
1013
+ * - `laundry` - Laundry
1014
+ */
1015
+ extra_charges:
1016
+ | 'no_extra_charge'
1017
+ | 'restaurant'
1018
+ | 'gift_shop'
1019
+ | 'mini_bar'
1020
+ | 'telephone'
1021
+ | 'other'
1022
+ | 'laundry'
1023
+ | null;
1024
+
1025
+ /**
1026
+ * Folio cash advances for the room.
1027
+ */
1028
+ folio_cash_advances_amount: number | null;
1029
+
1030
+ /**
1031
+ * The [ISO 4217](https://en.wikipedia.org/wiki/ISO_4217) code for the folio cash
1032
+ * advances.
1033
+ */
1034
+ folio_cash_advances_currency: string | null;
1035
+
1036
+ /**
1037
+ * Food and beverage charges for the room.
1038
+ */
1039
+ food_beverage_charges_amount: number | null;
1040
+
1041
+ /**
1042
+ * The [ISO 4217](https://en.wikipedia.org/wiki/ISO_4217) code for the food and
1043
+ * beverage charges.
1044
+ */
1045
+ food_beverage_charges_currency: string | null;
1046
+
1047
+ /**
1048
+ * Indicator that the cardholder is being billed for a reserved room that was not
1049
+ * actually used.
1050
+ *
1051
+ * - `not_applicable` - Not applicable
1052
+ * - `no_show` - No show
1053
+ */
1054
+ no_show_indicator: 'not_applicable' | 'no_show' | null;
1055
+
1056
+ /**
1057
+ * Prepaid expenses being charged for the room.
1058
+ */
1059
+ prepaid_expenses_amount: number | null;
1060
+
1061
+ /**
1062
+ * The [ISO 4217](https://en.wikipedia.org/wiki/ISO_4217) code for the prepaid
1063
+ * expenses.
1064
+ */
1065
+ prepaid_expenses_currency: string | null;
1066
+
1067
+ /**
1068
+ * Number of nights the room was rented.
1069
+ */
1070
+ room_nights: number | null;
1071
+
1072
+ /**
1073
+ * Total room tax being charged.
1074
+ */
1075
+ total_room_tax_amount: number | null;
1076
+
1077
+ /**
1078
+ * The [ISO 4217](https://en.wikipedia.org/wiki/ISO_4217) code for the total room
1079
+ * tax.
1080
+ */
1081
+ total_room_tax_currency: string | null;
1082
+
1083
+ /**
1084
+ * Total tax being charged for the room.
1085
+ */
1086
+ total_tax_amount: number | null;
1087
+
1088
+ /**
1089
+ * The [ISO 4217](https://en.wikipedia.org/wiki/ISO_4217) code for the total tax
1090
+ * assessed.
1091
+ */
1092
+ total_tax_currency: string | null;
1093
+ }
1094
+
1095
+ /**
1096
+ * Fields specific to travel.
1097
+ */
1098
+ export interface Travel {
1099
+ /**
1100
+ * Ancillary purchases in addition to the airfare.
1101
+ */
1102
+ ancillary: Travel.Ancillary | null;
1103
+
1104
+ /**
1105
+ * Indicates the computerized reservation system used to book the ticket.
1106
+ */
1107
+ computerized_reservation_system: string | null;
1108
+
1109
+ /**
1110
+ * Indicates the reason for a credit to the cardholder.
1111
+ *
1112
+ * - `no_credit` - No credit
1113
+ * - `passenger_transport_ancillary_purchase_cancellation` - Passenger transport
1114
+ * ancillary purchase cancellation
1115
+ * - `airline_ticket_and_passenger_transport_ancillary_purchase_cancellation` -
1116
+ * Airline ticket and passenger transport ancillary purchase cancellation
1117
+ * - `airline_ticket_cancellation` - Airline ticket cancellation
1118
+ * - `other` - Other
1119
+ * - `partial_refund_of_airline_ticket` - Partial refund of airline ticket
1120
+ */
1121
+ credit_reason_indicator:
1122
+ | 'no_credit'
1123
+ | 'passenger_transport_ancillary_purchase_cancellation'
1124
+ | 'airline_ticket_and_passenger_transport_ancillary_purchase_cancellation'
1125
+ | 'airline_ticket_cancellation'
1126
+ | 'other'
1127
+ | 'partial_refund_of_airline_ticket'
1128
+ | null;
1129
+
1130
+ /**
1131
+ * Date of departure.
1132
+ */
1133
+ departure_date: string | null;
1134
+
1135
+ /**
1136
+ * Code for the originating city or airport.
1137
+ */
1138
+ origination_city_airport_code: string | null;
1139
+
1140
+ /**
1141
+ * Name of the passenger.
1142
+ */
1143
+ passenger_name: string | null;
1144
+
1145
+ /**
1146
+ * Indicates whether this ticket is non-refundable.
1147
+ *
1148
+ * - `no_restrictions` - No restrictions
1149
+ * - `restricted_non_refundable_ticket` - Restricted non-refundable ticket
1150
+ */
1151
+ restricted_ticket_indicator: 'no_restrictions' | 'restricted_non_refundable_ticket' | null;
1152
+
1153
+ /**
1154
+ * Indicates why a ticket was changed.
1155
+ *
1156
+ * - `none` - None
1157
+ * - `change_to_existing_ticket` - Change to existing ticket
1158
+ * - `new_ticket` - New ticket
1159
+ */
1160
+ ticket_change_indicator: 'none' | 'change_to_existing_ticket' | 'new_ticket' | null;
1161
+
1162
+ /**
1163
+ * Ticket number.
1164
+ */
1165
+ ticket_number: string | null;
1166
+
1167
+ /**
1168
+ * Code for the travel agency if the ticket was issued by a travel agency.
1169
+ */
1170
+ travel_agency_code: string | null;
1171
+
1172
+ /**
1173
+ * Name of the travel agency if the ticket was issued by a travel agency.
1174
+ */
1175
+ travel_agency_name: string | null;
1176
+
1177
+ /**
1178
+ * Fields specific to each leg of the journey.
1179
+ */
1180
+ trip_legs: Array<Travel.TripLeg> | null;
1181
+ }
1182
+
1183
+ export namespace Travel {
1184
+ /**
1185
+ * Ancillary purchases in addition to the airfare.
1186
+ */
1187
+ export interface Ancillary {
1188
+ /**
1189
+ * If this purchase has a connection or relationship to another purchase, such as a
1190
+ * baggage fee for a passenger transport ticket, this field should contain the
1191
+ * ticket document number for the other purchase.
1192
+ */
1193
+ connected_ticket_document_number: string | null;
1194
+
1195
+ /**
1196
+ * Indicates the reason for a credit to the cardholder.
1197
+ *
1198
+ * - `no_credit` - No credit
1199
+ * - `passenger_transport_ancillary_purchase_cancellation` - Passenger transport
1200
+ * ancillary purchase cancellation
1201
+ * - `airline_ticket_and_passenger_transport_ancillary_purchase_cancellation` -
1202
+ * Airline ticket and passenger transport ancillary purchase cancellation
1203
+ * - `other` - Other
1204
+ */
1205
+ credit_reason_indicator:
1206
+ | 'no_credit'
1207
+ | 'passenger_transport_ancillary_purchase_cancellation'
1208
+ | 'airline_ticket_and_passenger_transport_ancillary_purchase_cancellation'
1209
+ | 'other'
1210
+ | null;
1211
+
1212
+ /**
1213
+ * Name of the passenger or description of the ancillary purchase.
1214
+ */
1215
+ passenger_name_or_description: string | null;
1216
+
1217
+ /**
1218
+ * Additional travel charges, such as baggage fees.
1219
+ */
1220
+ services: Array<Ancillary.Service>;
1221
+
1222
+ /**
1223
+ * Ticket document number.
1224
+ */
1225
+ ticket_document_number: string | null;
1226
+ }
1227
+
1228
+ export namespace Ancillary {
1229
+ export interface Service {
1230
+ /**
1231
+ * Category of the ancillary service.
1232
+ *
1233
+ * - `none` - None
1234
+ * - `bundled_service` - Bundled service
1235
+ * - `baggage_fee` - Baggage fee
1236
+ * - `change_fee` - Change fee
1237
+ * - `cargo` - Cargo
1238
+ * - `carbon_offset` - Carbon offset
1239
+ * - `frequent_flyer` - Frequent flyer
1240
+ * - `gift_card` - Gift card
1241
+ * - `ground_transport` - Ground transport
1242
+ * - `in_flight_entertainment` - In-flight entertainment
1243
+ * - `lounge` - Lounge
1244
+ * - `medical` - Medical
1245
+ * - `meal_beverage` - Meal beverage
1246
+ * - `other` - Other
1247
+ * - `passenger_assist_fee` - Passenger assist fee
1248
+ * - `pets` - Pets
1249
+ * - `seat_fees` - Seat fees
1250
+ * - `standby` - Standby
1251
+ * - `service_fee` - Service fee
1252
+ * - `store` - Store
1253
+ * - `travel_service` - Travel service
1254
+ * - `unaccompanied_travel` - Unaccompanied travel
1255
+ * - `upgrades` - Upgrades
1256
+ * - `wifi` - Wi-fi
1257
+ */
1258
+ category:
1259
+ | 'none'
1260
+ | 'bundled_service'
1261
+ | 'baggage_fee'
1262
+ | 'change_fee'
1263
+ | 'cargo'
1264
+ | 'carbon_offset'
1265
+ | 'frequent_flyer'
1266
+ | 'gift_card'
1267
+ | 'ground_transport'
1268
+ | 'in_flight_entertainment'
1269
+ | 'lounge'
1270
+ | 'medical'
1271
+ | 'meal_beverage'
1272
+ | 'other'
1273
+ | 'passenger_assist_fee'
1274
+ | 'pets'
1275
+ | 'seat_fees'
1276
+ | 'standby'
1277
+ | 'service_fee'
1278
+ | 'store'
1279
+ | 'travel_service'
1280
+ | 'unaccompanied_travel'
1281
+ | 'upgrades'
1282
+ | 'wifi'
1283
+ | null;
1284
+
1285
+ /**
1286
+ * Sub-category of the ancillary service, free-form.
1287
+ */
1288
+ sub_category: string | null;
1289
+ }
1290
+ }
1291
+
1292
+ export interface TripLeg {
1293
+ /**
1294
+ * Carrier code (e.g., United Airlines, Jet Blue, etc.).
1295
+ */
1296
+ carrier_code: string | null;
1297
+
1298
+ /**
1299
+ * Code for the destination city or airport.
1300
+ */
1301
+ destination_city_airport_code: string | null;
1302
+
1303
+ /**
1304
+ * Fare basis code.
1305
+ */
1306
+ fare_basis_code: string | null;
1307
+
1308
+ /**
1309
+ * Flight number.
1310
+ */
1311
+ flight_number: string | null;
1312
+
1313
+ /**
1314
+ * Service class (e.g., first class, business class, etc.).
1315
+ */
1316
+ service_class: string | null;
1317
+
1318
+ /**
1319
+ * Indicates whether a stopover is allowed on this ticket.
1320
+ *
1321
+ * - `none` - None
1322
+ * - `stop_over_allowed` - Stop over allowed
1323
+ * - `stop_over_not_allowed` - Stop over not allowed
1324
+ */
1325
+ stop_over_code: 'none' | 'stop_over_allowed' | 'stop_over_not_allowed' | null;
1326
+ }
1327
+ }
1328
+ }
1329
+ }
1330
+
1331
+ /**
1332
+ * A Card Reversal object. This field will be present in the JSON response if and
1333
+ * only if `category` is equal to `card_reversal`.
1334
+ */
1335
+ export interface CardReversal {
1336
+ /**
1337
+ * The Card Reversal identifier.
1338
+ */
1339
+ id: string;
1340
+
1341
+ /**
1342
+ * The identifier for the Card Authorization this reverses.
1343
+ */
1344
+ card_authorization_id: string;
1345
+
1346
+ /**
1347
+ * The [ISO 4217](https://en.wikipedia.org/wiki/ISO_4217) code for the reversal's
1348
+ * currency.
1349
+ *
1350
+ * - `CAD` - Canadian Dollar (CAD)
1351
+ * - `CHF` - Swiss Franc (CHF)
1352
+ * - `EUR` - Euro (EUR)
1353
+ * - `GBP` - British Pound (GBP)
1354
+ * - `JPY` - Japanese Yen (JPY)
1355
+ * - `USD` - US Dollar (USD)
1356
+ */
1357
+ currency: 'CAD' | 'CHF' | 'EUR' | 'GBP' | 'JPY' | 'USD';
1358
+
1359
+ /**
1360
+ * The card network used to process this card authorization.
1361
+ *
1362
+ * - `visa` - Visa
1363
+ */
1364
+ network: 'visa';
1365
+
1366
+ /**
1367
+ * The amount of this reversal in the minor unit of the transaction's currency. For
1368
+ * dollars, for example, this is cents.
1369
+ */
1370
+ reversal_amount: number;
1371
+
1372
+ /**
1373
+ * A constant representing the object's type. For this resource it will always be
1374
+ * `card_reversal`.
1375
+ */
1376
+ type: 'card_reversal';
1377
+
1378
+ /**
1379
+ * The amount left pending on the Card Authorization in the minor unit of the
1380
+ * transaction's currency. For dollars, for example, this is cents.
1381
+ */
1382
+ updated_authorization_amount: number;
1383
+ }
1384
+
1385
+ /**
1386
+ * A Card Settlement object. This field will be present in the JSON response if and
1387
+ * only if `category` is equal to `card_settlement`.
1388
+ */
1389
+ export interface CardSettlement {
1390
+ /**
1391
+ * The Card Settlement identifier.
1392
+ */
1393
+ id: string;
1394
+
1395
+ /**
1396
+ * The amount in the minor unit of the transaction's settlement currency. For
1397
+ * dollars, for example, this is cents.
1398
+ */
1399
+ amount: number;
1400
+
1401
+ /**
1402
+ * The Card Authorization that was created prior to this Card Settlement, if one
1403
+ * exists.
1404
+ */
1405
+ card_authorization: string | null;
1406
+
1407
+ /**
1408
+ * The ID of the Card Payment this transaction belongs to.
1409
+ */
1410
+ card_payment_id: string | null;
1411
+
1412
+ /**
1413
+ * The [ISO 4217](https://en.wikipedia.org/wiki/ISO_4217) code for the
1414
+ * transaction's settlement currency.
1415
+ *
1416
+ * - `CAD` - Canadian Dollar (CAD)
1417
+ * - `CHF` - Swiss Franc (CHF)
1418
+ * - `EUR` - Euro (EUR)
1419
+ * - `GBP` - British Pound (GBP)
1420
+ * - `JPY` - Japanese Yen (JPY)
1421
+ * - `USD` - US Dollar (USD)
1422
+ */
1423
+ currency: 'CAD' | 'CHF' | 'EUR' | 'GBP' | 'JPY' | 'USD';
1424
+
1425
+ /**
1426
+ * The merchant identifier (commonly abbreviated as MID) of the merchant the card
1427
+ * is transacting with.
1428
+ */
1429
+ merchant_acceptor_id: string | null;
1430
+
1431
+ /**
1432
+ * The 4-digit MCC describing the merchant's business.
1433
+ */
1434
+ merchant_category_code: string;
1435
+
1436
+ /**
1437
+ * The city the merchant resides in.
1438
+ */
1439
+ merchant_city: string | null;
1440
+
1441
+ /**
1442
+ * The country the merchant resides in.
1443
+ */
1444
+ merchant_country: string;
1445
+
1446
+ /**
1447
+ * The name of the merchant.
1448
+ */
1449
+ merchant_name: string | null;
1450
+
1451
+ /**
1452
+ * The state the merchant resides in.
1453
+ */
1454
+ merchant_state: string | null;
1455
+
1456
+ /**
1457
+ * The identifier of the Pending Transaction associated with this Transaction.
1458
+ */
1459
+ pending_transaction_id: string | null;
1460
+
1461
+ /**
1462
+ * The amount in the minor unit of the transaction's presentment currency.
1463
+ */
1464
+ presentment_amount: number;
1465
+
1466
+ /**
1467
+ * The [ISO 4217](https://en.wikipedia.org/wiki/ISO_4217) code for the
1468
+ * transaction's presentment currency.
1469
+ */
1470
+ presentment_currency: string;
1471
+
1472
+ /**
1473
+ * Additional details about the card purchase, such as tax and industry-specific
1474
+ * fields.
1475
+ */
1476
+ purchase_details: CardSettlement.PurchaseDetails | null;
1477
+
1478
+ /**
1479
+ * The identifier of the Transaction associated with this Transaction.
1480
+ */
1481
+ transaction_id: string;
1482
+
1483
+ /**
1484
+ * A constant representing the object's type. For this resource it will always be
1485
+ * `card_settlement`.
1486
+ */
1487
+ type: 'card_settlement';
1488
+ }
1489
+
1490
+ export namespace CardSettlement {
1491
+ /**
1492
+ * Additional details about the card purchase, such as tax and industry-specific
1493
+ * fields.
1494
+ */
1495
+ export interface PurchaseDetails {
1496
+ /**
1497
+ * Fields specific to car rentals.
1498
+ */
1499
+ car_rental: PurchaseDetails.CarRental | null;
1500
+
1501
+ /**
1502
+ * An identifier from the merchant for the customer or consumer.
1503
+ */
1504
+ customer_reference_identifier: string | null;
1505
+
1506
+ /**
1507
+ * The state or provincial tax amount in minor units.
1508
+ */
1509
+ local_tax_amount: number | null;
1510
+
1511
+ /**
1512
+ * The [ISO 4217](https://en.wikipedia.org/wiki/ISO_4217) code for the local tax
1513
+ * assessed.
1514
+ */
1515
+ local_tax_currency: string | null;
1516
+
1517
+ /**
1518
+ * Fields specific to lodging.
1519
+ */
1520
+ lodging: PurchaseDetails.Lodging | null;
1521
+
1522
+ /**
1523
+ * The national tax amount in minor units.
1524
+ */
1525
+ national_tax_amount: number | null;
1526
+
1527
+ /**
1528
+ * The [ISO 4217](https://en.wikipedia.org/wiki/ISO_4217) code for the local tax
1529
+ * assessed.
1530
+ */
1531
+ national_tax_currency: string | null;
1532
+
1533
+ /**
1534
+ * An identifier from the merchant for the purchase to the issuer and cardholder.
1535
+ */
1536
+ purchase_identifier: string | null;
1537
+
1538
+ /**
1539
+ * The format of the purchase identifier.
1540
+ *
1541
+ * - `free_text` - Free text
1542
+ * - `order_number` - Order number
1543
+ * - `rental_agreement_number` - Rental agreement number
1544
+ * - `hotel_folio_number` - Hotel folio number
1545
+ * - `invoice_number` - Invoice number
1546
+ */
1547
+ purchase_identifier_format:
1548
+ | 'free_text'
1549
+ | 'order_number'
1550
+ | 'rental_agreement_number'
1551
+ | 'hotel_folio_number'
1552
+ | 'invoice_number'
1553
+ | null;
1554
+
1555
+ /**
1556
+ * Fields specific to travel.
1557
+ */
1558
+ travel: PurchaseDetails.Travel | null;
1559
+ }
1560
+
1561
+ export namespace PurchaseDetails {
1562
+ /**
1563
+ * Fields specific to car rentals.
1564
+ */
1565
+ export interface CarRental {
1566
+ /**
1567
+ * Code indicating the vehicle's class.
1568
+ */
1569
+ car_class_code: string | null;
1570
+
1571
+ /**
1572
+ * Date the customer picked up the car or, in the case of a no-show or pre-pay
1573
+ * transaction, the scheduled pick up date.
1574
+ */
1575
+ checkout_date: string | null;
1576
+
1577
+ /**
1578
+ * Daily rate being charged for the vehicle.
1579
+ */
1580
+ daily_rental_rate_amount: number | null;
1581
+
1582
+ /**
1583
+ * The [ISO 4217](https://en.wikipedia.org/wiki/ISO_4217) code for the daily rental
1584
+ * rate.
1585
+ */
1586
+ daily_rental_rate_currency: string | null;
1587
+
1588
+ /**
1589
+ * Number of days the vehicle was rented.
1590
+ */
1591
+ days_rented: number | null;
1592
+
1593
+ /**
1594
+ * Additional charges (gas, late fee, etc.) being billed.
1595
+ *
1596
+ * - `no_extra_charge` - No extra charge
1597
+ * - `gas` - Gas
1598
+ * - `extra_mileage` - Extra mileage
1599
+ * - `late_return` - Late return
1600
+ * - `one_way_service_fee` - One way service fee
1601
+ * - `parking_violation` - Parking violation
1602
+ */
1603
+ extra_charges:
1604
+ | 'no_extra_charge'
1605
+ | 'gas'
1606
+ | 'extra_mileage'
1607
+ | 'late_return'
1608
+ | 'one_way_service_fee'
1609
+ | 'parking_violation'
1610
+ | null;
1611
+
1612
+ /**
1613
+ * Fuel charges for the vehicle.
1614
+ */
1615
+ fuel_charges_amount: number | null;
1616
+
1617
+ /**
1618
+ * The [ISO 4217](https://en.wikipedia.org/wiki/ISO_4217) code for the fuel charges
1619
+ * assessed.
1620
+ */
1621
+ fuel_charges_currency: string | null;
1622
+
1623
+ /**
1624
+ * Any insurance being charged for the vehicle.
1625
+ */
1626
+ insurance_charges_amount: number | null;
1627
+
1628
+ /**
1629
+ * The [ISO 4217](https://en.wikipedia.org/wiki/ISO_4217) code for the insurance
1630
+ * charges assessed.
1631
+ */
1632
+ insurance_charges_currency: string | null;
1633
+
1634
+ /**
1635
+ * An indicator that the cardholder is being billed for a reserved vehicle that was
1636
+ * not actually rented (that is, a "no-show" charge).
1637
+ *
1638
+ * - `not_applicable` - Not applicable
1639
+ * - `no_show_for_specialized_vehicle` - No show for specialized vehicle
1640
+ */
1641
+ no_show_indicator: 'not_applicable' | 'no_show_for_specialized_vehicle' | null;
1642
+
1643
+ /**
1644
+ * Charges for returning the vehicle at a different location than where it was
1645
+ * picked up.
1646
+ */
1647
+ one_way_drop_off_charges_amount: number | null;
1648
+
1649
+ /**
1650
+ * The [ISO 4217](https://en.wikipedia.org/wiki/ISO_4217) code for the one-way
1651
+ * drop-off charges assessed.
1652
+ */
1653
+ one_way_drop_off_charges_currency: string | null;
1654
+
1655
+ /**
1656
+ * Name of the person renting the vehicle.
1657
+ */
1658
+ renter_name: string | null;
1659
+
1660
+ /**
1661
+ * Weekly rate being charged for the vehicle.
1662
+ */
1663
+ weekly_rental_rate_amount: number | null;
1664
+
1665
+ /**
1666
+ * The [ISO 4217](https://en.wikipedia.org/wiki/ISO_4217) code for the weekly
1667
+ * rental rate.
1668
+ */
1669
+ weekly_rental_rate_currency: string | null;
1670
+ }
1671
+
1672
+ /**
1673
+ * Fields specific to lodging.
1674
+ */
1675
+ export interface Lodging {
1676
+ /**
1677
+ * Date the customer checked in.
1678
+ */
1679
+ check_in_date: string | null;
1680
+
1681
+ /**
1682
+ * Daily rate being charged for the room.
1683
+ */
1684
+ daily_room_rate_amount: number | null;
1685
+
1686
+ /**
1687
+ * The [ISO 4217](https://en.wikipedia.org/wiki/ISO_4217) code for the daily room
1688
+ * rate.
1689
+ */
1690
+ daily_room_rate_currency: string | null;
1691
+
1692
+ /**
1693
+ * Additional charges (phone, late check-out, etc.) being billed.
1694
+ *
1695
+ * - `no_extra_charge` - No extra charge
1696
+ * - `restaurant` - Restaurant
1697
+ * - `gift_shop` - Gift shop
1698
+ * - `mini_bar` - Mini bar
1699
+ * - `telephone` - Telephone
1700
+ * - `other` - Other
1701
+ * - `laundry` - Laundry
1702
+ */
1703
+ extra_charges:
1704
+ | 'no_extra_charge'
1705
+ | 'restaurant'
1706
+ | 'gift_shop'
1707
+ | 'mini_bar'
1708
+ | 'telephone'
1709
+ | 'other'
1710
+ | 'laundry'
1711
+ | null;
1712
+
1713
+ /**
1714
+ * Folio cash advances for the room.
1715
+ */
1716
+ folio_cash_advances_amount: number | null;
1717
+
1718
+ /**
1719
+ * The [ISO 4217](https://en.wikipedia.org/wiki/ISO_4217) code for the folio cash
1720
+ * advances.
1721
+ */
1722
+ folio_cash_advances_currency: string | null;
1723
+
1724
+ /**
1725
+ * Food and beverage charges for the room.
1726
+ */
1727
+ food_beverage_charges_amount: number | null;
1728
+
1729
+ /**
1730
+ * The [ISO 4217](https://en.wikipedia.org/wiki/ISO_4217) code for the food and
1731
+ * beverage charges.
1732
+ */
1733
+ food_beverage_charges_currency: string | null;
1734
+
1735
+ /**
1736
+ * Indicator that the cardholder is being billed for a reserved room that was not
1737
+ * actually used.
1738
+ *
1739
+ * - `not_applicable` - Not applicable
1740
+ * - `no_show` - No show
1741
+ */
1742
+ no_show_indicator: 'not_applicable' | 'no_show' | null;
1743
+
1744
+ /**
1745
+ * Prepaid expenses being charged for the room.
1746
+ */
1747
+ prepaid_expenses_amount: number | null;
1748
+
1749
+ /**
1750
+ * The [ISO 4217](https://en.wikipedia.org/wiki/ISO_4217) code for the prepaid
1751
+ * expenses.
1752
+ */
1753
+ prepaid_expenses_currency: string | null;
1754
+
1755
+ /**
1756
+ * Number of nights the room was rented.
1757
+ */
1758
+ room_nights: number | null;
1759
+
1760
+ /**
1761
+ * Total room tax being charged.
1762
+ */
1763
+ total_room_tax_amount: number | null;
1764
+
1765
+ /**
1766
+ * The [ISO 4217](https://en.wikipedia.org/wiki/ISO_4217) code for the total room
1767
+ * tax.
1768
+ */
1769
+ total_room_tax_currency: string | null;
1770
+
1771
+ /**
1772
+ * Total tax being charged for the room.
1773
+ */
1774
+ total_tax_amount: number | null;
1775
+
1776
+ /**
1777
+ * The [ISO 4217](https://en.wikipedia.org/wiki/ISO_4217) code for the total tax
1778
+ * assessed.
1779
+ */
1780
+ total_tax_currency: string | null;
1781
+ }
1782
+
1783
+ /**
1784
+ * Fields specific to travel.
1785
+ */
1786
+ export interface Travel {
1787
+ /**
1788
+ * Ancillary purchases in addition to the airfare.
1789
+ */
1790
+ ancillary: Travel.Ancillary | null;
1791
+
1792
+ /**
1793
+ * Indicates the computerized reservation system used to book the ticket.
1794
+ */
1795
+ computerized_reservation_system: string | null;
1796
+
1797
+ /**
1798
+ * Indicates the reason for a credit to the cardholder.
1799
+ *
1800
+ * - `no_credit` - No credit
1801
+ * - `passenger_transport_ancillary_purchase_cancellation` - Passenger transport
1802
+ * ancillary purchase cancellation
1803
+ * - `airline_ticket_and_passenger_transport_ancillary_purchase_cancellation` -
1804
+ * Airline ticket and passenger transport ancillary purchase cancellation
1805
+ * - `airline_ticket_cancellation` - Airline ticket cancellation
1806
+ * - `other` - Other
1807
+ * - `partial_refund_of_airline_ticket` - Partial refund of airline ticket
1808
+ */
1809
+ credit_reason_indicator:
1810
+ | 'no_credit'
1811
+ | 'passenger_transport_ancillary_purchase_cancellation'
1812
+ | 'airline_ticket_and_passenger_transport_ancillary_purchase_cancellation'
1813
+ | 'airline_ticket_cancellation'
1814
+ | 'other'
1815
+ | 'partial_refund_of_airline_ticket'
1816
+ | null;
1817
+
1818
+ /**
1819
+ * Date of departure.
1820
+ */
1821
+ departure_date: string | null;
1822
+
1823
+ /**
1824
+ * Code for the originating city or airport.
1825
+ */
1826
+ origination_city_airport_code: string | null;
1827
+
1828
+ /**
1829
+ * Name of the passenger.
1830
+ */
1831
+ passenger_name: string | null;
1832
+
1833
+ /**
1834
+ * Indicates whether this ticket is non-refundable.
1835
+ *
1836
+ * - `no_restrictions` - No restrictions
1837
+ * - `restricted_non_refundable_ticket` - Restricted non-refundable ticket
1838
+ */
1839
+ restricted_ticket_indicator: 'no_restrictions' | 'restricted_non_refundable_ticket' | null;
1840
+
1841
+ /**
1842
+ * Indicates why a ticket was changed.
1843
+ *
1844
+ * - `none` - None
1845
+ * - `change_to_existing_ticket` - Change to existing ticket
1846
+ * - `new_ticket` - New ticket
1847
+ */
1848
+ ticket_change_indicator: 'none' | 'change_to_existing_ticket' | 'new_ticket' | null;
1849
+
1850
+ /**
1851
+ * Ticket number.
1852
+ */
1853
+ ticket_number: string | null;
1854
+
1855
+ /**
1856
+ * Code for the travel agency if the ticket was issued by a travel agency.
1857
+ */
1858
+ travel_agency_code: string | null;
1859
+
1860
+ /**
1861
+ * Name of the travel agency if the ticket was issued by a travel agency.
1862
+ */
1863
+ travel_agency_name: string | null;
1864
+
1865
+ /**
1866
+ * Fields specific to each leg of the journey.
1867
+ */
1868
+ trip_legs: Array<Travel.TripLeg> | null;
1869
+ }
1870
+
1871
+ export namespace Travel {
1872
+ /**
1873
+ * Ancillary purchases in addition to the airfare.
1874
+ */
1875
+ export interface Ancillary {
1876
+ /**
1877
+ * If this purchase has a connection or relationship to another purchase, such as a
1878
+ * baggage fee for a passenger transport ticket, this field should contain the
1879
+ * ticket document number for the other purchase.
1880
+ */
1881
+ connected_ticket_document_number: string | null;
1882
+
1883
+ /**
1884
+ * Indicates the reason for a credit to the cardholder.
1885
+ *
1886
+ * - `no_credit` - No credit
1887
+ * - `passenger_transport_ancillary_purchase_cancellation` - Passenger transport
1888
+ * ancillary purchase cancellation
1889
+ * - `airline_ticket_and_passenger_transport_ancillary_purchase_cancellation` -
1890
+ * Airline ticket and passenger transport ancillary purchase cancellation
1891
+ * - `other` - Other
1892
+ */
1893
+ credit_reason_indicator:
1894
+ | 'no_credit'
1895
+ | 'passenger_transport_ancillary_purchase_cancellation'
1896
+ | 'airline_ticket_and_passenger_transport_ancillary_purchase_cancellation'
1897
+ | 'other'
1898
+ | null;
1899
+
1900
+ /**
1901
+ * Name of the passenger or description of the ancillary purchase.
1902
+ */
1903
+ passenger_name_or_description: string | null;
1904
+
1905
+ /**
1906
+ * Additional travel charges, such as baggage fees.
1907
+ */
1908
+ services: Array<Ancillary.Service>;
1909
+
1910
+ /**
1911
+ * Ticket document number.
1912
+ */
1913
+ ticket_document_number: string | null;
1914
+ }
1915
+
1916
+ export namespace Ancillary {
1917
+ export interface Service {
1918
+ /**
1919
+ * Category of the ancillary service.
1920
+ *
1921
+ * - `none` - None
1922
+ * - `bundled_service` - Bundled service
1923
+ * - `baggage_fee` - Baggage fee
1924
+ * - `change_fee` - Change fee
1925
+ * - `cargo` - Cargo
1926
+ * - `carbon_offset` - Carbon offset
1927
+ * - `frequent_flyer` - Frequent flyer
1928
+ * - `gift_card` - Gift card
1929
+ * - `ground_transport` - Ground transport
1930
+ * - `in_flight_entertainment` - In-flight entertainment
1931
+ * - `lounge` - Lounge
1932
+ * - `medical` - Medical
1933
+ * - `meal_beverage` - Meal beverage
1934
+ * - `other` - Other
1935
+ * - `passenger_assist_fee` - Passenger assist fee
1936
+ * - `pets` - Pets
1937
+ * - `seat_fees` - Seat fees
1938
+ * - `standby` - Standby
1939
+ * - `service_fee` - Service fee
1940
+ * - `store` - Store
1941
+ * - `travel_service` - Travel service
1942
+ * - `unaccompanied_travel` - Unaccompanied travel
1943
+ * - `upgrades` - Upgrades
1944
+ * - `wifi` - Wi-fi
1945
+ */
1946
+ category:
1947
+ | 'none'
1948
+ | 'bundled_service'
1949
+ | 'baggage_fee'
1950
+ | 'change_fee'
1951
+ | 'cargo'
1952
+ | 'carbon_offset'
1953
+ | 'frequent_flyer'
1954
+ | 'gift_card'
1955
+ | 'ground_transport'
1956
+ | 'in_flight_entertainment'
1957
+ | 'lounge'
1958
+ | 'medical'
1959
+ | 'meal_beverage'
1960
+ | 'other'
1961
+ | 'passenger_assist_fee'
1962
+ | 'pets'
1963
+ | 'seat_fees'
1964
+ | 'standby'
1965
+ | 'service_fee'
1966
+ | 'store'
1967
+ | 'travel_service'
1968
+ | 'unaccompanied_travel'
1969
+ | 'upgrades'
1970
+ | 'wifi'
1971
+ | null;
1972
+
1973
+ /**
1974
+ * Sub-category of the ancillary service, free-form.
1975
+ */
1976
+ sub_category: string | null;
1977
+ }
1978
+ }
1979
+
1980
+ export interface TripLeg {
1981
+ /**
1982
+ * Carrier code (e.g., United Airlines, Jet Blue, etc.).
1983
+ */
1984
+ carrier_code: string | null;
1985
+
1986
+ /**
1987
+ * Code for the destination city or airport.
1988
+ */
1989
+ destination_city_airport_code: string | null;
1990
+
1991
+ /**
1992
+ * Fare basis code.
1993
+ */
1994
+ fare_basis_code: string | null;
1995
+
1996
+ /**
1997
+ * Flight number.
1998
+ */
1999
+ flight_number: string | null;
2000
+
2001
+ /**
2002
+ * Service class (e.g., first class, business class, etc.).
2003
+ */
2004
+ service_class: string | null;
2005
+
2006
+ /**
2007
+ * Indicates whether a stopover is allowed on this ticket.
2008
+ *
2009
+ * - `none` - None
2010
+ * - `stop_over_allowed` - Stop over allowed
2011
+ * - `stop_over_not_allowed` - Stop over not allowed
2012
+ */
2013
+ stop_over_code: 'none' | 'stop_over_allowed' | 'stop_over_not_allowed' | null;
2014
+ }
2015
+ }
2016
+ }
2017
+ }
2018
+
2019
+ /**
2020
+ * A Card Validation object. This field will be present in the JSON response if and
2021
+ * only if `category` is equal to `card_validation`.
2022
+ */
2023
+ export interface CardValidation {
2024
+ /**
2025
+ * The Card Validation identifier.
2026
+ */
2027
+ id: string;
2028
+
2029
+ /**
2030
+ * The ID of the Card Payment this transaction belongs to.
2031
+ */
2032
+ card_payment_id: string | null;
2033
+
2034
+ /**
2035
+ * The [ISO 4217](https://en.wikipedia.org/wiki/ISO_4217) code for the
2036
+ * transaction's currency.
2037
+ *
2038
+ * - `CAD` - Canadian Dollar (CAD)
2039
+ * - `CHF` - Swiss Franc (CHF)
2040
+ * - `EUR` - Euro (EUR)
2041
+ * - `GBP` - British Pound (GBP)
2042
+ * - `JPY` - Japanese Yen (JPY)
2043
+ * - `USD` - US Dollar (USD)
2044
+ */
2045
+ currency: 'CAD' | 'CHF' | 'EUR' | 'GBP' | 'JPY' | 'USD';
2046
+
2047
+ /**
2048
+ * If the authorization was made via a Digital Wallet Token (such as an Apple Pay
2049
+ * purchase), the identifier of the token that was used.
2050
+ */
2051
+ digital_wallet_token_id: string | null;
2052
+
2053
+ /**
2054
+ * The merchant identifier (commonly abbreviated as MID) of the merchant the card
2055
+ * is transacting with.
2056
+ */
2057
+ merchant_acceptor_id: string;
2058
+
2059
+ /**
2060
+ * The Merchant Category Code (commonly abbreviated as MCC) of the merchant the
2061
+ * card is transacting with.
2062
+ */
2063
+ merchant_category_code: string | null;
2064
+
2065
+ /**
2066
+ * The city the merchant resides in.
2067
+ */
2068
+ merchant_city: string | null;
2069
+
2070
+ /**
2071
+ * The country the merchant resides in.
2072
+ */
2073
+ merchant_country: string | null;
2074
+
2075
+ /**
2076
+ * The merchant descriptor of the merchant the card is transacting with.
2077
+ */
2078
+ merchant_descriptor: string;
2079
+
2080
+ /**
2081
+ * Fields specific to the `network`.
2082
+ */
2083
+ network_details: CardValidation.NetworkDetails;
2084
+
2085
+ /**
2086
+ * If the authorization was made in-person with a physical card, the Physical Card
2087
+ * that was used.
2088
+ */
2089
+ physical_card_id: string | null;
2090
+
2091
+ /**
2092
+ * The identifier of the Real-Time Decision sent to approve or decline this
2093
+ * transaction.
2094
+ */
2095
+ real_time_decision_id: string | null;
2096
+
2097
+ /**
2098
+ * A constant representing the object's type. For this resource it will always be
2099
+ * `card_validation`.
2100
+ */
2101
+ type: 'card_validation';
2102
+ }
2103
+
2104
+ export namespace CardValidation {
2105
+ /**
2106
+ * Fields specific to the `network`.
2107
+ */
2108
+ export interface NetworkDetails {
2109
+ /**
2110
+ * The payment network used to process this card authorization.
2111
+ *
2112
+ * - `visa` - Visa
2113
+ */
2114
+ category: 'visa';
2115
+
2116
+ /**
2117
+ * Fields specific to the `visa` network.
2118
+ */
2119
+ visa: NetworkDetails.Visa | null;
2120
+ }
2121
+
2122
+ export namespace NetworkDetails {
2123
+ /**
2124
+ * Fields specific to the `visa` network.
2125
+ */
2126
+ export interface Visa {
2127
+ /**
2128
+ * For electronic commerce transactions, this identifies the level of security used
2129
+ * in obtaining the customer's payment credential. For mail or telephone order
2130
+ * transactions, identifies the type of mail or telephone order.
2131
+ *
2132
+ * - `mail_phone_order` - Single transaction of a mail/phone order: Use to indicate
2133
+ * that the transaction is a mail/phone order purchase, not a recurring
2134
+ * transaction or installment payment. For domestic transactions in the US
2135
+ * region, this value may also indicate one bill payment transaction in the
2136
+ * card-present or card-absent environments.
2137
+ * - `recurring` - Recurring transaction: Payment indicator used to indicate a
2138
+ * recurring transaction that originates from an acquirer in the US region.
2139
+ * - `installment` - Installment payment: Payment indicator used to indicate one
2140
+ * purchase of goods or services that is billed to the account in multiple
2141
+ * charges over a period of time agreed upon by the cardholder and merchant from
2142
+ * transactions that originate from an acquirer in the US region.
2143
+ * - `unknown_mail_phone_order` - Unknown classification: other mail order: Use to
2144
+ * indicate that the type of mail/telephone order is unknown.
2145
+ * - `secure_electronic_commerce` - Secure electronic commerce transaction: Use to
2146
+ * indicate that the electronic commerce transaction has been authenticated using
2147
+ * e.g., 3-D Secure
2148
+ * - `non_authenticated_security_transaction_at_3ds_capable_merchant` -
2149
+ * Non-authenticated security transaction at a 3-D Secure-capable merchant, and
2150
+ * merchant attempted to authenticate the cardholder using 3-D Secure: Use to
2151
+ * identify an electronic commerce transaction where the merchant attempted to
2152
+ * authenticate the cardholder using 3-D Secure, but was unable to complete the
2153
+ * authentication because the issuer or cardholder does not participate in the
2154
+ * 3-D Secure program.
2155
+ * - `non_authenticated_security_transaction` - Non-authenticated security
2156
+ * transaction: Use to identify an electronic commerce transaction that uses data
2157
+ * encryption for security however , cardholder authentication is not performed
2158
+ * using 3-D Secure.
2159
+ * - `non_secure_transaction` - Non-secure transaction: Use to identify an
2160
+ * electronic commerce transaction that has no data protection.
2161
+ */
2162
+ electronic_commerce_indicator:
2163
+ | 'mail_phone_order'
2164
+ | 'recurring'
2165
+ | 'installment'
2166
+ | 'unknown_mail_phone_order'
2167
+ | 'secure_electronic_commerce'
2168
+ | 'non_authenticated_security_transaction_at_3ds_capable_merchant'
2169
+ | 'non_authenticated_security_transaction'
2170
+ | 'non_secure_transaction'
2171
+ | null;
2172
+
2173
+ /**
2174
+ * The method used to enter the cardholder's primary account number and card
2175
+ * expiration date.
2176
+ *
2177
+ * - `unknown` - Unknown
2178
+ * - `manual` - Manual key entry
2179
+ * - `magnetic_stripe_no_cvv` - Magnetic stripe read, without card verification
2180
+ * value
2181
+ * - `optical_code` - Optical code
2182
+ * - `integrated_circuit_card` - Contact chip card
2183
+ * - `contactless` - Contactless read of chip card
2184
+ * - `credential_on_file` - Transaction initiated using a credential that has
2185
+ * previously been stored on file
2186
+ * - `magnetic_stripe` - Magnetic stripe read
2187
+ * - `contactless_magnetic_stripe` - Contactless read of magnetic stripe data
2188
+ * - `integrated_circuit_card_no_cvv` - Contact chip card, without card
2189
+ * verification value
2190
+ */
2191
+ point_of_service_entry_mode:
2192
+ | 'unknown'
2193
+ | 'manual'
2194
+ | 'magnetic_stripe_no_cvv'
2195
+ | 'optical_code'
2196
+ | 'integrated_circuit_card'
2197
+ | 'contactless'
2198
+ | 'credential_on_file'
2199
+ | 'magnetic_stripe'
2200
+ | 'contactless_magnetic_stripe'
2201
+ | 'integrated_circuit_card_no_cvv'
2202
+ | null;
2203
+ }
2204
+ }
2205
+ }
2206
+ }
2207
+
2208
+ /**
2209
+ * The summarized state of this card payment.
2210
+ */
2211
+ export interface State {
2212
+ /**
2213
+ * The total authorized amount in the minor unit of the transaction's currency. For
2214
+ * dollars, for example, this is cents.
2215
+ */
2216
+ authorized_amount: number;
2217
+
2218
+ /**
2219
+ * The total incrementally updated authorized amount in the minor unit of the
2220
+ * transaction's currency. For dollars, for example, this is cents.
2221
+ */
2222
+ incremented_amount: number;
2223
+
2224
+ /**
2225
+ * The total reversed amount in the minor unit of the transaction's currency. For
2226
+ * dollars, for example, this is cents.
2227
+ */
2228
+ reversed_amount: number;
2229
+
2230
+ /**
2231
+ * The total settled or refunded amount in the minor unit of the transaction's
2232
+ * currency. For dollars, for example, this is cents.
2233
+ */
2234
+ settled_amount: number;
2235
+ }
2236
+ }
2237
+
2238
+ export interface CardPaymentListParams extends PageParams {
2239
+ /**
2240
+ * Filter Card Payments to ones belonging to the specified Account.
2241
+ */
2242
+ account_id?: string;
2243
+
2244
+ /**
2245
+ * Filter Card Payments to ones belonging to the specified Card.
2246
+ */
2247
+ card_id?: string;
2248
+
2249
+ created_at?: CardPaymentListParams.CreatedAt;
2250
+ }
2251
+
2252
+ export namespace CardPaymentListParams {
2253
+ export interface CreatedAt {
2254
+ /**
2255
+ * Return results after this [ISO 8601](https://en.wikipedia.org/wiki/ISO_8601)
2256
+ * timestamp.
2257
+ */
2258
+ after?: string;
2259
+
2260
+ /**
2261
+ * Return results before this [ISO 8601](https://en.wikipedia.org/wiki/ISO_8601)
2262
+ * timestamp.
2263
+ */
2264
+ before?: string;
2265
+
2266
+ /**
2267
+ * Return results on or after this
2268
+ * [ISO 8601](https://en.wikipedia.org/wiki/ISO_8601) timestamp.
2269
+ */
2270
+ on_or_after?: string;
2271
+
2272
+ /**
2273
+ * Return results on or before this
2274
+ * [ISO 8601](https://en.wikipedia.org/wiki/ISO_8601) timestamp.
2275
+ */
2276
+ on_or_before?: string;
2277
+ }
2278
+ }
2279
+
2280
+ export namespace CardPayments {
2281
+ export import CardPayment = API.CardPayment;
2282
+ export type CardPaymentsPage = _CardPaymentsPage;
2283
+ export import CardPaymentListParams = API.CardPaymentListParams;
2284
+ }