3.9.4 • Published 2 years ago

@pushmarket/stripe v3.9.4

Weekly downloads
-
License
MIT
Repository
github
Last release
2 years ago

Maintainers

MaintainerGitHubSocialSponsoring Company
Hidetaka Okamotohideokamoto@hide__dev
Ibby Hadeedihadeed
Masahiko Sakakibarardlabo@rdlaboRELATION DESIGN LABO, GENERAL INC. ASSOCIATION

Contributors ✨

Made with contributors-img.

How to use

Learn at the official @capacitor-community/stripe documentation.

日本語版をご利用の際は ja.stripe.capacitorjs.jp をご確認ください。

Demo

Screenshots

AndroidiOSWeb
PaymentSheetnpm.ionpm.ionpm.io
PaymentFlownpm.ionpm.ionpm.io
ApplePayNot supportednpm.iobeta.
GooglePaynpm.ioNot supportednpm.io

API

This is for @capacitor/docgen only. Not use in product.

isApplePayAvailable()

isApplePayAvailable() => Promise<void>

createApplePay(...)

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

presentApplePay()

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

Returns: Promise<{ paymentResult: ApplePayResultInterface; }>


addListener(ApplePayEventsEnum.Loaded, ...)

addListener(eventName: ApplePayEventsEnum.Loaded, listenerFunc: () => void) => PluginListenerHandle
ParamType
eventNameApplePayEventsEnum.Loaded
listenerFunc() => void

Returns: PluginListenerHandle


addListener(ApplePayEventsEnum.FailedToLoad, ...)

addListener(eventName: ApplePayEventsEnum.FailedToLoad, listenerFunc: () => void) => PluginListenerHandle
ParamType
eventNameApplePayEventsEnum.FailedToLoad
listenerFunc() => void

Returns: PluginListenerHandle


addListener(ApplePayEventsEnum.FailedToLoad, ...)

addListener(eventName: ApplePayEventsEnum.FailedToLoad, listenerFunc: () => void) => PluginListenerHandle
ParamType
eventNameApplePayEventsEnum.FailedToLoad
listenerFunc() => void

Returns: PluginListenerHandle


addListener(ApplePayEventsEnum.Completed, ...)

addListener(eventName: ApplePayEventsEnum.Completed, listenerFunc: () => void) => PluginListenerHandle
ParamType
eventNameApplePayEventsEnum.Completed
listenerFunc() => void

Returns: PluginListenerHandle


addListener(ApplePayEventsEnum.Canceled, ...)

addListener(eventName: ApplePayEventsEnum.Canceled, listenerFunc: () => void) => PluginListenerHandle
ParamType
eventNameApplePayEventsEnum.Canceled
listenerFunc() => void

Returns: PluginListenerHandle


addListener(ApplePayEventsEnum.Failed, ...)

addListener(eventName: ApplePayEventsEnum.Failed, listenerFunc: () => void) => PluginListenerHandle
ParamType
eventNameApplePayEventsEnum.Failed
listenerFunc() => void

Returns: PluginListenerHandle


isGooglePayAvailable()

isGooglePayAvailable() => Promise<void>

createGooglePay(...)

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

presentGooglePay()

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

Returns: Promise<{ paymentResult: GooglePayResultInterface; }>


addListener(GooglePayEventsEnum.Loaded, ...)

addListener(eventName: GooglePayEventsEnum.Loaded, listenerFunc: () => void) => PluginListenerHandle
ParamType
eventNameGooglePayEventsEnum.Loaded
listenerFunc() => void

Returns: PluginListenerHandle


addListener(GooglePayEventsEnum.FailedToLoad, ...)

addListener(eventName: GooglePayEventsEnum.FailedToLoad, listenerFunc: () => void) => PluginListenerHandle
ParamType
eventNameGooglePayEventsEnum.FailedToLoad
listenerFunc() => void

Returns: PluginListenerHandle


addListener(GooglePayEventsEnum.FailedToLoad, ...)

addListener(eventName: GooglePayEventsEnum.FailedToLoad, listenerFunc: () => void) => PluginListenerHandle
ParamType
eventNameGooglePayEventsEnum.FailedToLoad
listenerFunc() => void

Returns: PluginListenerHandle


addListener(GooglePayEventsEnum.Completed, ...)

addListener(eventName: GooglePayEventsEnum.Completed, listenerFunc: () => void) => PluginListenerHandle
ParamType
eventNameGooglePayEventsEnum.Completed
listenerFunc() => void

Returns: PluginListenerHandle


addListener(GooglePayEventsEnum.Canceled, ...)

addListener(eventName: GooglePayEventsEnum.Canceled, listenerFunc: () => void) => PluginListenerHandle
ParamType
eventNameGooglePayEventsEnum.Canceled
listenerFunc() => void

Returns: PluginListenerHandle


addListener(GooglePayEventsEnum.Failed, ...)

addListener(eventName: GooglePayEventsEnum.Failed, listenerFunc: () => void) => PluginListenerHandle
ParamType
eventNameGooglePayEventsEnum.Failed
listenerFunc() => void

Returns: PluginListenerHandle


createPaymentFlow(...)

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

presentPaymentFlow()

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

Returns: Promise<{ cardNumber: string; }>


confirmPaymentFlow()

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

Returns: Promise<{ paymentResult: PaymentFlowResultInterface; }>


addListener(PaymentFlowEventsEnum.Loaded, ...)

addListener(eventName: PaymentFlowEventsEnum.Loaded, listenerFunc: () => void) => PluginListenerHandle
ParamType
eventNamePaymentFlowEventsEnum.Loaded
listenerFunc() => void

Returns: PluginListenerHandle


addListener(PaymentFlowEventsEnum.FailedToLoad, ...)

addListener(eventName: PaymentFlowEventsEnum.FailedToLoad, listenerFunc: () => void) => PluginListenerHandle
ParamType
eventNamePaymentFlowEventsEnum.FailedToLoad
listenerFunc() => void

Returns: PluginListenerHandle


addListener(PaymentFlowEventsEnum.Opened, ...)

addListener(eventName: PaymentFlowEventsEnum.Opened, listenerFunc: () => void) => PluginListenerHandle
ParamType
eventNamePaymentFlowEventsEnum.Opened
listenerFunc() => void

Returns: PluginListenerHandle


addListener(PaymentFlowEventsEnum.FailedToLoad, ...)

addListener(eventName: PaymentFlowEventsEnum.FailedToLoad, listenerFunc: () => void) => PluginListenerHandle
ParamType
eventNamePaymentFlowEventsEnum.FailedToLoad
listenerFunc() => void

Returns: PluginListenerHandle


addListener(PaymentFlowEventsEnum.Completed, ...)

addListener(eventName: PaymentFlowEventsEnum.Completed, listenerFunc: () => void) => PluginListenerHandle
ParamType
eventNamePaymentFlowEventsEnum.Completed
listenerFunc() => void

Returns: PluginListenerHandle


addListener(PaymentFlowEventsEnum.Canceled, ...)

addListener(eventName: PaymentFlowEventsEnum.Canceled, listenerFunc: () => void) => PluginListenerHandle
ParamType
eventNamePaymentFlowEventsEnum.Canceled
listenerFunc() => void

Returns: PluginListenerHandle


addListener(PaymentFlowEventsEnum.Failed, ...)

addListener(eventName: PaymentFlowEventsEnum.Failed, listenerFunc: () => void) => PluginListenerHandle
ParamType
eventNamePaymentFlowEventsEnum.Failed
listenerFunc() => void

Returns: PluginListenerHandle


addListener(PaymentFlowEventsEnum.Created, ...)

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

Returns: PluginListenerHandle


createPaymentSheet(...)

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

presentPaymentSheet()

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

Returns: Promise<{ paymentResult: PaymentSheetResultInterface; }>


addListener(PaymentSheetEventsEnum.Loaded, ...)

addListener(eventName: PaymentSheetEventsEnum.Loaded, listenerFunc: () => void) => PluginListenerHandle
ParamType
eventNamePaymentSheetEventsEnum.Loaded
listenerFunc() => void

Returns: PluginListenerHandle


addListener(PaymentSheetEventsEnum.FailedToLoad, ...)

addListener(eventName: PaymentSheetEventsEnum.FailedToLoad, listenerFunc: () => void) => PluginListenerHandle
ParamType
eventNamePaymentSheetEventsEnum.FailedToLoad
listenerFunc() => void

Returns: PluginListenerHandle


addListener(PaymentSheetEventsEnum.Completed, ...)

addListener(eventName: PaymentSheetEventsEnum.Completed, listenerFunc: () => void) => PluginListenerHandle
ParamType
eventNamePaymentSheetEventsEnum.Completed
listenerFunc() => void

Returns: PluginListenerHandle


addListener(PaymentSheetEventsEnum.Canceled, ...)

addListener(eventName: PaymentSheetEventsEnum.Canceled, listenerFunc: () => void) => PluginListenerHandle
ParamType
eventNamePaymentSheetEventsEnum.Canceled
listenerFunc() => void

Returns: PluginListenerHandle


addListener(PaymentSheetEventsEnum.Failed, ...)

addListener(eventName: PaymentSheetEventsEnum.Failed, listenerFunc: () => void) => PluginListenerHandle
ParamType
eventNamePaymentSheetEventsEnum.Failed
listenerFunc() => void

Returns: PluginListenerHandle


initialize(...)

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

Interfaces

CreateApplePayOption

PropType
paymentIntentClientSecretstring
paymentSummaryItems{ label: string; amount: number; }[]
merchantIdentifierstring
countryCodestring
currencystring

PluginListenerHandle

PropType
remove() => Promise<void>

CreateGooglePayOption

PropTypeDescription
paymentIntentClientSecretstring
paymentSummaryItems{ label: string; amount: number; }[]Web only need @stripe-elements/stripe-elements > 1.1.0
merchantIdentifierstringWeb only need @stripe-elements/stripe-elements > 1.1.0
countryCodestringWeb only need @stripe-elements/stripe-elements > 1.1.0
currencystringWeb only need @stripe-elements/stripe-elements > 1.1.0

CreatePaymentFlowOption

PropTypeDescriptionDefault
paymentIntentClientSecretstringAny documentation call 'paymentIntent' Set paymentIntentClientSecret or setupIntentClientSecret
setupIntentClientSecretstringAny documentation call 'paymentIntent' Set paymentIntentClientSecret or setupIntentClientSecret
customerEphemeralKeySecretstringAny documentation call 'ephemeralKey'
customerIdstringAny documentation call 'customer'
enableApplePaybooleanIf you set payment method ApplePay, this set truefalse
applePayMerchantIdstringIf set enableApplePay false, Plugin ignore here.
enableGooglePaybooleanIf you set payment method GooglePay, this set truefalse
GooglePayIsTestingbooleanfalse,
countryCodestringuse ApplePay and GooglePay. If set enableApplePay and enableGooglePay false, Plugin ignore here."US"
merchantDisplayNamestring"App Name"
style'alwaysLight' | 'alwaysDark'iOS Onlyundefined
withZipCodebooleanPlatform: Web only Show ZIP code field.true

CreatePaymentSheetOption

PropTypeDescriptionDefault
paymentIntentClientSecretstringAny documentation call 'paymentIntent' Set paymentIntentClientSecret or setupIntentClientSecret
setupIntentClientSecretstringAny documentation call 'paymentIntent' Set paymentIntentClientSecret or setupIntentClientSecret
customerEphemeralKeySecretstringAny documentation call 'ephemeralKey'
customerIdstringAny documentation call 'customer'
enableApplePaybooleanIf you set payment method ApplePay, this set truefalse
applePayMerchantIdstringIf set enableApplePay false, Plugin ignore here.
enableGooglePaybooleanIf you set payment method GooglePay, this set truefalse
GooglePayIsTestingbooleanfalse,
countryCodestringuse ApplePay and GooglePay. If set enableApplePay and enableGooglePay false, Plugin ignore here."US"
merchantDisplayNamestring"App Name"
style'alwaysLight' | 'alwaysDark'iOS Onlyundefined
withZipCodebooleanPlatform: Web only Show ZIP code field.true

StripeInitializationOptions

PropTypeDescription
publishableKeystring
stripeAccountstringOptional. Making API calls for connected accounts

StripePlugin

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

CapacitorStripeContext

PropType
stripeStripePlugin
isApplePayAvailableboolean
isGooglePayAvailableboolean

Type Aliases

ApplePayResultInterface

ApplePayEventsEnum.Completed | ApplePayEventsEnum.Canceled | ApplePayEventsEnum.Failed

GooglePayResultInterface

GooglePayEventsEnum.Completed | GooglePayEventsEnum.Canceled | GooglePayEventsEnum.Failed

PaymentFlowResultInterface

PaymentFlowEventsEnum.Completed | PaymentFlowEventsEnum.Canceled | PaymentFlowEventsEnum.Failed

PaymentSheetResultInterface

PaymentSheetEventsEnum.Completed | PaymentSheetEventsEnum.Canceled | PaymentSheetEventsEnum.Failed

Enums

ApplePayEventsEnum

MembersValue
Loaded"applePayLoaded"
FailedToLoad"applePayFailedToLoad"
Completed"applePayCompleted"
Canceled"applePayCanceled"
Failed"applePayFailed"

GooglePayEventsEnum

MembersValue
Loaded"googlePayLoaded"
FailedToLoad"googlePayFailedToLoad"
Completed"googlePayCompleted"
Canceled"googlePayCanceled"
Failed"googlePayFailed"

PaymentFlowEventsEnum

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

PaymentSheetEventsEnum

MembersValue
Loaded"paymentSheetLoaded"
FailedToLoad"paymentSheetFailedToLoad"
Completed"paymentSheetCompleted"
Canceled"paymentSheetCanceled"
Failed"paymentSheetFailed"

License

@capacitor-community/stripe is MIT licensed.