Options
All
  • Public
  • Public/Protected
  • All
Menu

Index

Type aliases

ApplePaySheetError: { errorType: InvalidShippingAddress; field: InvalidShippingField; message?: string } | { errorType: UnserviceableShippingAddress | InvalidCouponCode | ExpiredCouponCode; message?: string }
ApplePayBaseParams: { merchantCountryCode: string; currencyCode: string; additionalEnabledNetworks?: string[]; cartItems: PlatformPay.CartSummaryItem[]; requiredShippingAddressFields?: ContactField[]; requiredBillingContactFields?: ContactField[]; shippingMethods?: PlatformPay.ShippingMethod[]; merchantCapabilities?: ApplePayMerchantCapability[]; shippingType?: ApplePayShippingType; supportedCountries?: string[] }

Type declaration

  • merchantCountryCode: string

    ISO 3166-1 alpha-2 country code where the transaction is processed.

  • currencyCode: string

    ISO 4217 alphabetic currency code.

  • Optional additionalEnabledNetworks?: string[]

    The SDK accepts Amex, Mastercard, Visa, and Discover for Apple Pay by default. Set this property to enable other card networks, for example: ["JCB", "barcode", "chinaUnionPay"]. A full list of possible networks can be found at https://developer.apple.com/documentation/passkit/pkpaymentnetwork.

  • cartItems: PlatformPay.CartSummaryItem[]

    The list of items that describe a purchase. For example: total, tax, discount, and grand total.

  • Optional requiredShippingAddressFields?: ContactField[]

    The list of fields that you need for a shipping contact in order to process the transaction. If provided, you must implement the PlatformPayButton component's onShippingContactSelected callback and call updatePlatformPaySheet from there.

  • Optional requiredBillingContactFields?: ContactField[]

    The list of fields that you need for a billing contact in order to process the transaction.

  • Optional shippingMethods?: PlatformPay.ShippingMethod[]

    An array of shipping method objects that describe the supported shipping methods. If provided, you must implement the PlatformPayButton component's onShippingMethodSelected callback and call updatePlatformPaySheet from there.

  • Optional merchantCapabilities?: ApplePayMerchantCapability[]

    Set the payment capabilities you support. If set, 3DS is required.

  • Optional shippingType?: ApplePayShippingType

    An optional value that indicates how to ship purchased items. Defaults to 'Shipping'.

  • Optional supportedCountries?: string[]

    A list of two-letter ISO 3166 country codes for limiting payment to cards from specific countries or regions.

ApplePayPaymentMethodParams: { supportsCouponCode?: boolean; couponCode?: string }

Type declaration

  • Optional supportsCouponCode?: boolean

    Set this value to true to display the coupon code field, or pass the 'couponCode' field to autofill with a coupon code. Defaults to false. If true, you must implement the PlatformPayButton component's onCouponCodeEntered callback and call updatePlatformPaySheet from there.

  • Optional couponCode?: string

    Set this value to autofill with a coupon code. If provided, you must implement the PlatformPayButton component's onCouponCodeEntered callback and call updatePlatformPaySheet from there.

GooglePayBaseParams: { testEnv: boolean; merchantCountryCode: string; currencyCode: string; merchantName?: string; isEmailRequired?: boolean; allowCreditCards?: boolean; existingPaymentMethodRequired?: boolean; billingAddressConfig?: { isRequired?: boolean; isPhoneNumberRequired?: boolean; format?: BillingAddressFormat } }

Type declaration

  • testEnv: boolean

    Set to true to run in a test environment with relaxed application / merchant requirements. This environment is suggested for early development and for easily testing SDK.

    • Does not require the application to be uploaded to the Google Play Store.
    • Does not require a Google Pay Developer Profile.
    • It uses production data, but at the end of the transaction you will receive a fake and non chargeable payment credential.
    • The user will see a warning message that the app is not recognized/verified.
  • merchantCountryCode: string

    ISO 3166-1 alpha-2 country code where the transaction is processed.

  • currencyCode: string

    ISO 4217 alphabetic currency code.

  • Optional merchantName?: string

    Your merchant name, displayed in the Google Pay sheet.

  • Optional isEmailRequired?: boolean

    Set to true to request an email address. Defaults to false.

  • Optional allowCreditCards?: boolean

    Set to false if you don't support credit cards. Defaults to true.

  • Optional existingPaymentMethodRequired?: boolean

    If true, Google Pay is considered "available" if the customer's Google Pay wallet has an existing payment method. Defaults to false.

  • Optional billingAddressConfig?: { isRequired?: boolean; isPhoneNumberRequired?: boolean; format?: BillingAddressFormat }

    Describes the configuration for billing address collection in the Google Pay sheet.

    • Optional isRequired?: boolean

      Set to true if billing address is required for payment. Defaults to false.

    • Optional isPhoneNumberRequired?: boolean

      Set to true if phone number is required for payment. Defaults to false.

    • Optional format?: BillingAddressFormat

      Defines what address fields to collect. Defaults to BillingAddressFormat.Min

GooglePayPaymentMethodParams: { amount: number; shippingAddressConfig?: { isRequired?: boolean; isPhoneNumberRequired?: boolean; allowedCountryCodes?: string[] } }

Type declaration

  • amount: number

    Total monetary value of the transaction.

  • Optional shippingAddressConfig?: { isRequired?: boolean; isPhoneNumberRequired?: boolean; allowedCountryCodes?: string[] }

    Describes the configuration for shipping address collection in the Google Pay sheet.

    • Optional isRequired?: boolean

      Set to true if shipping address is required for payment. Defaults to false.

    • Optional isPhoneNumberRequired?: boolean

      Set to true if phone number is required for payment. Defaults to false.

    • Optional allowedCountryCodes?: string[]

      Set of ISO 3166-1 alpha-2 country code values of the countries where shipping is allowed. Defaults to all shipping address countries.

Type declaration

ConfirmParams: { googlePay?: GooglePayBaseParams; applePay?: ApplePayBaseParams }

Type declaration

iOS only.

DeferredCartSummaryItem: { paymentType: Deferred; deferredDate: number; label: string; amount: string }

iOS only. Use this type for a payment that occurs in the future, such as a pre-order. Only available on iOS 15 and up, otherwise falls back to ImmediateCartSummaryItem.

Type declaration

  • paymentType: Deferred
  • deferredDate: number

    The unix timestamp of the date, in the future, of the payment. Measured in seconds.

  • label: string
  • amount: string
ImmediateCartSummaryItem: { paymentType: Immediate; isPending?: boolean; label: string; amount: string }

iOS only. Use this type for payments that will occur immediately.

Type declaration

  • paymentType: Immediate
  • Optional isPending?: boolean

    When creating items for estimates or charges whose final value is not yet known, set this to true.

  • label: string
  • amount: string
RecurringCartSummaryItem: { paymentType: Recurring; intervalUnit: IntervalUnit; intervalCount: number; startDate?: number; endDate?: number; label: string; amount: string }

iOS only. Use this type for payments that occur more than once, such as a subscription. Only available on iOS 15 and up, otherwise falls back to ImmediateCartSummaryItem.

Type declaration

  • paymentType: Recurring
  • intervalUnit: IntervalUnit

    The amount of time – in calendar units such as Day, Month, or Year – that represents a fraction of the total payment interval. For example, if you set the intervalUnit to 'Month' and intervalCount to 3, then the payment interval is three months.

  • intervalCount: number

    The number of interval units that make up the total payment interval. For example, if you set the intervalUnit to 'Month' and intervalCount to 3, then the payment interval is three months.

  • Optional startDate?: number

    The unix timestamp of the start date. Measured in seconds.

  • Optional endDate?: number

    The unix timestamp of the end date. Measured in seconds.

  • label: string
  • amount: string
ShippingMethod: { label: string; amount: string; isPending?: boolean; identifier: string; detail?: string; startDate?: number; endDate?: number }

iOS only.

Type declaration

  • label: string

    A short, localized description.

  • amount: string

    The cost associated with this shipping option.

  • Optional isPending?: boolean

    When creating items for estimates or charges whose final value is not yet known, set this to true.

  • identifier: string

    A unique identifier for the shipping method.

  • Optional detail?: string

    A user-readable description of the shipping method. For example “Ships in 24 hours.” Don't repeat the content of the 'label' property.

  • Optional startDate?: number

    The unix timestamp of the start date of the expected range of delivery or shipping dates for a package, or the time range when an item is available for pickup. Measured in seconds.

  • Optional endDate?: number

    The unix timestamp of the end date of the expected range of delivery or shipping dates for a package, or the time range when an item is available for pickup. Measured in seconds.

ShippingContact: ApplePay.ShippingContact

iOS only.

IsGooglePaySupportedParams: IsSupportedParams

Android only.

PaymentMethodResult: { paymentMethod: PaymentMethod.Result; error?: undefined } | { paymentMethod?: undefined; error: StripeError<PlatformPayError> }
TokenResult: { token: Token.Result; error?: undefined } | { token?: undefined; error: StripeError<PlatformPayError> }
ConfirmPaymentResult: { paymentIntent: PaymentIntent.Result; error?: StripeError<PlatformPayError> } | { paymentIntent?: undefined; error: StripeError<PlatformPayError> }
ConfirmSetupIntentResult: { setupIntent: SetupIntent.Result; error?: StripeError<PlatformPayError> } | { setupIntent?: undefined; error: StripeError<PlatformPayError> }

Generated using TypeDoc