@capacitor-community/stripe
Capacitor community plugin for native Stripe.
| Maintainer | GitHub | Social | Sponsoring Company |
|---|---|---|---|
| Hidetaka Okamoto | hideokamoto | @hide__dev | |
| Ibby Hadeed | ihadeed | ||
| Masahiko Sakakibara | rdlabo | @rdlabo | RELATION DESIGN LABO, GENERAL INC. ASSOCIATION |
Made with contributors-img.
Learn at the official @capacitor-community/stripe documentation.
日本語版をご利用の際は ja.stripe.capacitorjs.jp をご確認ください。
- Demo code is here. Please check these code before ask at issues.
- Demo of Web is hosting here.
| Android | iOS | Web | |
|---|---|---|---|
| PaymentSheet | ![]() |
![]() |
![]() |
| PaymentFlow | ![]() |
![]() |
![]() |
| ApplePay | Not supported | ![]() |
beta. |
| GooglePay | ![]() |
Not supported | ![]() |
isApplePayAvailable()createApplePay(...)presentApplePay()addListener(ApplePayEventsEnum.Loaded, ...)addListener(ApplePayEventsEnum.FailedToLoad, ...)addListener(ApplePayEventsEnum.Completed, ...)addListener(ApplePayEventsEnum.Canceled, ...)addListener(ApplePayEventsEnum.Failed, ...)addListener(ApplePayEventsEnum.DidSelectShippingContact, ...)addListener(ApplePayEventsEnum.DidCreatePaymentMethod, ...)isGooglePayAvailable()createGooglePay(...)presentGooglePay()addListener(GooglePayEventsEnum.Loaded, ...)addListener(GooglePayEventsEnum.FailedToLoad, ...)addListener(GooglePayEventsEnum.Completed, ...)addListener(GooglePayEventsEnum.Canceled, ...)addListener(GooglePayEventsEnum.Failed, ...)createIdentityVerificationSheet(...)presentIdentityVerificationSheet()addListener(IdentityVerificationSheetEventsEnum.Loaded, ...)addListener(IdentityVerificationSheetEventsEnum.FailedToLoad, ...)addListener(IdentityVerificationSheetEventsEnum.Completed, ...)addListener(IdentityVerificationSheetEventsEnum.Canceled, ...)addListener(IdentityVerificationSheetEventsEnum.Failed, ...)createPaymentFlow(...)presentPaymentFlow()confirmPaymentFlow()addListener(PaymentFlowEventsEnum.Loaded, ...)addListener(PaymentFlowEventsEnum.FailedToLoad, ...)addListener(PaymentFlowEventsEnum.Opened, ...)addListener(PaymentFlowEventsEnum.Completed, ...)addListener(PaymentFlowEventsEnum.Canceled, ...)addListener(PaymentFlowEventsEnum.Failed, ...)addListener(PaymentFlowEventsEnum.Created, ...)createPaymentSheet(...)presentPaymentSheet()addListener(PaymentSheetEventsEnum.Loaded, ...)addListener(PaymentSheetEventsEnum.FailedToLoad, ...)addListener(PaymentSheetEventsEnum.Completed, ...)addListener(PaymentSheetEventsEnum.Canceled, ...)addListener(PaymentSheetEventsEnum.Failed, ...)initialize(...)handleURLCallback(...)- Interfaces
- Type Aliases
- Enums
This is for @capacitor/docgen only. Not use in product.
isApplePayAvailable() => Promise<void>createApplePay(options: CreateApplePayOption) => Promise<void>| Param | Type |
|---|---|
options |
CreateApplePayOption |
presentApplePay() => Promise<{ paymentResult: ApplePayResultInterface; }>Returns: Promise<{ paymentResult: ApplePayResultInterface; }>
addListener(eventName: ApplePayEventsEnum.Loaded, listenerFunc: () => void) => PluginListenerHandle| Param | Type |
|---|---|
eventName |
ApplePayEventsEnum.Loaded |
listenerFunc |
() => void |
Returns: PluginListenerHandle
addListener(eventName: ApplePayEventsEnum.FailedToLoad, listenerFunc: (error: string) => void) => PluginListenerHandle| Param | Type |
|---|---|
eventName |
ApplePayEventsEnum.FailedToLoad |
listenerFunc |
(error: string) => void |
Returns: PluginListenerHandle
addListener(eventName: ApplePayEventsEnum.Completed, listenerFunc: () => void) => PluginListenerHandle| Param | Type |
|---|---|
eventName |
ApplePayEventsEnum.Completed |
listenerFunc |
() => void |
Returns: PluginListenerHandle
addListener(eventName: ApplePayEventsEnum.Canceled, listenerFunc: () => void) => PluginListenerHandle| Param | Type |
|---|---|
eventName |
ApplePayEventsEnum.Canceled |
listenerFunc |
() => void |
Returns: PluginListenerHandle
addListener(eventName: ApplePayEventsEnum.Failed, listenerFunc: (error: string) => void) => PluginListenerHandle| Param | Type |
|---|---|
eventName |
ApplePayEventsEnum.Failed |
listenerFunc |
(error: string) => void |
Returns: PluginListenerHandle
addListener(eventName: ApplePayEventsEnum.DidSelectShippingContact, listenerFunc: (data: DidSelectShippingContact) => void) => PluginListenerHandle| Param | Type |
|---|---|
eventName |
ApplePayEventsEnum.DidSelectShippingContact |
listenerFunc |
(data: DidSelectShippingContact) => void |
Returns: PluginListenerHandle
addListener(eventName: ApplePayEventsEnum.DidCreatePaymentMethod, listenerFunc: (data: DidSelectShippingContact) => void) => PluginListenerHandle| Param | Type |
|---|---|
eventName |
ApplePayEventsEnum.DidCreatePaymentMethod |
listenerFunc |
(data: DidSelectShippingContact) => void |
Returns: PluginListenerHandle
isGooglePayAvailable() => Promise<void>createGooglePay(options: CreateGooglePayOption) => Promise<void>| Param | Type |
|---|---|
options |
CreateGooglePayOption |
presentGooglePay() => Promise<{ paymentResult: GooglePayResultInterface; }>Returns: Promise<{ paymentResult: GooglePayResultInterface; }>
addListener(eventName: GooglePayEventsEnum.Loaded, listenerFunc: () => void) => PluginListenerHandle| Param | Type |
|---|---|
eventName |
GooglePayEventsEnum.Loaded |
listenerFunc |
() => void |
Returns: PluginListenerHandle
addListener(eventName: GooglePayEventsEnum.FailedToLoad, listenerFunc: (error: string) => void) => PluginListenerHandle| Param | Type |
|---|---|
eventName |
GooglePayEventsEnum.FailedToLoad |
listenerFunc |
(error: string) => void |
Returns: PluginListenerHandle
addListener(eventName: GooglePayEventsEnum.Completed, listenerFunc: () => void) => PluginListenerHandle| Param | Type |
|---|---|
eventName |
GooglePayEventsEnum.Completed |
listenerFunc |
() => void |
Returns: PluginListenerHandle
addListener(eventName: GooglePayEventsEnum.Canceled, listenerFunc: () => void) => PluginListenerHandle| Param | Type |
|---|---|
eventName |
GooglePayEventsEnum.Canceled |
listenerFunc |
() => void |
Returns: PluginListenerHandle
addListener(eventName: GooglePayEventsEnum.Failed, listenerFunc: () => void) => PluginListenerHandle| Param | Type |
|---|---|
eventName |
GooglePayEventsEnum.Failed |
listenerFunc |
() => void |
Returns: PluginListenerHandle
createIdentityVerificationSheet(options: CreateIdentityVerificationSheetOption) => Promise<void>| Param | Type |
|---|---|
options |
CreateIdentityVerificationSheetOption |
presentIdentityVerificationSheet() => Promise<{ identityVerificationResult: IdentityVerificationSheetResultInterface; }>Returns: Promise<{ identityVerificationResult: IdentityVerificationSheetResultInterface; }>
addListener(eventName: IdentityVerificationSheetEventsEnum.Loaded, listenerFunc: () => void) => PluginListenerHandle| Param | Type |
|---|---|
eventName |
IdentityVerificationSheetEventsEnum.Loaded |
listenerFunc |
() => void |
Returns: PluginListenerHandle
addListener(eventName: IdentityVerificationSheetEventsEnum.FailedToLoad, listenerFunc: (error: string) => void) => PluginListenerHandle| Param | Type |
|---|---|
eventName |
IdentityVerificationSheetEventsEnum.FailedToLoad |
listenerFunc |
(error: string) => void |
Returns: PluginListenerHandle
addListener(eventName: IdentityVerificationSheetEventsEnum.Completed, listenerFunc: () => void) => PluginListenerHandle| Param | Type |
|---|---|
eventName |
IdentityVerificationSheetEventsEnum.Completed |
listenerFunc |
() => void |
Returns: PluginListenerHandle
addListener(eventName: IdentityVerificationSheetEventsEnum.Canceled, listenerFunc: () => void) => PluginListenerHandle| Param | Type |
|---|---|
eventName |
IdentityVerificationSheetEventsEnum.Canceled |
listenerFunc |
() => void |
Returns: PluginListenerHandle
addListener(eventName: IdentityVerificationSheetEventsEnum.Failed, listenerFunc: (error: string) => void) => PluginListenerHandle| Param | Type |
|---|---|
eventName |
IdentityVerificationSheetEventsEnum.Failed |
listenerFunc |
(error: string) => void |
Returns: PluginListenerHandle
createPaymentFlow(options: CreatePaymentFlowOption) => Promise<void>| Param | Type |
|---|---|
options |
CreatePaymentFlowOption |
presentPaymentFlow() => Promise<{ cardNumber: string; }>Returns: Promise<{ cardNumber: string; }>
confirmPaymentFlow() => Promise<{ paymentResult: PaymentFlowResultInterface; }>Returns: Promise<{ paymentResult: PaymentFlowResultInterface; }>
addListener(eventName: PaymentFlowEventsEnum.Loaded, listenerFunc: () => void) => PluginListenerHandle| Param | Type |
|---|---|
eventName |
PaymentFlowEventsEnum.Loaded |
listenerFunc |
() => void |
Returns: PluginListenerHandle
addListener(eventName: PaymentFlowEventsEnum.FailedToLoad, listenerFunc: (error: string) => void) => PluginListenerHandle| Param | Type |
|---|---|
eventName |
PaymentFlowEventsEnum.FailedToLoad |
listenerFunc |
(error: string) => void |
Returns: PluginListenerHandle
addListener(eventName: PaymentFlowEventsEnum.Opened, listenerFunc: () => void) => PluginListenerHandle| Param | Type |
|---|---|
eventName |
PaymentFlowEventsEnum.Opened |
listenerFunc |
() => void |
Returns: PluginListenerHandle
addListener(eventName: PaymentFlowEventsEnum.Completed, listenerFunc: () => void) => PluginListenerHandle| Param | Type |
|---|---|
eventName |
PaymentFlowEventsEnum.Completed |
listenerFunc |
() => void |
Returns: PluginListenerHandle
addListener(eventName: PaymentFlowEventsEnum.Canceled, listenerFunc: () => void) => PluginListenerHandle| Param | Type |
|---|---|
eventName |
PaymentFlowEventsEnum.Canceled |
listenerFunc |
() => void |
Returns: PluginListenerHandle
addListener(eventName: PaymentFlowEventsEnum.Failed, listenerFunc: (error: string) => void) => PluginListenerHandle| Param | Type |
|---|---|
eventName |
PaymentFlowEventsEnum.Failed |
listenerFunc |
(error: string) => void |
Returns: PluginListenerHandle
addListener(eventName: PaymentFlowEventsEnum.Created, listenerFunc: (info: { cardNumber: string; }) => void) => PluginListenerHandle| Param | Type |
|---|---|
eventName |
PaymentFlowEventsEnum.Created |
listenerFunc |
(info: { cardNumber: string; }) => void |
Returns: PluginListenerHandle
createPaymentSheet(options: CreatePaymentSheetOption) => Promise<void>| Param | Type |
|---|---|
options |
CreatePaymentSheetOption |
presentPaymentSheet() => Promise<{ paymentResult: PaymentSheetResultInterface; }>Returns: Promise<{ paymentResult: PaymentSheetResultInterface; }>
addListener(eventName: PaymentSheetEventsEnum.Loaded, listenerFunc: () => void) => PluginListenerHandle| Param | Type |
|---|---|
eventName |
PaymentSheetEventsEnum.Loaded |
listenerFunc |
() => void |
Returns: PluginListenerHandle
addListener(eventName: PaymentSheetEventsEnum.FailedToLoad, listenerFunc: (error: string) => void) => PluginListenerHandle| Param | Type |
|---|---|
eventName |
PaymentSheetEventsEnum.FailedToLoad |
listenerFunc |
(error: string) => void |
Returns: PluginListenerHandle
addListener(eventName: PaymentSheetEventsEnum.Completed, listenerFunc: () => void) => PluginListenerHandle| Param | Type |
|---|---|
eventName |
PaymentSheetEventsEnum.Completed |
listenerFunc |
() => void |
Returns: PluginListenerHandle
addListener(eventName: PaymentSheetEventsEnum.Canceled, listenerFunc: () => void) => PluginListenerHandle| Param | Type |
|---|---|
eventName |
PaymentSheetEventsEnum.Canceled |
listenerFunc |
() => void |
Returns: PluginListenerHandle
addListener(eventName: PaymentSheetEventsEnum.Failed, listenerFunc: (error: string) => void) => PluginListenerHandle| Param | Type |
|---|---|
eventName |
PaymentSheetEventsEnum.Failed |
listenerFunc |
(error: string) => void |
Returns: PluginListenerHandle
initialize(opts: StripeInitializationOptions) => Promise<void>| Param | Type |
|---|---|
opts |
StripeInitializationOptions |
handleURLCallback(opts: StripeURLHandlingOptions) => Promise<void>iOS Only
| Param | Type |
|---|---|
opts |
StripeURLHandlingOptions |
| Prop | Type |
|---|---|
paymentIntentClientSecret |
string |
paymentSummaryItems |
{ label: string; amount: number; }[] |
merchantIdentifier |
string |
countryCode |
string |
currency |
string |
requiredShippingContactFields |
('postalAddress' | 'phoneNumber' | 'emailAddress' | 'name')[] |
| Prop | Type |
|---|---|
remove |
() => Promise<void> |
| Prop | Type |
|---|---|
contact |
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 |
| Prop | Type | Description |
|---|---|---|
paymentIntentClientSecret |
string |
|
paymentSummaryItems |
{ label: string; amount: number; }[] |
Web only need @stripe-elements/stripe-elements > 1.1.0 |
merchantIdentifier |
string |
Web only need @stripe-elements/stripe-elements > 1.1.0 |
countryCode |
string |
Web only need @stripe-elements/stripe-elements > 1.1.0 |
currency |
string |
Web only need @stripe-elements/stripe-elements > 1.1.0 |
| Prop | Type |
|---|---|
verificationId |
string |
ephemeralKeySecret |
string |
| Prop | Type | Description | Default |
|---|---|---|---|
paymentIntentClientSecret |
string |
Any documentation call 'paymentIntent' Set paymentIntentClientSecret or setupIntentClientSecret | |
setupIntentClientSecret |
string |
Any documentation call 'paymentIntent' Set paymentIntentClientSecret or setupIntentClientSecret | |
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 |
"" |
|
style |
'alwaysLight' | 'alwaysDark' |
iOS Only | undefined |
withZipCode |
boolean |
Platform: Web only Show ZIP code field. | true |
| Prop | Type | Description | Default |
|---|---|---|---|
paymentIntentClientSecret |
string |
Any documentation call 'paymentIntent' Set paymentIntentClientSecret or setupIntentClientSecret | |
setupIntentClientSecret |
string |
Any documentation call 'paymentIntent' Set paymentIntentClientSecret or setupIntentClientSecret | |
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 |
"" |
|
style |
'alwaysLight' | 'alwaysDark' |
iOS Only | undefined |
withZipCode |
boolean |
Platform: Web only Show ZIP code field. | true |
| Prop | Type | Description |
|---|---|---|
publishableKey |
string |
|
stripeAccount |
string |
Optional. Making API calls for connected accounts |
| Prop | Type |
|---|---|
url |
string |
| Method | Signature | Description |
|---|---|---|
| initialize | (opts: StripeInitializationOptions) => Promise<void> | |
| handleURLCallback | (opts: StripeURLHandlingOptions) => Promise<void> | iOS Only |
| Prop | Type |
|---|---|
stripe |
StripePlugin |
isApplePayAvailable |
boolean |
isGooglePayAvailable |
boolean |
ApplePayEventsEnum.Completed | ApplePayEventsEnum.Canceled | ApplePayEventsEnum.Failed | ApplePayEventsEnum.DidSelectShippingContact | ApplePayEventsEnum.DidCreatePaymentMethod
GooglePayEventsEnum.Completed | GooglePayEventsEnum.Canceled | GooglePayEventsEnum.Failed
IdentityVerificationSheetEventsEnum.Completed | IdentityVerificationSheetEventsEnum.Canceled | IdentityVerificationSheetEventsEnum.Failed
PaymentFlowEventsEnum.Completed | PaymentFlowEventsEnum.Canceled | PaymentFlowEventsEnum.Failed
PaymentSheetEventsEnum.Completed | PaymentSheetEventsEnum.Canceled | PaymentSheetEventsEnum.Failed
| Members | Value |
|---|---|
Loaded |
"applePayLoaded" |
FailedToLoad |
"applePayFailedToLoad" |
Completed |
"applePayCompleted" |
Canceled |
"applePayCanceled" |
Failed |
"applePayFailed" |
DidSelectShippingContact |
"applePayDidSelectShippingContact" |
DidCreatePaymentMethod |
"applePayDidCreatePaymentMethod" |
| Members | Value |
|---|---|
Loaded |
"googlePayLoaded" |
FailedToLoad |
"googlePayFailedToLoad" |
Completed |
"googlePayCompleted" |
Canceled |
"googlePayCanceled" |
Failed |
"googlePayFailed" |
| Members | Value |
|---|---|
Loaded |
"identityVerificationSheetLoaded" |
FailedToLoad |
"identityVerificationSheetFailedToLoad" |
Completed |
"identityVerificationSheetCompleted" |
Canceled |
"identityVerificationSheetCanceled" |
Failed |
"identityVerificationSheetFailed" |
| Members | Value |
|---|---|
Loaded |
"paymentFlowLoaded" |
FailedToLoad |
"paymentFlowFailedToLoad" |
Opened |
"paymentFlowOpened" |
Created |
"paymentFlowCreated" |
Completed |
"paymentFlowCompleted" |
Canceled |
"paymentFlowCanceled" |
Failed |
"paymentFlowFailed" |
| Members | Value |
|---|---|
Loaded |
"paymentSheetLoaded" |
FailedToLoad |
"paymentSheetFailedToLoad" |
Completed |
"paymentSheetCompleted" |
Canceled |
"paymentSheetCanceled" |
Failed |
"paymentSheetFailed" |
@capacitor-community/stripe is MIT licensed.








