@capgo/capacitor-pay 8.1.1 → 8.1.3

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.
@@ -175,82 +175,581 @@ export interface ApplePayPaymentResult {
175
175
  billingContact?: ApplePayContact;
176
176
  }
177
177
  export type GooglePayEnvironment = 'test' | 'production';
178
- export type GooglePayCardNetwork = 'AMEX' | 'DISCOVER' | 'JCB' | 'MASTERCARD' | 'VISA' | (string & Record<never, never>);
178
+ export type GooglePayCardNetwork = 'AMEX' | 'DISCOVER' | 'ELECTRON' | 'ELO' | 'ELO_DEBIT' | 'INTERAC' | 'JCB' | 'MAESTRO' | 'MASTERCARD' | 'VISA' | (string & Record<never, never>);
179
179
  export type GooglePayAuthMethod = 'PAN_ONLY' | 'CRYPTOGRAM_3DS' | (string & Record<never, never>);
180
+ export type GooglePayPaymentMethodType = 'CARD' | (string & Record<never, never>);
181
+ export type GooglePayTokenizationType = 'PAYMENT_GATEWAY' | 'DIRECT' | (string & Record<never, never>);
182
+ export type GooglePayBillingAddressFormat = 'MIN' | 'FULL' | 'FULL-ISO3166' | (string & Record<never, never>);
183
+ export type GooglePayShippingAddressFormat = 'FULL' | 'FULL-ISO3166' | (string & Record<never, never>);
180
184
  export type GooglePayTotalPriceStatus = 'NOT_CURRENTLY_KNOWN' | 'ESTIMATED' | 'FINAL' | (string & Record<never, never>);
185
+ export type GooglePayCheckoutOption = 'DEFAULT' | 'COMPLETE_IMMEDIATE_PURCHASE' | 'CONTINUE_TO_REVIEW' | (string & Record<never, never>);
186
+ export type GooglePayDisplayItemType = 'LINE_ITEM' | 'SUBTOTAL' | 'TAX' | 'DISCOUNT' | 'SHIPPING_OPTION' | (string & Record<never, never>);
187
+ export type GooglePayDisplayItemStatus = 'FINAL' | 'PENDING' | (string & Record<never, never>);
188
+ export type GooglePayCallbackIntent = 'OFFER' | 'PAYMENT_AUTHORIZATION' | 'SHIPPING_ADDRESS' | 'SHIPPING_OPTION' | 'PAYMENT_METHOD' | (string & Record<never, never>);
189
+ export type GooglePayCardFundingSource = 'UNKNOWN' | 'CREDIT' | 'DEBIT' | 'PREPAID' | (string & Record<never, never>);
181
190
  export interface GooglePayBillingAddressParameters {
182
- format?: 'MIN' | 'FULL' | (string & Record<never, never>);
191
+ /**
192
+ * Billing address format to return when `billingAddressRequired` is `true`.
193
+ *
194
+ * Use `FULL` only when you truly need the extra fields to complete the order.
195
+ */
196
+ format?: GooglePayBillingAddressFormat;
197
+ /**
198
+ * Whether a billing phone number should also be returned.
199
+ */
200
+ phoneNumberRequired?: boolean;
201
+ }
202
+ export interface GooglePayShippingAddressParameters {
203
+ /**
204
+ * Restricts shipping addresses to the provided ISO 3166-1 alpha-2 country codes.
205
+ */
206
+ allowedCountryCodes?: string[];
207
+ /**
208
+ * Whether a phone number should be collected with the shipping address.
209
+ */
183
210
  phoneNumberRequired?: boolean;
211
+ /**
212
+ * Shipping address format to return when `shippingAddressRequired` is `true`.
213
+ *
214
+ * `MIN` is not a valid value for shipping addresses.
215
+ */
216
+ format?: GooglePayShippingAddressFormat;
217
+ }
218
+ export interface GooglePayCardNetworkParameters {
219
+ /**
220
+ * Card network these network-specific parameters apply to.
221
+ */
222
+ cardNetwork: GooglePayCardNetwork;
223
+ /**
224
+ * Acquiring institution identification code used by some network-specific flows.
225
+ */
226
+ acquirerBin?: string;
227
+ /**
228
+ * Acquirer-assigned merchant identifier used by some network-specific flows.
229
+ */
230
+ acquirerMerchantId?: string;
184
231
  }
185
232
  export interface GooglePayCardPaymentMethodParameters {
186
- allowedAuthMethods?: GooglePayAuthMethod[];
187
- allowedCardNetworks?: GooglePayCardNetwork[];
233
+ /**
234
+ * Authentication methods your gateway or processor accepts.
235
+ */
236
+ allowedAuthMethods: GooglePayAuthMethod[];
237
+ /**
238
+ * Card networks your gateway or processor accepts.
239
+ */
240
+ allowedCardNetworks: GooglePayCardNetwork[];
241
+ /**
242
+ * Whether prepaid cards are allowed. Defaults to `true` in Google Pay.
243
+ */
244
+ allowPrepaidCards?: boolean;
245
+ /**
246
+ * Whether credit cards are allowed. Defaults to `true` in Google Pay.
247
+ */
248
+ allowCreditCards?: boolean;
249
+ /**
250
+ * Restricts users to cards issued in the provided ISO 3166-1 alpha-2 countries.
251
+ */
252
+ allowedIssuerCountryCodes?: string[];
253
+ /**
254
+ * Blocks cards issued in the provided ISO 3166-1 alpha-2 countries.
255
+ *
256
+ * This is mutually exclusive with `allowedIssuerCountryCodes`.
257
+ */
258
+ blockedIssuerCountryCodes?: string[];
259
+ /**
260
+ * Whether Google Pay should include assurance details about the selected card.
261
+ */
262
+ assuranceDetailsRequired?: boolean;
263
+ /**
264
+ * Whether a billing address is required from the buyer.
265
+ */
188
266
  billingAddressRequired?: boolean;
267
+ /**
268
+ * Additional billing-address controls used when `billingAddressRequired` is `true`.
269
+ */
189
270
  billingAddressParameters?: GooglePayBillingAddressParameters;
271
+ /**
272
+ * Optional network-specific processing parameters for supported networks.
273
+ */
274
+ cardNetworkParameters?: GooglePayCardNetworkParameters[];
275
+ /**
276
+ * Whether the card verification code should be returned in the payment token.
277
+ *
278
+ * This requires Google enablement for your account.
279
+ */
280
+ cvcRequired?: boolean;
281
+ }
282
+ /**
283
+ * Tokenization parameters for `PAYMENT_GATEWAY` tokenization, which sends the payment data to a supported third-party gateway for tokenization and processing.
284
+ * @see https://developers.google.com/pay/api/android/reference/request-objects#gateway
285
+ */
286
+ export interface GooglePayPaymentGatewayTokenizationParameters {
287
+ /**
288
+ * Additional gateway-specific tokenization parameters.
289
+ */
290
+ [key: string]: string | undefined;
291
+ /**
292
+ * Google Pay gateway identifier.
293
+ */
294
+ gateway: string;
295
+ /**
296
+ * Merchant identifier issued by your payment gateway when required.
297
+ */
298
+ gatewayMerchantId?: string;
190
299
  }
191
- export interface GooglePayTokenizationSpecification {
192
- type?: 'PAYMENT_GATEWAY' | 'DIRECT' | (string & Record<never, never>);
300
+ export interface GooglePayDirectTokenizationParameters {
301
+ /**
302
+ * Payment data cryptography protocol version.
303
+ */
304
+ protocolVersion: string;
305
+ /**
306
+ * Base64-encoded elliptic-curve public key used to encrypt the payment data.
307
+ */
308
+ publicKey: string;
309
+ }
310
+ export interface GooglePayGatewayTokenizationSpecification {
311
+ /**
312
+ * Tokenize payment data for a supported third-party gateway.
313
+ */
314
+ type: 'PAYMENT_GATEWAY';
315
+ /**
316
+ * Gateway-specific tokenization parameters.
317
+ */
318
+ parameters: GooglePayPaymentGatewayTokenizationParameters;
319
+ }
320
+ export interface GooglePayDirectTokenizationSpecification {
321
+ /**
322
+ * Tokenize payment data directly for merchant-side decryption.
323
+ */
324
+ type: 'DIRECT';
325
+ /**
326
+ * Direct tokenization parameters for payment data cryptography.
327
+ */
328
+ parameters: GooglePayDirectTokenizationParameters;
329
+ }
330
+ export interface GooglePayCustomTokenizationSpecification {
331
+ /**
332
+ * Tokenization type understood by your Google Pay integration.
333
+ */
334
+ type?: GooglePayTokenizationType;
335
+ /**
336
+ * Tokenization parameters. Google Pay expects string values.
337
+ */
193
338
  parameters?: Record<string, string>;
194
339
  }
340
+ export type GooglePayTokenizationSpecification = GooglePayGatewayTokenizationSpecification | GooglePayDirectTokenizationSpecification | GooglePayCustomTokenizationSpecification;
195
341
  export interface GooglePayAllowedPaymentMethod {
196
- type?: 'CARD' | (string & Record<never, never>);
342
+ /**
343
+ * Supported payment method type. `CARD` is the only value currently accepted by Google Pay request objects.
344
+ */
345
+ type?: GooglePayPaymentMethodType;
346
+ /**
347
+ * Parameters that control which cards can be shown and what extra data is collected.
348
+ */
197
349
  parameters?: GooglePayCardPaymentMethodParameters;
350
+ /**
351
+ * Tokenization settings for the selected payment method.
352
+ *
353
+ * In Google Pay, this is required for `PaymentDataRequest` card payment methods, but ignored by `IsReadyToPayRequest`.
354
+ * @see https://developers.google.com/pay/api/android/reference/request-objects#PaymentMethodTokenizationSpecification
355
+ */
198
356
  tokenizationSpecification?: GooglePayTokenizationSpecification;
199
357
  }
358
+ export interface GooglePaySoftwareInfo {
359
+ /**
360
+ * Identifier for the software integrating with Google Pay, such as your domain name.
361
+ */
362
+ id?: string;
363
+ /**
364
+ * Version of the integrating software.
365
+ */
366
+ version?: string;
367
+ }
200
368
  export interface GooglePayMerchantInfo {
369
+ /**
370
+ * Google merchant identifier.
371
+ *
372
+ * This is required for recognized production web integrations and may also be supplied on Android.
373
+ */
201
374
  merchantId?: string;
375
+ /**
376
+ * Merchant name displayed in the Google Pay sheet.
377
+ */
202
378
  merchantName?: string;
379
+ /**
380
+ * Optional metadata about the software integrating with Google Pay.
381
+ */
382
+ softwareInfo?: GooglePaySoftwareInfo;
383
+ }
384
+ export interface GooglePayDisplayItem {
385
+ /**
386
+ * User-visible line-item label.
387
+ */
388
+ label: string;
389
+ /**
390
+ * Category of the line item.
391
+ */
392
+ type: GooglePayDisplayItemType;
393
+ /**
394
+ * Monetary value for the item.
395
+ *
396
+ * Google Pay accepts an optional decimal precision of two decimal places.
397
+ */
398
+ price: string;
399
+ /**
400
+ * Whether this line item is final or still pending.
401
+ */
402
+ status?: GooglePayDisplayItemStatus;
403
+ }
404
+ export interface GooglePayOfferDetail {
405
+ /**
406
+ * Redemption code that identifies the offer.
407
+ */
408
+ redemptionCode: string;
409
+ /**
410
+ * User-visible description for the offer.
411
+ */
412
+ description: string;
413
+ }
414
+ export interface GooglePayOfferInfo {
415
+ /**
416
+ * Merchant-provided offers available for the current order.
417
+ */
418
+ offers: GooglePayOfferDetail[];
419
+ }
420
+ export interface GooglePaySelectionOption {
421
+ /**
422
+ * Unique identifier for the option.
423
+ */
424
+ id: string;
425
+ /**
426
+ * User-visible label for the option.
427
+ */
428
+ label: string;
429
+ /**
430
+ * Optional secondary description shown under the label.
431
+ */
432
+ description?: string;
433
+ }
434
+ export interface GooglePayShippingOptionParameters {
435
+ /**
436
+ * Available shipping options presented to the buyer.
437
+ */
438
+ shippingOptions: GooglePaySelectionOption[];
439
+ /**
440
+ * Identifier of the default selected shipping option.
441
+ */
442
+ defaultSelectedOptionId?: string;
203
443
  }
204
444
  export interface GooglePayTransactionInfo {
205
- totalPriceStatus?: GooglePayTotalPriceStatus;
206
- totalPrice?: string;
445
+ /**
446
+ * Merchant-generated correlation identifier for the transaction.
447
+ */
448
+ transactionId?: string;
449
+ /**
450
+ * ISO 4217 alphabetic currency code.
451
+ *
452
+ * Google Pay requires this for chargeable payment requests.
453
+ */
207
454
  currencyCode?: string;
455
+ /**
456
+ * ISO 3166-1 alpha-2 country code where the transaction is processed.
457
+ *
458
+ * This is required for EEA/SCA flows and recommended for country-specific behavior.
459
+ */
208
460
  countryCode?: string;
461
+ /**
462
+ * Total transaction price using an optional decimal precision of two decimal places.
463
+ */
464
+ totalPrice?: string;
465
+ /**
466
+ * Custom total label shown with `displayItems`.
467
+ */
468
+ totalPriceLabel?: string;
469
+ /**
470
+ * Status of the total price.
471
+ */
472
+ totalPriceStatus?: GooglePayTotalPriceStatus;
473
+ /**
474
+ * Optional transaction note. Some payment methods, such as UPI on web, require this.
475
+ */
476
+ transactionNote?: string;
477
+ /**
478
+ * Controls the submit button label shown in the Google Pay sheet.
479
+ */
480
+ checkoutOption?: GooglePayCheckoutOption;
481
+ /**
482
+ * Optional cart line items shown in the Google Pay sheet.
483
+ */
484
+ displayItems?: GooglePayDisplayItem[];
209
485
  }
210
486
  /**
211
- * Typed helper for the Google Pay `IsReadyToPayRequest` JSON.
212
- * The native Android implementation still accepts arbitrary JSON (forward compatible).
487
+ * Self-contained Google Pay request type based on the official request objects and DefinitelyTyped definitions.
488
+ *
489
+ * The plugin forwards the provided JSON to the native Google Pay SDK on Android, while keeping the type surface local
490
+ * so consumers do not need to install `@types/googlepay`.
213
491
  */
214
492
  export interface GooglePayIsReadyToPayRequest {
215
493
  /**
216
- * The list of payment methods you want to check for readiness.
494
+ * Google Pay API major version.
495
+ *
496
+ * Use `2` for current integrations.
497
+ */
498
+ apiVersion?: number;
499
+ /**
500
+ * Google Pay API minor version.
501
+ *
502
+ * Use `0` for current integrations.
503
+ */
504
+ apiVersionMinor?: number;
505
+ /**
506
+ * Payment methods you want to test for readiness.
217
507
  */
218
508
  allowedPaymentMethods?: GooglePayAllowedPaymentMethod[];
509
+ /**
510
+ * When `true`, Google Pay also indicates whether an existing matching payment method is present.
511
+ *
512
+ * In the `test` environment this always resolves to `true`.
513
+ */
514
+ existingPaymentMethodRequired?: boolean;
219
515
  /**
220
516
  * Forward-compatible escape hatch for additional fields supported by Google Pay.
221
517
  */
222
518
  [key: string]: unknown;
223
519
  }
224
520
  /**
225
- * Typed helper for the Google Pay `PaymentDataRequest` JSON.
226
- * The native Android implementation still accepts arbitrary JSON (forward compatible).
521
+ * Self-contained Google Pay payment request type based on the official request objects and DefinitelyTyped definitions.
522
+ *
523
+ * The plugin forwards the provided JSON to the native Google Pay SDK on Android, while keeping the type surface local
524
+ * so consumers do not need to install `@types/googlepay`.
227
525
  */
228
526
  export interface GooglePayPaymentDataRequest {
229
527
  /**
230
- * Google Pay API version, typically `2`.
528
+ * Google Pay API major version.
529
+ *
530
+ * Use `2` for current integrations.
231
531
  */
232
532
  apiVersion?: number;
233
533
  /**
234
- * Google Pay API minor version, typically `0`.
534
+ * Google Pay API minor version.
535
+ *
536
+ * Use `0` for current integrations.
235
537
  */
236
538
  apiVersionMinor?: number;
539
+ /**
540
+ * Merchant information displayed in the Google Pay sheet.
541
+ */
542
+ merchantInfo?: GooglePayMerchantInfo;
237
543
  /**
238
544
  * Allowed payment method configurations.
239
545
  */
240
546
  allowedPaymentMethods?: GooglePayAllowedPaymentMethod[];
241
547
  /**
242
- * Merchant information displayed in the Google Pay sheet.
548
+ * Transaction details such as amount, currency, and checkout behavior.
243
549
  */
244
- merchantInfo?: GooglePayMerchantInfo;
550
+ transactionInfo?: GooglePayTransactionInfo;
245
551
  /**
246
- * Transaction details (amount, currency, etc).
552
+ * Whether the buyer email address should be returned.
247
553
  */
248
- transactionInfo?: GooglePayTransactionInfo;
554
+ emailRequired?: boolean;
555
+ /**
556
+ * Whether a shipping address should be collected.
557
+ */
558
+ shippingAddressRequired?: boolean;
559
+ /**
560
+ * Shipping-address restrictions used when `shippingAddressRequired` is `true`.
561
+ */
562
+ shippingAddressParameters?: GooglePayShippingAddressParameters;
563
+ /**
564
+ * Merchant-provided offers to pre-populate in the Google Pay sheet.
565
+ *
566
+ * This is part of the official web request object and may not be supported by every native Android flow.
567
+ */
568
+ offerInfo?: GooglePayOfferInfo;
569
+ /**
570
+ * Whether the Google Pay sheet should collect a shipping option.
571
+ *
572
+ * This is part of the official web request object and is used with dynamic price updates.
573
+ */
574
+ shippingOptionRequired?: boolean;
575
+ /**
576
+ * Default shipping options for the Google Pay sheet.
577
+ *
578
+ * This is part of the official web request object and is used with dynamic price updates.
579
+ */
580
+ shippingOptionParameters?: GooglePayShippingOptionParameters;
581
+ /**
582
+ * Callback intents for dynamic price updates and payment authorization on the web.
583
+ *
584
+ * These values are included for completeness with the official Google Pay request object, but the Capacitor plugin
585
+ * does not currently expose the corresponding web callbacks.
586
+ */
587
+ callbackIntents?: GooglePayCallbackIntent[];
249
588
  /**
250
589
  * Forward-compatible escape hatch for additional fields supported by Google Pay.
251
590
  */
252
591
  [key: string]: unknown;
253
592
  }
593
+ export interface GooglePayAddress {
594
+ /**
595
+ * Recipient or cardholder name.
596
+ */
597
+ name?: string;
598
+ /**
599
+ * First address line.
600
+ */
601
+ address1?: string;
602
+ /**
603
+ * Second address line.
604
+ */
605
+ address2?: string;
606
+ /**
607
+ * Third address line.
608
+ */
609
+ address3?: string;
610
+ /**
611
+ * City or locality.
612
+ */
613
+ locality?: string;
614
+ /**
615
+ * State, province, or other administrative area.
616
+ */
617
+ administrativeArea?: string;
618
+ /**
619
+ * Two-letter ISO 3166-1 alpha-2 country code.
620
+ */
621
+ countryCode: string;
622
+ /**
623
+ * Postal or ZIP code.
624
+ */
625
+ postalCode: string;
626
+ /**
627
+ * Sorting code used in some countries.
628
+ */
629
+ sortingCode?: string;
630
+ /**
631
+ * Phone number returned when it was requested.
632
+ */
633
+ phoneNumber?: string;
634
+ /**
635
+ * ISO 3166-2 code for the administrative area when `FULL-ISO3166` formatting is used.
636
+ */
637
+ iso3166AdministrativeArea?: string;
638
+ }
639
+ export interface GooglePayAssuranceDetails {
640
+ /**
641
+ * Whether Google verified account possession for the selected card.
642
+ */
643
+ accountVerified?: boolean;
644
+ /**
645
+ * Whether cardholder authentication or ID&V was completed for the selected card.
646
+ */
647
+ cardHolderAuthenticated?: boolean;
648
+ }
649
+ export interface GooglePayCardInfo {
650
+ /**
651
+ * Optional assurance details returned when `assuranceDetailsRequired` was requested.
652
+ */
653
+ assuranceDetails?: GooglePayAssuranceDetails;
654
+ /**
655
+ * Card network for the selected payment method.
656
+ */
657
+ cardNetwork: GooglePayCardNetwork;
658
+ /**
659
+ * Card details, typically the last four digits.
660
+ */
661
+ cardDetails: string;
662
+ /**
663
+ * Billing address returned when `billingAddressRequired` was requested.
664
+ */
665
+ billingAddress?: GooglePayAddress;
666
+ /**
667
+ * Funding source for the selected card when available.
668
+ */
669
+ cardFundingSource?: GooglePayCardFundingSource;
670
+ }
671
+ export interface GooglePayPaymentMethodTokenizationData {
672
+ /**
673
+ * Tokenization type used for the selected payment method.
674
+ */
675
+ type: GooglePayTokenizationType;
676
+ /**
677
+ * Serialized payment token or gateway payload.
678
+ */
679
+ token: string;
680
+ }
681
+ export interface GooglePayPaymentMethodData {
682
+ /**
683
+ * Payment method type returned by Google Pay.
684
+ */
685
+ type: GooglePayPaymentMethodType;
686
+ /**
687
+ * Additional information about the selected card.
688
+ */
689
+ info?: GooglePayCardInfo;
690
+ /**
691
+ * User-facing description of the selected funding source.
692
+ */
693
+ description?: string;
694
+ /**
695
+ * Tokenized payment data you send to your backend or processor.
696
+ */
697
+ tokenizationData: GooglePayPaymentMethodTokenizationData;
698
+ }
699
+ export interface GooglePayOfferData {
700
+ /**
701
+ * Offer redemption codes applied by the buyer.
702
+ */
703
+ redemptionCodes: string[];
704
+ }
705
+ export interface GooglePaySelectionOptionData {
706
+ /**
707
+ * Identifier of the selected option.
708
+ */
709
+ id: string;
710
+ }
711
+ export interface GooglePayIsReadyToPayResponse {
712
+ /**
713
+ * Whether Google Pay is available for at least one of the requested payment methods.
714
+ */
715
+ result: boolean;
716
+ /**
717
+ * Whether the current user already has one of the requested payment methods available.
718
+ *
719
+ * This is only returned by Google Pay web integrations when `existingPaymentMethodRequired` is `true`.
720
+ */
721
+ paymentMethodPresent?: boolean;
722
+ }
723
+ export interface GooglePayPaymentData {
724
+ /**
725
+ * Google Pay API major version returned in the response.
726
+ */
727
+ apiVersion: number;
728
+ /**
729
+ * Google Pay API minor version returned in the response.
730
+ */
731
+ apiVersionMinor: number;
732
+ /**
733
+ * Buyer email address when `emailRequired` was requested.
734
+ */
735
+ email?: string;
736
+ /**
737
+ * Shipping address when `shippingAddressRequired` was requested.
738
+ */
739
+ shippingAddress?: GooglePayAddress;
740
+ /**
741
+ * Selected payment method details and tokenized payload.
742
+ */
743
+ paymentMethodData: GooglePayPaymentMethodData;
744
+ /**
745
+ * Offer redemption data when an offer was applied.
746
+ */
747
+ offerData?: GooglePayOfferData;
748
+ /**
749
+ * Selected shipping option data when shipping options were used.
750
+ */
751
+ shippingOptionData?: GooglePaySelectionOptionData;
752
+ }
254
753
  export interface GooglePayAvailabilityOptions {
255
754
  /**
256
755
  * Environment used to construct the Google Payments client. Defaults to `'test'`.
@@ -259,14 +758,22 @@ export interface GooglePayAvailabilityOptions {
259
758
  /**
260
759
  * Raw `IsReadyToPayRequest` JSON as defined by the Google Pay API.
261
760
  * Supply the card networks and auth methods you intend to support at runtime.
761
+ *
762
+ * @see https://developers.google.com/pay/api/android/reference/request-objects#IsReadyToPayRequest
262
763
  */
263
764
  isReadyToPayRequest?: GooglePayIsReadyToPayRequest;
264
765
  }
265
766
  export interface GooglePayAvailabilityResult {
266
767
  /**
267
- * Indicates whether the Google Pay API is available for the supplied parameters.
768
+ * Whether the user is able to provide payment information through the Google Pay payment sheet.
268
769
  */
269
770
  isReady: boolean;
771
+ /**
772
+ * The current user's ability to pay with one or more of the payment methods specified in `IsReadyToPayRequest.allowedPaymentMethods`.
773
+ *
774
+ * This property only exists if `IsReadyToPayRequest.existingPaymentMethodRequired` was set to `true`. The property value will always be `true` if the request is configured for a test environment.
775
+ */
776
+ paymentMethodPresent: boolean | undefined;
270
777
  }
271
778
  export interface GooglePayPaymentOptions {
272
779
  /**
@@ -276,14 +783,18 @@ export interface GooglePayPaymentOptions {
276
783
  /**
277
784
  * Raw `PaymentDataRequest` JSON as defined by the Google Pay API.
278
785
  * Provide transaction details, merchant info, and tokenization parameters.
786
+ *
787
+ * @see https://developers.google.com/pay/api/android/reference/request-objects#PaymentDataRequest
279
788
  */
280
789
  paymentDataRequest: GooglePayPaymentDataRequest;
281
790
  }
282
791
  export interface GooglePayPaymentResult {
283
792
  /**
284
793
  * Payment data returned by Google Pay.
794
+ *
795
+ * @see https://developers.google.com/pay/api/android/reference/response-objects#PaymentData
285
796
  */
286
- paymentData: Record<string, unknown>;
797
+ paymentData: GooglePayPaymentData;
287
798
  }
288
799
  export interface PayAvailabilityOptions {
289
800
  apple?: ApplePayAvailabilityOptions;
@@ -299,11 +810,27 @@ export interface PayPaymentOptions {
299
810
  apple?: ApplePayPaymentOptions;
300
811
  google?: GooglePayPaymentOptions;
301
812
  }
302
- export interface PayPaymentResult {
303
- platform: Exclude<PayPlatform, 'web'>;
304
- apple?: ApplePayPaymentResult;
305
- google?: GooglePayPaymentResult;
813
+ export interface ApplePayRequestPaymentResult {
814
+ /**
815
+ * Platform that resolved the payment request.
816
+ */
817
+ platform: 'ios';
818
+ /**
819
+ * Apple Pay payment payload.
820
+ */
821
+ apple: ApplePayPaymentResult;
822
+ }
823
+ export interface GooglePayRequestPaymentResult {
824
+ /**
825
+ * Platform that resolved the payment request.
826
+ */
827
+ platform: 'android';
828
+ /**
829
+ * Google Pay payment payload.
830
+ */
831
+ google: GooglePayPaymentResult;
306
832
  }
833
+ export type PayPaymentResult = ApplePayRequestPaymentResult | GooglePayRequestPaymentResult;
307
834
  export interface PayPlugin {
308
835
  /**
309
836
  * Checks whether native pay is available on the current platform.
@@ -313,6 +840,8 @@ export interface PayPlugin {
313
840
  /**
314
841
  * Presents the native pay sheet for the current platform.
315
842
  * Provide the Apple Pay configuration on iOS and the Google Pay configuration on Android.
843
+ *
844
+ * This promise is the completion path on both platforms.
316
845
  */
317
846
  requestPayment(options: PayPaymentOptions): Promise<PayPaymentResult>;
318
847
  /**