@netceterapx/click-to-pay-sdk 2.0.0 → 2.1.0

This diff represents the content of publicly available package versions that have been released to one of the supported registries. The information contained in this diff is provided for informational purposes only and reflects changes between package versions as they appear in their respective public registries.
package/index.d.ts ADDED
@@ -0,0 +1,910 @@
1
+ export declare interface AmexInitParams {
2
+ /**
3
+ * A unique id used to track the user journey. This is used for
4
+ * analytics to be able to correlate a single user "session" from
5
+ * button impression to the end of the transaction.
6
+ * This field may be created on the merchant page by the SRC
7
+ * Initiator and need to be passed-through to all the networks (SRC
8
+ * Systems). It is passed all the way to the DCFs as well.
9
+ */
10
+ srcInitiatorId: string;
11
+ /**
12
+ * SRCI identifier. This is generated by the SRC System during
13
+ * onboarding.
14
+ */
15
+ srciTransactionId: string;
16
+ dpaData: DpaData;
17
+ dpaTransactionOptions: DpaTransactionOptions;
18
+ }
19
+
20
+ export declare enum ButtonStyle {
21
+ FILLED = "FILLED",
22
+ OUTLINED = "OUTLINED"
23
+ }
24
+
25
+ export declare interface Card {
26
+ primaryAccountNumber: string;
27
+ panExpirationMonth: string;
28
+ panExpirationYear: string;
29
+ cardSecurityCode: string;
30
+ }
31
+
32
+ export declare type ComplianceResourceURLs = {
33
+ termsAndConditionsUrl: string;
34
+ privacyPolicyUrl: string;
35
+ };
36
+
37
+ export declare interface Config {
38
+ iframe?: ConfigIframe;
39
+ mastercard?: MastercardInitConfiguration;
40
+ visa?: VisaInitConfiguration;
41
+ amex?: Omit<AmexInitParams, 'srciTransactionId'>;
42
+ }
43
+
44
+ export declare interface ConfigIframe {
45
+ ref: HTMLIFrameElement;
46
+ handlers?: {
47
+ onDcfShow: () => void;
48
+ onDcfHide: () => void;
49
+ };
50
+ }
51
+
52
+ export declare interface ConsumerStatusEvent {
53
+ /**
54
+ * Informs whether consumer was recognized by detecting a cookie in the browser set by the SRC System.
55
+ */
56
+ isRecognized: boolean;
57
+ /**
58
+ * Informs whether consumer has a profile in any of the SRC Systems.
59
+ */
60
+ hasProfile: boolean;
61
+ /**
62
+ * Informs whether consumer has saved cards in any of the SRC Systems.
63
+ */
64
+ hasCards: boolean;
65
+ /**
66
+ * Gives a list of Schemes that the user has a profile in.
67
+ */
68
+ hasProfileInSchemes: CreditCardBrand[];
69
+ /**
70
+ * Informs whether the manual card entry form should be open by default.
71
+ * Is true when the consumer doesn't have a profile or has a profile but no cards.
72
+ */
73
+ manualCardEntryMandatory: boolean;
74
+ }
75
+
76
+ export declare enum CreditCardBrand {
77
+ MASTERCARD = "Mastercard",
78
+ VISA = "Visa",
79
+ AMEX = "Amex"
80
+ }
81
+
82
+ export declare enum DcfOpeningBehaviour {
83
+ /**
84
+ * Replaces the SRC UI and inplace shows the DCF window.
85
+ */
86
+ REPLACE = "replace",
87
+ /**
88
+ * Shows the DCF window as a modal. With backdrop from the DCF window.
89
+ */
90
+ FULL = "full",
91
+ /**
92
+ * Allows the DCF to show it's own iframe. (They default to popup iframe).
93
+ */
94
+ POPUP = "popup"
95
+ }
96
+
97
+ export declare interface DpaData {
98
+ /**
99
+ * Display name of the DPA.
100
+ * Ex. ‘Disney Online’.
101
+ */
102
+ dpaPresentationName: string;
103
+ /**
104
+ * Website URL
105
+ * Ex. ‘http://www.disneyonline.com’
106
+ */
107
+ dpaUri?: string;
108
+ /**
109
+ * Undocumented parameter.
110
+ */
111
+ dpaName: string;
112
+ }
113
+
114
+ export declare interface DpaTransactionOptions {
115
+ threeDsPreference: ThreeDsPreference;
116
+ }
117
+
118
+ export declare enum EnablePerformanceMeasurement {
119
+ TRUE = "true",
120
+ FALSE = "false"
121
+ }
122
+
123
+ export declare enum Environment {
124
+ SANDBOX = "SANDBOX",
125
+ PRODUCTION = "PRODUCTION"
126
+ }
127
+
128
+ export declare interface HeadlessCheckoutParams {
129
+ /**
130
+ * The payment card details.
131
+ * Required.
132
+ */
133
+ card: Card;
134
+ /**
135
+ * The iframe which the DCF will load.
136
+ * Conditional.
137
+ * Required only for Mastercard.
138
+ */
139
+ iframeRef?: HTMLIFrameElement;
140
+ /**
141
+ * DPA configuration data, which can be used to override the DPA configuration provided during the initial configuration of the component.
142
+ */
143
+ dpaTransactionOptions?: VisaDpaTransactionOptions | MastercardDpaTransactionOptions;
144
+ /**
145
+ * The consumer's Click to Pay profile details.
146
+ * Conditional.
147
+ * Required for Visa.
148
+ * Required for MasterCard only when adding a card and no MasterCard profile is present in the SRC System.
149
+ */
150
+ profileDetails?: ProfileDetails;
151
+ /**
152
+ * Flag to indicate if the user wants to skip verification next time. If set to true, the Scheme will drop a cookie to ensure that user is recognized on this device.
153
+ * Optional.
154
+ * Valid only for Mastercard.
155
+ */
156
+ skipVerificationNextTime?: boolean;
157
+ /**
158
+ * Compliance resources URLs the user agreed to.
159
+ * Conditional.
160
+ * Required only for Visa.
161
+ * Provide the compliance resources fetched through the `getComplianceResourceURLsForVisa()` method.
162
+ */
163
+ complianceResourceURLs?: ComplianceResourceURLs;
164
+ }
165
+
166
+ export declare enum HidePayButton {
167
+ TRUE = "true",
168
+ FALSE = "false"
169
+ }
170
+
171
+ export declare enum IsExpanded {
172
+ TRUE = "true",
173
+ FALSE = "false"
174
+ }
175
+
176
+ export declare enum IsPanInPayButton {
177
+ TRUE = "true",
178
+ FALSE = "false"
179
+ }
180
+
181
+ /**
182
+ * Supported languages.
183
+ */
184
+ export declare enum LANG {
185
+ /** Arabic - United Arab Emirates */
186
+ ar_AE = "ar_AE",
187
+ /** Arabic - Saudi Arabia */
188
+ ar_SA = "ar_SA",
189
+ /** Bulgarian - Bulgaria */
190
+ bg_BG = "bg_BG",
191
+ /** Czech - Czechia */
192
+ cs_CZ = "cs_CZ",
193
+ /** Danish - Denmark */
194
+ da_DA = "da_DA",
195
+ /** German - Austria */
196
+ de_AT = "de_AT",
197
+ /** German - Germany */
198
+ de_DE = "de_DE",
199
+ /** Greek - Greece */
200
+ el_GR = "el_GR",
201
+ /** English - United Kingdom */
202
+ en_UK = "en_UK",
203
+ /** English - United States of America */
204
+ en_US = "en_US",
205
+ /** Spanish - Spain */
206
+ es_ES = "es_ES",
207
+ /** Finnish - Finland */
208
+ fi_FI = "fi_FI",
209
+ /** French - France */
210
+ fr_FR = "fr_FR",
211
+ /** Croatian - Croatia */
212
+ hr_HR = "hr_HR",
213
+ /** Hungarian - Hungary */
214
+ hu_HU = "hu_HU",
215
+ /** Italian - Italy */
216
+ it_IT = "it_IT",
217
+ /** Japanese - Japan */
218
+ ja_JP = "ja_JP",
219
+ /** Latvian - Latvia */
220
+ lv_LV = "lv_LV",
221
+ /** Dutch - Belgium */
222
+ nl_BE = "nl_BE",
223
+ /** Dutch - Nederland */
224
+ nl_NL = "nl_NL",
225
+ /** Norwegian - Norway */
226
+ no_NO = "no_NO",
227
+ /** Polish - Poland */
228
+ pl_PL = "pl_PL",
229
+ /** Portuguese - Portugal */
230
+ pt_PT = "pt_PT",
231
+ /** Romanian - Romania */
232
+ ro_RO = "ro_RO",
233
+ /** Russian - Russian */
234
+ ru_RU = "ru_RU",
235
+ /** Slovak - Slovakia */
236
+ sk_SK = "sk_SK",
237
+ /** Slovenian - Slovenia */
238
+ sl_SL = "sl_SL",
239
+ /** Swedish - Finland */
240
+ sv_FI = "sv_FI",
241
+ /** Swedish - Sweden */
242
+ sv_SE = "sv_SE",
243
+ /** Ukrainian - Ukraine */
244
+ uk_UA = "uk_UA",
245
+ /** Vietnamese - Vietnam */
246
+ vi_VN = "vi_VN"
247
+ }
248
+
249
+ export declare type MastercardCustomInputData = {
250
+ /**
251
+ * Configure when card enrollment is offered to the cardholder. This only applies to Mastercard cards.
252
+ * Valid values for enum:
253
+ * • WITHIN_CHECKOUT – This experience offers Click to Pay as a payment option to complete Checkout for an order. (Guest Checkout Option)
254
+ * • PAYMENT_SETTINGS – This experience offers Click to Pay to enroll and add their cards for faster checkout. (No Guest Checkout Option)
255
+ * Either one of these values must be set to enable Embedded checkout experience along with confirmPayment parameter.
256
+ */
257
+ 'com.mastercard.dcfExperience'?: MastercardCustomInputDataEnum;
258
+ };
259
+
260
+ export declare enum MastercardCustomInputDataEnum {
261
+ WITHIN_CHECKOUT = "WITHIN_CHECKOUT",
262
+ PAYMENT_SETTINGS = "PAYMENT_SETTINGS"
263
+ }
264
+
265
+ export declare enum MastercardDpaBillingPreferenceEnum {
266
+ FULL = "FULL",
267
+ NONE = "NONE",
268
+ POSTAL_COUNTRY = "POSTAL_COUNTRY"
269
+ }
270
+
271
+ /**
272
+ * May be provided, as required, to dynamically update previously registered DPA Data, e.g., presentation name.
273
+ */
274
+ export declare type MastercardDpaData = {
275
+ /**
276
+ * Display name of the DPA website.
277
+ */
278
+ dpaPresentationName?: string;
279
+ /**
280
+ * URL of the DPA website.
281
+ */
282
+ dpaUri?: string;
283
+ };
284
+
285
+ export declare enum MastercardDpaShippingPreferenceEnum {
286
+ FULL = "FULL",
287
+ NONE = "NONE"
288
+ }
289
+
290
+ /**
291
+ * DPA-specific preferences and transaction configuration parameters.
292
+ * This is required for the init method, and may also be included in the checkout method.
293
+ */
294
+ export declare type MastercardDpaTransactionOptions = {
295
+ /**
296
+ * Merchant site preferred locale.
297
+ * Format: ISO language_country pair (e.g., en_US ).
298
+ * This is needed to ensure correct language and user experience.
299
+ * The value of the dpaLocale will be used by Mastercard SRC to create user profile and deliver Click to Pay experience by default.
300
+ * Users can choose to change the default country/language passed in dpaLocale from a country/language selection option in the DCF screen before profile creation.
301
+ * If users opt to choose that, then the profile will be created in the user selected country and language
302
+ * and the same will also be used to deliver the experience in all future checkouts by the same user.
303
+ */
304
+ dpaLocale: string;
305
+ /**
306
+ * Note: Mastercard does not currently support declining payments based on the cardholder’s billing address.
307
+ * You should specify an empty array.
308
+ */
309
+ dpaAcceptedBillingCountries?: string[];
310
+ /**
311
+ * Shipping restrictions.
312
+ * Format: ISO 3166-1 alpha-2 format.
313
+ * Shipping region country codes that limits the selection of eligible shipping addresses.
314
+ * If this list is empty, then it means all countries are accepted.
315
+ */
316
+ dpaAcceptedShippingCountries?: string[];
317
+ /**
318
+ * Verbosity of billing address required by the DPA.
319
+ * Valid values for enum:
320
+ * • FULL
321
+ * • NONE
322
+ * • POSTAL_COUNTRY
323
+ * If not provided, the default is NONE.
324
+ */
325
+ dpaBillingPreference?: MastercardDpaBillingPreferenceEnum;
326
+ /**
327
+ * Verbosity of shipping address required by the DPA.
328
+ * Valid values for enum:
329
+ * • FULL
330
+ * • NONE
331
+ * If not provided the default is FULL.
332
+ */
333
+ dpaShippingPreference?: MastercardDpaShippingPreferenceEnum;
334
+ /**
335
+ * Flag to indicate if the consumer name is requested or not.
336
+ * Default is true.
337
+ */
338
+ consumerNameRequested?: boolean;
339
+ /**
340
+ * Flag to indicate if the consumer email address is requested or not.
341
+ * Default is true.
342
+ */
343
+ consumerEmailAddressRequested?: boolean;
344
+ /**
345
+ * Flag to indicate if the consumer phone number is requested or not.
346
+ * Default is true.
347
+ */
348
+ consumerPhoneNumberRequested?: boolean;
349
+ /**
350
+ * Payment options requested by the DPA.
351
+ */
352
+ paymentOptions?: MastercardPaymentOptions;
353
+ /**
354
+ * Note: Not currently supported by Mastercard SRC.
355
+ */
356
+ transactionType?: unknown;
357
+ /**
358
+ * Container for amount and currency code.
359
+ */
360
+ transactionAmount?: MastercardTransactionAmount;
361
+ /**
362
+ * Whether this is a guest checkout.
363
+ */
364
+ isGuestCheckout?: boolean;
365
+ /**
366
+ * Note: Not currently supported by Mastercard SRC.
367
+ */
368
+ payloadTypeIndicatorCheckout?: unknown;
369
+ /**
370
+ * Note: Not currently supported by Mastercard SRC.
371
+ */
372
+ payloadTypeIndicatorPayload?: unknown;
373
+ /**
374
+ * Extensible container that allows DPA to pass a network specific set of data to Click to Pay System.
375
+ */
376
+ customInputData?: MastercardCustomInputData;
377
+ /**
378
+ * Key parameter to distinguish if a network-specific DCF or a loading screen is displayed after card selection.
379
+ * Default is FALSE.
380
+ * When set to False, consumer is prompted to ‘Continue’ the payment on a loading screen; when set to True, consumer is prompted with a Confirm payment message on DCF.
381
+ */
382
+ confirmPayment?: boolean;
383
+ };
384
+
385
+ export declare enum MastercardDynamicDataTypeEnum {
386
+ CARD_APPLICATION_CRYPTOGRAM_SHORT_FORM = "CARD_APPLICATION_CRYPTOGRAM_SHORT_FORM"
387
+ }
388
+
389
+ export declare type MastercardInitConfiguration = {
390
+ /**
391
+ * Identifier for the integrator. This is generated by the Mastercard System during onboarding.
392
+ */
393
+ srcInitiatorId: string;
394
+ /**
395
+ * DPA Identifier. This is generated by the integrator during registration.
396
+ */
397
+ srciDpaId: string;
398
+ /**
399
+ * DPA-specific preferences and transaction configuration parameters.
400
+ */
401
+ dpaTransactionOptions: MastercardDpaTransactionOptions;
402
+ /**
403
+ * May be provided, as required, to dynamically update previously registered DPA Data, e.g., presentation name.
404
+ */
405
+ dpaData?: MastercardDpaData;
406
+ };
407
+
408
+ export declare type MastercardPaymentOptions = {
409
+ /**
410
+ * Note: Not currently supported by Mastercard SRC
411
+ */
412
+ dpaDynamicDataTtlMinutes?: number;
413
+ /**
414
+ * Type of crytogram or token used for the card data.
415
+ * Valid values for enum:
416
+ * • CARD_APPLICATION_CRYPTOGRAM_SHORT_FORM for DSRP format
417
+ */
418
+ dynamicDataType?: MastercardDynamicDataTypeEnum;
419
+ };
420
+
421
+ export declare type MastercardTransactionAmount = {
422
+ /**
423
+ * Transaction amount given in the format corresponding to the ISO 4217 currency code specified by transactionCurrencyCode.
424
+ * For example if the currency is USD, a transaction of $100 would be given as ‘100.00’. Note that the decimal
425
+ * separator should be a dot (.) and the number of digits required after the separator depends on the currency used.
426
+ * Ensure you use the correct precision at all times.
427
+ */
428
+ transactionAmount: string;
429
+ /**
430
+ * String specifying the ISO 4217 currency code (e.g., USD)
431
+ */
432
+ transactionCurrencyCode: string;
433
+ };
434
+
435
+ /**
436
+ * Merchant provides configuration for modifying component.
437
+ */
438
+ export declare interface MerchantConfig {
439
+ isExpanded: IsExpanded;
440
+ locale: LANG;
441
+ email: string | undefined;
442
+ dcfOpeningBehaviour: DcfOpeningBehaviour;
443
+ dpaPresentationName: string | undefined;
444
+ transactionAmount: TransactionAmount;
445
+ isPanInPayButton: IsPanInPayButton;
446
+ buttonStyle: ButtonStyle;
447
+ hidePayButton: HidePayButton;
448
+ enablePerformanceMeasurement: EnablePerformanceMeasurement;
449
+ }
450
+
451
+ export declare const messageTimeout = 3000;
452
+
453
+ export declare enum OrchestratorErrorReason {
454
+ NOT_AUTHENTICATED = "NOT_AUTHENTICATED"
455
+ }
456
+
457
+ export declare type ProfileDetails = {
458
+ firstName: string;
459
+ lastName: string;
460
+ fullName: string;
461
+ email: string;
462
+ country: string;
463
+ languageCode: string;
464
+ mobileNumber: {
465
+ /**
466
+ * Length = 1 to 4 digits. Phone number country code. International calling code format.
467
+ */
468
+ countryCode: string;
469
+ /**
470
+ * Length = 4 to 14 digits. Phone number without country code.
471
+ */
472
+ phoneNumber: string;
473
+ };
474
+ billingAddress?: {
475
+ /**
476
+ * Example: US.
477
+ */
478
+ countryCode: string;
479
+ /**
480
+ * The city associated with the address
481
+ */
482
+ city?: string;
483
+ /**
484
+ * The state associated with the address
485
+ */
486
+ state?: string;
487
+ /**
488
+ * The zip code associated with the address.
489
+ */
490
+ zip?: string;
491
+ /**
492
+ * The recipient name for the address.
493
+ */
494
+ name?: string;
495
+ /**
496
+ * Line 1 of the address.
497
+ */
498
+ line1?: string;
499
+ /**
500
+ * Line 2 of the address.
501
+ */
502
+ line2?: string;
503
+ /**
504
+ * Line 3 of the address.
505
+ */
506
+ line3?: string;
507
+ };
508
+ };
509
+
510
+ export declare enum Sandbox {
511
+ TRUE = "true",
512
+ FALSE = "false"
513
+ }
514
+
515
+ export declare enum ThreeDsPreference {
516
+ 'NONE' = "NONE",
517
+ 'SELF' = "SELF",
518
+ 'ONBEHALF' = "ONBEHALF"
519
+ }
520
+
521
+ export declare type TransactionAmount = {
522
+ /**
523
+ * Amount associated with transaction.
524
+ * Format: Numeric string with a decimal separator. Note that the decimal separator should be a dot (.)
525
+ */
526
+ amount: string;
527
+ /**
528
+ * Currency code used for the transaction amount.
529
+ * Format: ISO 4217 alpha-3 currency code.
530
+ */
531
+ currencyCode: string;
532
+ };
533
+
534
+ export declare type UICustomizations = {
535
+ buttonAndBadgeColor?: string;
536
+ buttonFilledHoverColor?: string;
537
+ buttonOutlinedHoverColor?: string;
538
+ buttonDisabledColor?: string;
539
+ cardItemActiveColor?: string;
540
+ buttonAndBadgeTextColor?: string;
541
+ linkTextColor?: string;
542
+ accentColor?: string;
543
+ fontFamily?: string;
544
+ buttonAndInputRadius?: string;
545
+ cardItemRadius?: string;
546
+ };
547
+
548
+ export declare enum VisaAuthenticationReasonEnum {
549
+ TRANSACTION_AUTHENTICATION = "TRANSACTION_AUTHENTICATION",
550
+ NOT_PREFERRED = "NOT_PREFERRED"
551
+ }
552
+
553
+ export declare enum VisaCustomFlowTypeEnum {
554
+ PAYMENT_SETTING = "paymentsetting",
555
+ WITHIN_CHECKOUT = "withincheckout"
556
+ }
557
+
558
+ export declare type VisaCustomInputData = {
559
+ /**
560
+ * Checkout orchestrator. Must be "merchant" for Merchant Orchestrated Checkout.
561
+ */
562
+ checkoutOrchestrator?: string;
563
+ /**
564
+ * Flow type indicator for SRC orchestrated flows.
565
+ * Valid values for enum:
566
+ * • paymentsetting
567
+ * • withincheckout
568
+ */
569
+ customFlowType?: VisaCustomFlowTypeEnum;
570
+ };
571
+
572
+ export declare enum VisaDpaBillingPreferenceEnum {
573
+ ALL = "ALL",
574
+ POSTAL_COUNTRY = "POSTAL_COUNTRY",
575
+ NONE = "NONE"
576
+ }
577
+
578
+ export declare type VisaDpaData = {
579
+ /**
580
+ * DPA identifier, which is generated by the SRC system during DPA registration. Required if srciDpaId is not provided
581
+ * in the top-level structure of the request body; optional unless you want to specify a display presentation name,
582
+ * the website address, or the preferred 3DS behavior.
583
+ * Format: String, 64 bytes
584
+ */
585
+ srciDpaId?: string;
586
+ /**
587
+ * Display name of the DPA.
588
+ * Example: Mycompany Online
589
+ */
590
+ dpaPresentationName?: string;
591
+ /**
592
+ * The URI for the website.
593
+ * Example: http://www.Mycompanyonline.com
594
+ */
595
+ dpaUri?: string;
596
+ /**
597
+ * (deprecated) This field specifies the preference of 3DS behavior specified by DPA.
598
+ * Valid values for enum:
599
+ * • ONBEHALF
600
+ * • SELF
601
+ * • NONE
602
+ * • UNKNOWN (default)
603
+ */
604
+ dpaThreeDsPreference?: VisaDpaThreeDsPreferenceEnum;
605
+ };
606
+
607
+ export declare enum VisaDpaShippingPreferenceEnum {
608
+ ALL = "ALL",
609
+ POSTAL_COUNTRY = "POSTAL_COUNTRY",
610
+ NONE = "NONE"
611
+ }
612
+
613
+ export declare enum VisaDpaThreeDsPreferenceEnum {
614
+ ONBEHALF = "ONBEHALF",
615
+ SELF = "SELF",
616
+ NONE = "NONE",
617
+ UNKNOWN = "UNKNOWN"
618
+ }
619
+
620
+ export declare type VisaDpaTransactionOptions = {
621
+ /**
622
+ * DPA’s preferred locale. This can be the same as the locale in the init parameters or can be different.
623
+ * Format: Based on ISO format for language (ISO 639-1) and alpha-2 country code (ISO 3166-1 alpha-2).
624
+ * The language and country should be separated using an underscore ( _ ).
625
+ * Example: en_US, fr_CA
626
+ */
627
+ dpaLocale?: string;
628
+ /**
629
+ * Billing countries. Payments from the listed billing countries are accepted.
630
+ * If this list is empty, all countries are accepted.
631
+ * Format: Array of country codes in ISO 3166-1 alpha-2 format
632
+ * Example: ["US”, “CA”, “AU”]
633
+ */
634
+ dpaAcceptedBillingCountries?: string[];
635
+ /**
636
+ * Shipping countries; shipping region country codes that limit the selection of eligible shipping addresses.
637
+ * If this list is empty, all countries are accepted.
638
+ * Format: Array of country codes in ISO 3166-1 alpha-2 format
639
+ */
640
+ dpaAcceptedShippingCountries?: string[];
641
+ /**
642
+ * Verbosity of billing address required by the DPA.
643
+ * Valid values for enum:
644
+ * • ALL (default)
645
+ * • POSTAL_COUNTRY
646
+ * • NONE
647
+ */
648
+ dpaBillingPreference?: VisaDpaBillingPreferenceEnum;
649
+ /**
650
+ * Extent to which DPA wants to have shipping address collected.
651
+ * Valid values for enum:
652
+ * • ALL (default)
653
+ * • POSTAL_COUNTRY
654
+ * • NONE
655
+ */
656
+ dpaShippingPreference?: VisaDpaShippingPreferenceEnum;
657
+ /**
658
+ * Whether the name of the consumer has been requested.
659
+ */
660
+ consumerNameRequested?: boolean;
661
+ /**
662
+ * Whether the email address of the consumer has been requested.
663
+ */
664
+ consumerEmailAddressRequested?: boolean;
665
+ /**
666
+ * Whether the Phone number of the consumer has been requested.
667
+ */
668
+ consumerPhoneNumberRequested?: boolean;
669
+ /**
670
+ * Payment options requested by the DPA.
671
+ */
672
+ paymentOptions?: VisaPaymentOptions;
673
+ /**
674
+ * Whether the payment will be processed immediately after selection or after confirmation.
675
+ * Valid values for enum:
676
+ * • pay – proceed after selection
677
+ * • continue – proceed after confirmation (default)
678
+ */
679
+ reviewAction?: VisaReviewActionEnum;
680
+ /**
681
+ * Review message to go with action.
682
+ */
683
+ checkoutDescription?: string;
684
+ /**
685
+ * Type of the transaction.
686
+ * Valid values for enum:
687
+ * • PURCHASE (default)
688
+ * • BILL_PAYMENT
689
+ * • MONEY_TRANSFER
690
+ */
691
+ transactionType?: VisaTransactionTypeEnum;
692
+ /**
693
+ * Type of orders.
694
+ * Valid values for enum:
695
+ * • REAUTHORIZATION
696
+ * • RECURRING
697
+ * • INSTALLMENT
698
+ */
699
+ orderType?: VisaOrderTypeEnum;
700
+ /**
701
+ * The verbosity of payload requested.
702
+ * • FULL - includes everything; all PCI & PII data (card/token, billing, shipping, consumer)
703
+ * • SUMMARY - (default) no JWE. If FULL needed during checkout, SRCi needs to make a request for it explicitly.
704
+ * • PAYMENT - same as FULL
705
+ * • NON_PAYMENT - only PII (billing, shipping, consumer). It has both SUMMARY and encryptedPayload without card, token, or dynamicData.
706
+ * • NONE - just srcCorrelationId (with COMPLETE dcfActionCode)
707
+ */
708
+ payloadTypeIndicator?: VisaPayloadTypeIndicatorEnum;
709
+ /**
710
+ * Amount of the transaction.
711
+ * Required when transaction authentication is performed.
712
+ */
713
+ transactionAmount?: VisaTransactionAmount;
714
+ /**
715
+ * The order identifier generated by the DPA. Typically used for reconciliation process by the DPA.
716
+ * Format: Universally Unique Identifier (UUID) as string
717
+ */
718
+ merchantOrderId?: string;
719
+ /**
720
+ * Code associated with Merchant Category
721
+ * Format: 4-digit string
722
+ */
723
+ merchantCategoryCode?: string;
724
+ /**
725
+ * The country code associated with the merchant’s billing or shipping address.
726
+ * Format: ISO-3166 - 1 alpha-2 standard code
727
+ * Example: US – United States
728
+ */
729
+ merchantCountryCode?: string;
730
+ /**
731
+ * (Deprecated) If 3DS is requested for the transaction, this attribute is required.
732
+ */
733
+ threeDSInputData?: VisaThreeDsInputData;
734
+ /**
735
+ * Custom input data elements presented to the SRC System.
736
+ * CustomInputData structure;
737
+ */
738
+ customInputData?: VisaCustomInputData;
739
+ };
740
+
741
+ export declare enum VisaDynamicDataTypeEnum {
742
+ TAVV = "TAVV",
743
+ DTVV = "DTVV"
744
+ }
745
+
746
+ export declare type VisaInitConfiguration = {
747
+ /**
748
+ * SRCi identifier generated by an SRC system during the onboarding process.
749
+ */
750
+ srcInitiatorId: string;
751
+ /**
752
+ * A unique ID provided by the SRCi for the DPA, which can be used as an external client ID.
753
+ * Required if srciDpaId in dpaData is not provided.
754
+ */
755
+ srciDpaId: string;
756
+ /**
757
+ * DPA registration data.
758
+ * Required if srciDpaId is not provided.
759
+ */
760
+ dpaData?: VisaDpaData;
761
+ /**
762
+ * DPA configuration data, which overrides the configuration on the SRC system that was created during DPA registration.
763
+ */
764
+ dpaTransactionOptions: VisaDpaTransactionOptions;
765
+ /**
766
+ * 3-D Secure options to execute 3DS authentication for transaction.
767
+ */
768
+ threeDSOptions: VisaThreeDSOptions;
769
+ /**
770
+ * KID (Key ID) of the encryption key to encrypt card information before sending it to Visa.
771
+ */
772
+ encryptionKey: string;
773
+ /**
774
+ * Modulus of the encryption key to encrypt card information before sending it to Visa.
775
+ */
776
+ nModulus: string;
777
+ };
778
+
779
+ export declare enum VisaOrderTypeEnum {
780
+ REAUTHORIZATION = "REAUTHORIZATION",
781
+ RECURRING = "RECURRING",
782
+ INSTALLMENT = "INSTALLMENT"
783
+ }
784
+
785
+ export declare enum VisaPayloadTypeIndicatorEnum {
786
+ FULL = "FULL",
787
+ SUMMARY = "SUMMARY",
788
+ PAYMENT = "PAYMENT",
789
+ NON_PAYMENT = "NON_PAYMENT",
790
+ NONE = "NONE"
791
+ }
792
+
793
+ export declare type VisaPaymentOptions = {
794
+ /**
795
+ * The minimum requested validity period for the transaction credentials,
796
+ * such as a cryptogram, returned by the SRC system, in minutes.
797
+ * If this is not provided, the values are determined by the SRCs.
798
+ */
799
+ dpaDynamicDataTTLMinutes?: number;
800
+ /**
801
+ * The dynamic data type.
802
+ * Valid values for enum:
803
+ * • TAVV - Transaction Authentication Verification Value
804
+ * • DTVV – Dynamic Token Verification Value (DEPRECATED)
805
+ */
806
+ dynamicDataType?: VisaDynamicDataTypeEnum;
807
+ /**
808
+ * Whether PAN data is requested.
809
+ */
810
+ dpaPanRequested?: boolean;
811
+ };
812
+
813
+ export declare enum VisaReviewActionEnum {
814
+ PAY = "pay",
815
+ CONTINUE = "continue"
816
+ }
817
+
818
+ export declare enum VisaThreeDSChallengeIndicator {
819
+ /** 01 - No preference */
820
+ NO_PREFERENCE = "01",
821
+ /** 02 - No challenge requested */
822
+ NO_CHALLENGE_REQUESTED = "02",
823
+ /** 03 - Challenge requested (3DS Requestor Preference) */
824
+ CHALLENGE_REQUESTED_3DS_REQUESTOR_PREFERENCE = "03",
825
+ /** 04 - Challenge requested (Mandate) */
826
+ CHALLENGE_REQUESTED_MANDATE = "04",
827
+ /** 05 - No challenge requested (transactional risk analysis is already performed) */
828
+ NO_CHALLENGE_REQUESTED_RISK_ANALYSIS_PERFORMED = "05",
829
+ /** 06 - No challenge requested (Data share only) */
830
+ NO_CHALLENGE_REQUESTED_DATA_SHARE_ONLY = "06",
831
+ /** 07 - No challenge requested (strong consumer authentication is already performed) */
832
+ NO_CHALLENGE_REQUESTED_SCA_PERFORMED = "07",
833
+ /** 08 - No challenge requested (utilize trust list exemption if no challenge required) */
834
+ NO_CHALLENGE_REQUESTED_TRUST_LIST_EXEMPTION = "08",
835
+ /** 09 - Challenge requested (trust list prompt requested if challenge required) */
836
+ CHALLENGE_REQUESTED_TRUST_LIST_PROMPT = "09"
837
+ }
838
+
839
+ export declare type VisaThreeDsInputData = {
840
+ /**
841
+ * The ID assigned to the merchant for authentication request to initiate 3DS with MPI.
842
+ */
843
+ requestorId: string;
844
+ /**
845
+ * Merchant’s Acquirer ID
846
+ */
847
+ acquirerId: string;
848
+ /**
849
+ * Acquirer’s Merchant ID
850
+ */
851
+ acquirerMid: string;
852
+ };
853
+
854
+ export declare type VisaThreeDSOptions = {
855
+ /**
856
+ * SRCi-provided authentication reasons used by the SRC System to perform authentication.
857
+ * Valid values for enum:
858
+ * • TRANSACTION_AUTHENTICATION
859
+ * • NOT_PREFERRED
860
+ */
861
+ authenticationReason: VisaAuthenticationReasonEnum;
862
+ /**
863
+ * Acquirer-assigned Merchant identifier.
864
+ */
865
+ acquirerMerchantId: string;
866
+ /**
867
+ * Acquirer identification code as assigned by the Directory Server.
868
+ */
869
+ acquirerBIN: string;
870
+ /**
871
+ * Merchant name assigned by the Acquirer or Payment System.
872
+ */
873
+ merchantName: string;
874
+ /**
875
+ * A challenge indicator value related to 3DS authentication.
876
+ * Valid values:
877
+ * • 01 - No preference
878
+ * • 02 - No challenge requested
879
+ * • 03 - Challenge requested (3DS Requestor Preference)
880
+ * • 04 - Challenge requested (Mandate)
881
+ * • 05 - No challenge requested (transactional risk analysis is already performed)
882
+ * • 06 - No challenge requested (Data share only)
883
+ * • 07 - No challenge requested (strong consumer authentication is already performed)
884
+ * • 08 - No challenge requested (utilize trust list exemption if no challenge required)
885
+ * • 09 - Challenge requested (trust list prompt requested if challenge required)
886
+ */
887
+ challengeIndicator: VisaThreeDSChallengeIndicator;
888
+ };
889
+
890
+ export declare type VisaTransactionAmount = {
891
+ /**
892
+ * Amount associated with transaction.
893
+ * Format: Numeric string; maximum 9 digits before an optional decimal
894
+ * point and 4 decimal digits after
895
+ */
896
+ transactionAmount: string;
897
+ /**
898
+ * Currency code used for the transaction amount.
899
+ * Format: ISO 4217 alpha-3 currency code
900
+ */
901
+ transactionCurrencyCode: string;
902
+ };
903
+
904
+ export declare enum VisaTransactionTypeEnum {
905
+ PURCHASE = "PURCHASE",
906
+ BILL_PAYMENT = "BILL_PAYMENT",
907
+ MONEY_TRANSFER = "MONEY_TRANSFER"
908
+ }
909
+
910
+ export { }