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?: 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 you include ContactField.PostalAddress in this array, 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?: 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.

Type declaration

RecurringPaymentRequest: { type: Recurring; description: string; managementUrl: string; billing: PlatformPay.RecurringCartSummaryItem; trialBilling?: PlatformPay.RecurringCartSummaryItem; billingAgreement?: string; tokenNotificationURL?: string }

Use this for a recurring payment, typically a subscription.

Type declaration

  • type: Recurring
  • description: string

    A description that you provide of the recurring payment and that Apple Pay displays to the user in the sheet.

  • managementUrl: string

    A URL to a web page where the user can update or delete the payment method for the recurring payment.

  • billing: PlatformPay.RecurringCartSummaryItem

    The regular billing cycle for the payment, including start and end dates, an interval, and an interval count.

  • Optional trialBilling?: PlatformPay.RecurringCartSummaryItem

    Same as the billing property, but use this if the purchase has a trial period.

  • Optional billingAgreement?: string

    A localized billing agreement that the sheet displays to the user before the user authorizes the payment.

  • Optional tokenNotificationURL?: string

    A URL you provide to receive life-cycle notifications from the Apple Pay servers about the Apple Pay merchant token for the recurring payment. For more information about handling merchant token life-cycle notifications, see Receiving and handling merchant token notifications.

AutomaticReloadPaymentRequest: { type: AutomaticReload; description: string; managementUrl: string; label: string; reloadAmount: string; thresholdAmount: string; billingAgreement?: string; tokenNotificationURL?: string }

Use this for an automatic reload or refill payment, such as a store card top-up.

Type declaration

  • type: AutomaticReload
  • description: string

    A description that you provide of the recurring payment and that Apple Pay displays to the user in the sheet.

  • managementUrl: string

    A URL to a web page where the user can update or delete the payment method for the recurring payment.

  • label: string

    A short, localized description of the item.

  • reloadAmount: string

    This is the amount that is automatically applied to the account when the account balance drops below the threshold amount.

  • thresholdAmount: string

    The balance an account reaches before you apply the automatic reload amount.

  • Optional billingAgreement?: string

    A localized billing agreement that the sheet displays to the user before the user authorizes the payment.

  • Optional tokenNotificationURL?: string

    A URL you provide to receive life-cycle notifications from the Apple Pay servers about the Apple Pay merchant token for the recurring payment. For more information about handling merchant token life-cycle notifications, see Receiving and handling merchant token notifications.

MultiMerchantRequest: { type: MultiMerchant; merchants: { merchantIdentifier: string; externalIdentifier: string; merchantName: string; merchantDomain?: string; amount: string }[] }

Use this to indicate payments for multiple merchants.

Type declaration

  • type: MultiMerchant
  • merchants: { merchantIdentifier: string; externalIdentifier: string; merchantName: string; merchantDomain?: string; amount: string }[]
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 }; label?: string; amount?: number }

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

  • Optional label?: string

    An optional label to display with the amount. Google Pay may or may not display this label depending on its own internal logic. Defaults to a generic label if none is provided.

  • Optional amount?: number

    An optional amount to display for setup intents. Google Pay may or may not display this amount depending on its own internal logic. Defaults to 0 if none is provided. Provide this value in the currency’s smallest unit.

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

Type declaration

  • 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 & ApplePayConfirmParams }

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.

IsGooglePaySupportedParams: { testEnv?: boolean; existingPaymentMethodRequired?: boolean }

Android only.

Type declaration

  • Optional 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. Defaults to false.

  • Optional existingPaymentMethodRequired?: boolean

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

PaymentMethodResult: { paymentMethod: PaymentMethod.Result; shippingContact?: ShippingContact; error?: undefined } | { paymentMethod?: undefined; shippingContact?: undefined; error: StripeError<PlatformPayError> }
TokenResult: { token: Token.Result; shippingContact?: ShippingContact; error?: undefined } | { token?: undefined; shippingContact?: 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