6.2.1 • Published 11 months ago

@capacitor-community/stripe v6.2.1

Weekly downloads
175
License
MIT
Repository
github
Last release
11 months ago

@capacitor-community/stripe

Stripe Identity SDK bindings for Capacitor Applications

Install

npm install @capacitor-community/stripe
npx cap sync

How to use

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

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

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) => Promise<PluginListenerHandle>
ParamType
eventNameApplePayEventsEnum.Loaded
listenerFunc() => void

Returns: Promise<PluginListenerHandle>


addListener(ApplePayEventsEnum.FailedToLoad, ...)

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

Returns: Promise<PluginListenerHandle>


addListener(ApplePayEventsEnum.Completed, ...)

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

Returns: Promise<PluginListenerHandle>


addListener(ApplePayEventsEnum.Canceled, ...)

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

Returns: Promise<PluginListenerHandle>


addListener(ApplePayEventsEnum.Failed, ...)

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

Returns: Promise<PluginListenerHandle>


addListener(ApplePayEventsEnum.DidSelectShippingContact, ...)

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

Returns: Promise<PluginListenerHandle>


addListener(ApplePayEventsEnum.DidCreatePaymentMethod, ...)

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

Returns: Promise<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) => Promise<PluginListenerHandle>
ParamType
eventNameGooglePayEventsEnum.Loaded
listenerFunc() => void

Returns: Promise<PluginListenerHandle>


addListener(GooglePayEventsEnum.FailedToLoad, ...)

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

Returns: Promise<PluginListenerHandle>


addListener(GooglePayEventsEnum.Completed, ...)

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

Returns: Promise<PluginListenerHandle>


addListener(GooglePayEventsEnum.Canceled, ...)

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

Returns: Promise<PluginListenerHandle>


addListener(GooglePayEventsEnum.Failed, ...)

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

Returns: Promise<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) => Promise<PluginListenerHandle>
ParamType
eventNamePaymentFlowEventsEnum.Loaded
listenerFunc() => void

Returns: Promise<PluginListenerHandle>


addListener(PaymentFlowEventsEnum.FailedToLoad, ...)

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

Returns: Promise<PluginListenerHandle>


addListener(PaymentFlowEventsEnum.Opened, ...)

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

Returns: Promise<PluginListenerHandle>


addListener(PaymentFlowEventsEnum.Completed, ...)

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

Returns: Promise<PluginListenerHandle>


addListener(PaymentFlowEventsEnum.Canceled, ...)

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

Returns: Promise<PluginListenerHandle>


addListener(PaymentFlowEventsEnum.Failed, ...)

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

Returns: Promise<PluginListenerHandle>


addListener(PaymentFlowEventsEnum.Created, ...)

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

Returns: Promise<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) => Promise<PluginListenerHandle>
ParamType
eventNamePaymentSheetEventsEnum.Loaded
listenerFunc() => void

Returns: Promise<PluginListenerHandle>


addListener(PaymentSheetEventsEnum.FailedToLoad, ...)

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

Returns: Promise<PluginListenerHandle>


addListener(PaymentSheetEventsEnum.Completed, ...)

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

Returns: Promise<PluginListenerHandle>


addListener(PaymentSheetEventsEnum.Canceled, ...)

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

Returns: Promise<PluginListenerHandle>


addListener(PaymentSheetEventsEnum.Failed, ...)

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

Returns: Promise<PluginListenerHandle>


initialize(...)

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

handleURLCallback(...)

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

iOS Only

ParamType
optsStripeURLHandlingOptions

Interfaces

CreateApplePayOption

PropType
paymentIntentClientSecretstring
paymentSummaryItems{ label: string; amount: number; }[]
merchantIdentifierstring
countryCodestring
currencystring
requiredShippingContactFields('postalAddress' | 'phoneNumber' | 'emailAddress' | 'name')[]
allowedCountriesstring[]
allowedCountriesErrorDescriptionstring

PluginListenerHandle

PropType
remove() => Promise<void>

DidSelectShippingContact

PropType
contactShippingContact

ShippingContact

PropTypeDescription
givenNamestringApple Pay only
familyNamestringApple Pay only
middleNamestringApple Pay only
namePrefixstringApple Pay only
nameSuffixstringApple Pay only
nameFormattedstringApple Pay only
phoneNumberstringApple Pay only
nicknamestringApple Pay only
streetstringApple Pay only
citystringApple Pay only
statestringApple Pay only
postalCodestringApple Pay only
countrystringApple Pay only
isoCountryCodestringApple Pay only
subAdministrativeAreastringApple Pay only
subLocalitystringApple Pay only

CreateGooglePayOption

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

CreatePaymentFlowOption

PropTypeDescriptionDefault
paymentIntentClientSecretstringAny documentation call 'paymentIntent' Set paymentIntentClientSecret or setupIntentClientSecret
setupIntentClientSecretstringAny documentation call 'paymentIntent' Set paymentIntentClientSecret or setupIntentClientSecret
billingDetailsCollectionConfigurationBillingDetailsCollectionConfigurationOptional billingDetailsCollectionConfiguration
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"
returnURLstring""
style'alwaysLight' | 'alwaysDark'iOS Onlyundefined
withZipCodebooleanPlatform: Web only Show ZIP code field.true

BillingDetailsCollectionConfiguration

PropTypeDescription
emailCollectionModeConfiguration for how billing details are collected during checkout.
nameCollectionMode
phoneCollectionMode
addressAddressCollectionMode

CreatePaymentSheetOption

PropTypeDescriptionDefault
paymentIntentClientSecretstringAny documentation call 'paymentIntent' Set paymentIntentClientSecret or setupIntentClientSecret
setupIntentClientSecretstringAny documentation call 'paymentIntent' Set paymentIntentClientSecret or setupIntentClientSecret
billingDetailsCollectionConfigurationBillingDetailsCollectionConfigurationOptional billingDetailsCollectionConfiguration
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"
returnURLstring""
style'alwaysLight' | 'alwaysDark'iOS Onlyundefined
withZipCodebooleanPlatform: Web only Show ZIP code field.true

StripeInitializationOptions

PropTypeDescription
publishableKeystring
stripeAccountstringOptional. Making API calls for connected accounts

StripeURLHandlingOptions

PropType
urlstring

StripePlugin

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

CapacitorStripeContext

PropType
stripeStripePlugin
isApplePayAvailableboolean
isGooglePayAvailableboolean

Type Aliases

ApplePayResultInterface

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

GooglePayResultInterface

GooglePayEventsEnum.Completed | GooglePayEventsEnum.Canceled | GooglePayEventsEnum.Failed

CollectionMode

Billing details collection options.

'automatic' | 'always'

AddressCollectionMode

Billing details collection options.

'automatic' | 'full'

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"
DidSelectShippingContact"applePayDidSelectShippingContact"
DidCreatePaymentMethod"applePayDidCreatePaymentMethod"

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.

6.1.0

11 months ago

6.2.1

11 months ago

6.2.0

11 months ago

6.0.2

12 months ago

6.0.1

1 year ago

6.0.0

1 year ago

5.5.2

1 year ago

5.5.1

1 year ago

5.5.1-beta.0

1 year ago

5.5.0

1 year ago

6.0.0-2

1 year ago

5.4.6

1 year ago

5.4.5

1 year ago

5.4.4

1 year ago

5.4.3

1 year ago

5.4.3-1

1 year ago

5.4.3-0

1 year ago

6.0.0-1

1 year ago

6.0.0-0

1 year ago

5.3.0

2 years ago

5.1.0

2 years ago

5.4.2

2 years ago

5.4.1

2 years ago

5.4.0

2 years ago

5.0.4

2 years ago

5.0.3

2 years ago

5.2.0

2 years ago

5.0.2

2 years ago

5.0.1

2 years ago

4.2.2

2 years ago

4.2.1

2 years ago

4.2.0

2 years ago

4.1.2-0

2 years ago

4.1.2-1

2 years ago

4.1.2

2 years ago

4.1.1

2 years ago

4.1.0

3 years ago

4.1.0-0

3 years ago

4.0.0

3 years ago

3.9.1-0

3 years ago

3.9.1

3 years ago

3.9.0

3 years ago

3.8.0

3 years ago

4.0.0-0

3 years ago

3.8.2

3 years ago

3.8.0-0

3 years ago

3.8.1

3 years ago

3.8.0-1

3 years ago

4.0.0-3

3 years ago

3.8.2-0

3 years ago

4.0.0-1

3 years ago

4.0.0-2

3 years ago

3.7.2

3 years ago

3.7.1

3 years ago

3.7.0

3 years ago

3.6.0

3 years ago

3.6.0-0

3 years ago

3.5.3

3 years ago

3.5.2

3 years ago

3.5.1

3 years ago

3.4.2

4 years ago

3.5.0

3 years ago

3.4.1

4 years ago

3.4.0

4 years ago

3.2.0-1

4 years ago

3.2.0-0

4 years ago

3.2.0-3

4 years ago

3.2.0-2

4 years ago

3.3.0

4 years ago

3.2.0

4 years ago

3.2.0-5

4 years ago

3.2.0-4

4 years ago

3.2.0-6

4 years ago

3.1.3

4 years ago

3.1.2

4 years ago

3.1.1

4 years ago

3.1.4

4 years ago

3.1.0

4 years ago

3.0.3

4 years ago

3.0.2

4 years ago

3.0.1

4 years ago

3.0.0-3

4 years ago

3.0.0-2

4 years ago

3.0.0

4 years ago

3.0.0-1

4 years ago

3.0.0-0

4 years ago

1.1.0

5 years ago

1.0.4

5 years ago

1.0.3

5 years ago