GitHub

API

Reference generated from the public API metadata for @capacitor-community/stripe v8.2.0. Platform limits, inherited option fields, result listener lifecycle, and server responsibilities are documented on the method pages.

Methods

method initialize(...)

initialize(opts: StripeInitializationOptions) => Promise<void>

method handleURLCallback(...)

iOS Only
handleURLCallback(opts: StripeURLHandlingOptions) => Promise<void>

method isApplePayAvailable()

isApplePayAvailable() => Promise<void>

method createApplePay(...)

createApplePay(options: CreateApplePayOption) => Promise<void>

method presentApplePay()

presentApplePay() => Promise<{ paymentResult: ApplePayResultInterface; }>

method updateApplePaySheet(...)

updateApplePaySheet(options: { updateId: string; paymentSummaryItems: PaymentSummaryItem[]; }) => Promise<void>

method isGooglePayAvailable()

isGooglePayAvailable() => Promise<void>

method createGooglePay(...)

createGooglePay(options: CreateGooglePayOption) => Promise<void>

method presentGooglePay()

presentGooglePay() => Promise<{ paymentResult: GooglePayResultInterface; }>

method createPaymentFlow(...)

createPaymentFlow(options: CreatePaymentFlowOption) => Promise<void>

method presentPaymentFlow()

presentPaymentFlow() => Promise<{ cardNumber: string; }>

method confirmPaymentFlow()

confirmPaymentFlow() => Promise<{ paymentResult: PaymentFlowResultInterface; }>

method createPaymentSheet(...)

createPaymentSheet(options: CreatePaymentSheetOption) => Promise<void>

method presentPaymentSheet()

presentPaymentSheet() => Promise<{ paymentResult: PaymentSheetResultInterface; }>

method addListener(ApplePayEventsEnum.Loaded, ...)

addListener(eventName: ApplePayEventsEnum.Loaded, listenerFunc: () => void) => Promise<PluginListenerHandle>

method addListener(ApplePayEventsEnum.FailedToLoad, ...)

addListener(eventName: ApplePayEventsEnum.FailedToLoad, listenerFunc: (error: string) => void) => Promise<PluginListenerHandle>

method addListener(ApplePayEventsEnum.Completed, ...)

addListener(eventName: ApplePayEventsEnum.Completed, listenerFunc: () => void) => Promise<PluginListenerHandle>

method addListener(ApplePayEventsEnum.Canceled, ...)

addListener(eventName: ApplePayEventsEnum.Canceled, listenerFunc: () => void) => Promise<PluginListenerHandle>

method addListener(ApplePayEventsEnum.Failed, ...)

addListener(eventName: ApplePayEventsEnum.Failed, listenerFunc: (error: string) => void) => Promise<PluginListenerHandle>

method addListener(ApplePayEventsEnum.DidSelectShippingContact, ...)

addListener(eventName: ApplePayEventsEnum.DidSelectShippingContact, listenerFunc: (data: DidSelectShippingContact) => void) => Promise<PluginListenerHandle>

method addListener(ApplePayEventsEnum.DidCreatePaymentMethod, ...)

addListener(eventName: ApplePayEventsEnum.DidCreatePaymentMethod, listenerFunc: (data: DidCreatePaymentMethod) => void) => Promise<PluginListenerHandle>

method addListener(GooglePayEventsEnum.Loaded, ...)

addListener(eventName: GooglePayEventsEnum.Loaded, listenerFunc: () => void) => Promise<PluginListenerHandle>

method addListener(GooglePayEventsEnum.FailedToLoad, ...)

addListener(eventName: GooglePayEventsEnum.FailedToLoad, listenerFunc: (error: string) => void) => Promise<PluginListenerHandle>

method addListener(GooglePayEventsEnum.Completed, ...)

addListener(eventName: GooglePayEventsEnum.Completed, listenerFunc: () => void) => Promise<PluginListenerHandle>

method addListener(GooglePayEventsEnum.Canceled, ...)

addListener(eventName: GooglePayEventsEnum.Canceled, listenerFunc: () => void) => Promise<PluginListenerHandle>

method addListener(GooglePayEventsEnum.Failed, ...)

addListener(eventName: GooglePayEventsEnum.Failed, listenerFunc: () => void) => Promise<PluginListenerHandle>

method addListener(PaymentFlowEventsEnum.Loaded, ...)

addListener(eventName: PaymentFlowEventsEnum.Loaded, listenerFunc: () => void) => Promise<PluginListenerHandle>

method addListener(PaymentFlowEventsEnum.FailedToLoad, ...)

addListener(eventName: PaymentFlowEventsEnum.FailedToLoad, listenerFunc: (error: string) => void) => Promise<PluginListenerHandle>

method addListener(PaymentFlowEventsEnum.Opened, ...)

addListener(eventName: PaymentFlowEventsEnum.Opened, listenerFunc: () => void) => Promise<PluginListenerHandle>

method addListener(PaymentFlowEventsEnum.Completed, ...)

addListener(eventName: PaymentFlowEventsEnum.Completed, listenerFunc: () => void) => Promise<PluginListenerHandle>

method addListener(PaymentFlowEventsEnum.Canceled, ...)

addListener(eventName: PaymentFlowEventsEnum.Canceled, listenerFunc: () => void) => Promise<PluginListenerHandle>

method addListener(PaymentFlowEventsEnum.Failed, ...)

addListener(eventName: PaymentFlowEventsEnum.Failed, listenerFunc: (error: string) => void) => Promise<PluginListenerHandle>

method addListener(PaymentFlowEventsEnum.Created, ...)

addListener(eventName: PaymentFlowEventsEnum.Created, listenerFunc: (info: { cardNumber: string; }) => void) => Promise<PluginListenerHandle>

method addListener(PaymentSheetEventsEnum.Loaded, ...)

addListener(eventName: PaymentSheetEventsEnum.Loaded, listenerFunc: () => void) => Promise<PluginListenerHandle>

method addListener(PaymentSheetEventsEnum.FailedToLoad, ...)

addListener(eventName: PaymentSheetEventsEnum.FailedToLoad, listenerFunc: (error: string) => void) => Promise<PluginListenerHandle>

method addListener(PaymentSheetEventsEnum.Completed, ...)

addListener(eventName: PaymentSheetEventsEnum.Completed, listenerFunc: () => void) => Promise<PluginListenerHandle>

method addListener(PaymentSheetEventsEnum.Canceled, ...)

addListener(eventName: PaymentSheetEventsEnum.Canceled, listenerFunc: () => void) => Promise<PluginListenerHandle>

method addListener(PaymentSheetEventsEnum.Failed, ...)

addListener(eventName: PaymentSheetEventsEnum.Failed, listenerFunc: (error: string) => void) => Promise<PluginListenerHandle>

Interfaces

Inherited PaymentSheet and PaymentFlow options

CreatePaymentSheetOption and CreatePaymentFlowOption extend the exported BasePaymentOption. The docgen metadata does not expand inherited fields, so they are listed here explicitly.

Property Type Platform / purpose
defaultBillingDetails DefaultBillingDetails iOS and Android
shippingDetails AddressDetails Android
billingDetailsCollectionConfiguration BillingDetailsCollectionConfiguration iOS and Android
customerEphemeralKeySecret string Use with customerId
customerId string Stripe Customer
enableApplePay boolean Native PaymentSheet
applePayMerchantId string Required when Apple Pay is enabled
enableGooglePay boolean Native PaymentSheet
GooglePayIsTesting boolean Android Google Pay test mode
countryCode string Wallet country, default US
merchantDisplayName string PaymentSheet merchant name
returnURL string iOS redirect-based authentication
paymentMethodLayout 'horizontal' | 'vertical' | 'automatic' Android
style 'alwaysLight' | 'alwaysDark' iOS
withZipCode boolean Web
currencyCode string Google Pay with native SetupIntent

These are optional fields. See PaymentSheet and PaymentFlow for combinations and web limitations.

interface StripeInitializationOptions

Prop Type Description
publishableKey string
stripeAccount string Optional. Making API calls for connected accounts

interface StripeURLHandlingOptions

Prop Type
url string

interface CreatePaymentSheetOption

Prop Type Description Default
paymentIntentClientSecret string Any documentation call 'paymentIntent' Set paymentIntentClientSecret or setupIntentClientSecret
setupIntentClientSecret string Any documentation call 'paymentIntent' Set paymentIntentClientSecret or setupIntentClientSecret
defaultBillingDetails DefaultBillingDetails Optional defaultBillingDetails This is ios/android only. not support web. https://docs.stripe.com/payments/mobile/collect-addresses?payment-ui=mobile&platform=ios#set-default-billing-details
shippingDetails AddressDetails Optional shippingDetails This is android only. ios requires an address element. https://docs.stripe.com/payments/mobile/collect-addresses?payment-ui=mobile&platform=android#prefill-addresses
billingDetailsCollectionConfiguration BillingDetailsCollectionConfiguration Optional billingDetailsCollectionConfiguration This is ios/android only. not support web. https://docs.stripe.com/payments/mobile/collect-addresses?payment-ui=mobile&platform=ios#customize-billing-details-collection
customerEphemeralKeySecret string Any documentation call 'ephemeralKey'
customerId string Any documentation call 'customer'
enableApplePay boolean If you set payment method ApplePay, this set true false
applePayMerchantId string If set enableApplePay false, Plugin ignore here.
enableGooglePay boolean If you set payment method GooglePay, this set true false
GooglePayIsTesting boolean false,
countryCode string use ApplePay and GooglePay. If set enableApplePay and enableGooglePay false, Plugin ignore here. "US"
merchantDisplayName string "App Name"
returnURL string ""
paymentMethodLayout 'automatic' | 'horizontal' | 'vertical' "automatic"
style 'alwaysLight' | 'alwaysDark' iOS Only undefined
withZipCode boolean Platform: Web only Show ZIP code field. true
currencyCode string use GooglePay. Required if enableGooglePay is true for setupIntents. "USD"

interface CreatePaymentFlowOption

Prop Type Description Default
paymentIntentClientSecret string Any documentation call 'paymentIntent' Set paymentIntentClientSecret or setupIntentClientSecret
setupIntentClientSecret string Any documentation call 'paymentIntent' Set paymentIntentClientSecret or setupIntentClientSecret
defaultBillingDetails DefaultBillingDetails Optional defaultBillingDetails This is ios/android only. not support web. https://docs.stripe.com/payments/mobile/collect-addresses?payment-ui=mobile&platform=ios#set-default-billing-details
shippingDetails AddressDetails Optional shippingDetails This is android only. ios requires an address element. https://docs.stripe.com/payments/mobile/collect-addresses?payment-ui=mobile&platform=android#prefill-addresses
billingDetailsCollectionConfiguration BillingDetailsCollectionConfiguration Optional billingDetailsCollectionConfiguration This is ios/android only. not support web. https://docs.stripe.com/payments/mobile/collect-addresses?payment-ui=mobile&platform=ios#customize-billing-details-collection
customerEphemeralKeySecret string Any documentation call 'ephemeralKey'
customerId string Any documentation call 'customer'
enableApplePay boolean If you set payment method ApplePay, this set true false
applePayMerchantId string If set enableApplePay false, Plugin ignore here.
enableGooglePay boolean If you set payment method GooglePay, this set true false
GooglePayIsTesting boolean false,
countryCode string use ApplePay and GooglePay. If set enableApplePay and enableGooglePay false, Plugin ignore here. "US"
merchantDisplayName string "App Name"
returnURL string ""
paymentMethodLayout 'automatic' | 'horizontal' | 'vertical' "automatic"
style 'alwaysLight' | 'alwaysDark' iOS Only undefined
withZipCode boolean Platform: Web only Show ZIP code field. true
currencyCode string use GooglePay. Required if enableGooglePay is true for setupIntents. "USD"

interface CreateApplePayOption

Prop Type
paymentIntentClientSecret string
paymentSummaryItems PaymentSummaryItem[]
merchantIdentifier string
countryCode string
currency string
requiredShippingContactFields ('postalAddress' | 'phoneNumber' | 'emailAddress' | 'name')[]
allowedCountries string[]
allowedCountriesErrorDescription string

interface CreateGooglePayOption

Prop Type Description
paymentIntentClientSecret string
paymentSummaryItems { label: string; amount: number; }[] Web only need stripe-pwa-elements > 1.1.0
merchantIdentifier string Web only need stripe-pwa-elements > 1.1.0
countryCode string Web only need stripe-pwa-elements > 1.1.0
currency string Web only need stripe-pwa-elements > 1.1.0

interface PaymentSummaryItem

Prop Type
label string
amount number

interface DefaultBillingDetails

Prop Type
email string
name string
phone string
address Address

interface Address

Prop Type Description
country string Two-letter country code (ISO 3166-1 alpha-2).
city string
line1 string
line2 string
postalCode string
state string

interface AddressDetails

Prop Type
name string
address Address
phone string
isCheckboxSelected boolean

interface BillingDetailsCollectionConfiguration

Prop Type Description
email CollectionMode Configuration for how billing details are collected during checkout.
name CollectionMode
phone CollectionMode
address AddressCollectionMode

interface DidSelectShippingContact

Prop Type
contact ShippingContact
updateId string

interface DidCreatePaymentMethod

Prop Type
contact ShippingContact

interface ShippingContact

Prop Type Description
givenName string Apple Pay only
familyName string Apple Pay only
middleName string Apple Pay only
namePrefix string Apple Pay only
nameSuffix string Apple Pay only
nameFormatted string Apple Pay only
phoneNumber string Apple Pay only
nickname string Apple Pay only
street string Apple Pay only
city string Apple Pay only
state string Apple Pay only
postalCode string Apple Pay only
country string Apple Pay only
isoCountryCode string Apple Pay only
subAdministrativeArea string Apple Pay only
subLocality string Apple Pay only

interface PluginListenerHandle

Prop Type
remove () =&gt; Promise&lt;void&gt;

Type aliases

type alias PaymentSheetResultInterface

PaymentSheetEventsEnum.Completed | PaymentSheetEventsEnum.Canceled | PaymentSheetEventsEnum.Failed

type alias PaymentFlowResultInterface

PaymentFlowEventsEnum.Completed | PaymentFlowEventsEnum.Canceled | PaymentFlowEventsEnum.Failed

type alias ApplePayResultInterface

ApplePayEventsEnum.Completed | ApplePayEventsEnum.Canceled | ApplePayEventsEnum.Failed | ApplePayEventsEnum.DidSelectShippingContact | ApplePayEventsEnum.DidCreatePaymentMethod

type alias GooglePayResultInterface

GooglePayEventsEnum.Completed | GooglePayEventsEnum.Canceled | GooglePayEventsEnum.Failed

type alias CollectionMode

'automatic' | 'always' | 'never'

type alias AddressCollectionMode

'automatic' | 'full' | 'never'

Enums

enum PaymentSheetEventsEnum

Member Value
Loaded "paymentSheetLoaded"
FailedToLoad "paymentSheetFailedToLoad"
Completed "paymentSheetCompleted"
Canceled "paymentSheetCanceled"
Failed "paymentSheetFailed"

enum PaymentFlowEventsEnum

Member Value
Loaded "paymentFlowLoaded"
FailedToLoad "paymentFlowFailedToLoad"
Opened "paymentFlowOpened"
Created "paymentFlowCreated"
Completed "paymentFlowCompleted"
Canceled "paymentFlowCanceled"
Failed "paymentFlowFailed"

enum ApplePayEventsEnum

Member Value
Loaded "applePayLoaded"
FailedToLoad "applePayFailedToLoad"
Completed "applePayCompleted"
Canceled "applePayCanceled"
Failed "applePayFailed"
DidSelectShippingContact "applePayDidSelectShippingContact"
DidCreatePaymentMethod "applePayDidCreatePaymentMethod"

enum GooglePayEventsEnum

Member Value
Loaded "googlePayLoaded"
FailedToLoad "googlePayFailedToLoad"
Completed "googlePayCompleted"
Canceled "googlePayCanceled"
Failed "googlePayFailed"
Edit this page on GitHub