Skip to content

Stripe Mobile SDK wrapper for Capacitor

License

Notifications You must be signed in to change notification settings

ovidiu-a/stripe

 
 

Repository files navigation


Stripe

@capacitor-community/stripe

Capacitor community plugin for native Stripe.


Maintainers

Maintainer GitHub Social Sponsoring Company
Hidetaka Okamoto hideokamoto @hide__dev
Ibby Hadeed ihadeed
Masahiko Sakakibara rdlabo @rdlabo RELATION 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

Android iOS Web
PaymentSheet
PaymentFlow Coming soon
ApplePay Not support Coming soon
GooglePay Not support Coming soon

API

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

isApplePayAvailable()

isApplePayAvailable() => Promise<void>

createApplePay(...)

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

presentApplePay()

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

Returns: Promise<{ paymentResult: ApplePayResultInterface; }>


addListener(ApplePayEventsEnum.Loaded, ...)

addListener(eventName: ApplePayEventsEnum.Loaded, listenerFunc: () => void) => PluginListenerHandle
Param Type
eventName ApplePayEventsEnum.Loaded
listenerFunc () => void

Returns: PluginListenerHandle


addListener(ApplePayEventsEnum.FailedToLoad, ...)

addListener(eventName: ApplePayEventsEnum.FailedToLoad, listenerFunc: () => void) => PluginListenerHandle
Param Type
eventName ApplePayEventsEnum.FailedToLoad
listenerFunc () => void

Returns: PluginListenerHandle


addListener(ApplePayEventsEnum.FailedToLoad, ...)

addListener(eventName: ApplePayEventsEnum.FailedToLoad, listenerFunc: () => void) => PluginListenerHandle
Param Type
eventName ApplePayEventsEnum.FailedToLoad
listenerFunc () => void

Returns: PluginListenerHandle


addListener(ApplePayEventsEnum.Completed, ...)

addListener(eventName: ApplePayEventsEnum.Completed, listenerFunc: () => void) => PluginListenerHandle
Param Type
eventName ApplePayEventsEnum.Completed
listenerFunc () => void

Returns: PluginListenerHandle


addListener(ApplePayEventsEnum.Canceled, ...)

addListener(eventName: ApplePayEventsEnum.Canceled, listenerFunc: () => void) => PluginListenerHandle
Param Type
eventName ApplePayEventsEnum.Canceled
listenerFunc () => void

Returns: PluginListenerHandle


addListener(ApplePayEventsEnum.Failed, ...)

addListener(eventName: ApplePayEventsEnum.Failed, listenerFunc: () => void) => PluginListenerHandle
Param Type
eventName ApplePayEventsEnum.Failed
listenerFunc () => void

Returns: PluginListenerHandle


isGooglePayAvailable()

isGooglePayAvailable() => Promise<void>

createGooglePay(...)

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

presentGooglePay()

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

Returns: Promise<{ paymentResult: GooglePayResultInterface; }>


addListener(GooglePayEventsEnum.Loaded, ...)

addListener(eventName: GooglePayEventsEnum.Loaded, listenerFunc: () => void) => PluginListenerHandle
Param Type
eventName GooglePayEventsEnum.Loaded
listenerFunc () => void

Returns: PluginListenerHandle


addListener(GooglePayEventsEnum.FailedToLoad, ...)

addListener(eventName: GooglePayEventsEnum.FailedToLoad, listenerFunc: () => void) => PluginListenerHandle
Param Type
eventName GooglePayEventsEnum.FailedToLoad
listenerFunc () => void

Returns: PluginListenerHandle


addListener(GooglePayEventsEnum.FailedToLoad, ...)

addListener(eventName: GooglePayEventsEnum.FailedToLoad, listenerFunc: () => void) => PluginListenerHandle
Param Type
eventName GooglePayEventsEnum.FailedToLoad
listenerFunc () => void

Returns: PluginListenerHandle


addListener(GooglePayEventsEnum.Completed, ...)

addListener(eventName: GooglePayEventsEnum.Completed, listenerFunc: () => void) => PluginListenerHandle
Param Type
eventName GooglePayEventsEnum.Completed
listenerFunc () => void

Returns: PluginListenerHandle


addListener(GooglePayEventsEnum.Canceled, ...)

addListener(eventName: GooglePayEventsEnum.Canceled, listenerFunc: () => void) => PluginListenerHandle
Param Type
eventName GooglePayEventsEnum.Canceled
listenerFunc () => void

Returns: PluginListenerHandle


addListener(GooglePayEventsEnum.Failed, ...)

addListener(eventName: GooglePayEventsEnum.Failed, listenerFunc: () => void) => PluginListenerHandle
Param Type
eventName GooglePayEventsEnum.Failed
listenerFunc () => void

Returns: PluginListenerHandle


createPaymentFlow(...)

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

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
Param Type
eventName PaymentFlowEventsEnum.Loaded
listenerFunc () => void

Returns: PluginListenerHandle


addListener(PaymentFlowEventsEnum.FailedToLoad, ...)

addListener(eventName: PaymentFlowEventsEnum.FailedToLoad, listenerFunc: () => void) => PluginListenerHandle
Param Type
eventName PaymentFlowEventsEnum.FailedToLoad
listenerFunc () => void

Returns: PluginListenerHandle


addListener(PaymentFlowEventsEnum.Opened, ...)

addListener(eventName: PaymentFlowEventsEnum.Opened, listenerFunc: () => void) => PluginListenerHandle
Param Type
eventName PaymentFlowEventsEnum.Opened
listenerFunc () => void

Returns: PluginListenerHandle


addListener(PaymentFlowEventsEnum.FailedToLoad, ...)

addListener(eventName: PaymentFlowEventsEnum.FailedToLoad, listenerFunc: () => void) => PluginListenerHandle
Param Type
eventName PaymentFlowEventsEnum.FailedToLoad
listenerFunc () => void

Returns: PluginListenerHandle


addListener(PaymentFlowEventsEnum.Completed, ...)

addListener(eventName: PaymentFlowEventsEnum.Completed, listenerFunc: () => void) => PluginListenerHandle
Param Type
eventName PaymentFlowEventsEnum.Completed
listenerFunc () => void

Returns: PluginListenerHandle


addListener(PaymentFlowEventsEnum.Canceled, ...)

addListener(eventName: PaymentFlowEventsEnum.Canceled, listenerFunc: () => void) => PluginListenerHandle
Param Type
eventName PaymentFlowEventsEnum.Canceled
listenerFunc () => void

Returns: PluginListenerHandle


addListener(PaymentFlowEventsEnum.Failed, ...)

addListener(eventName: PaymentFlowEventsEnum.Failed, listenerFunc: () => void) => PluginListenerHandle
Param Type
eventName PaymentFlowEventsEnum.Failed
listenerFunc () => void

Returns: PluginListenerHandle


addListener(PaymentFlowEventsEnum.Created, ...)

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

Returns: PluginListenerHandle


createPaymentSheet(...)

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

presentPaymentSheet()

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

Returns: Promise<{ paymentResult: PaymentSheetResultInterface; }>


addListener(PaymentSheetEventsEnum.Loaded, ...)

addListener(eventName: PaymentSheetEventsEnum.Loaded, listenerFunc: () => void) => PluginListenerHandle
Param Type
eventName PaymentSheetEventsEnum.Loaded
listenerFunc () => void

Returns: PluginListenerHandle


addListener(PaymentSheetEventsEnum.FailedToLoad, ...)

addListener(eventName: PaymentSheetEventsEnum.FailedToLoad, listenerFunc: () => void) => PluginListenerHandle
Param Type
eventName PaymentSheetEventsEnum.FailedToLoad
listenerFunc () => void

Returns: PluginListenerHandle


addListener(PaymentSheetEventsEnum.Completed, ...)

addListener(eventName: PaymentSheetEventsEnum.Completed, listenerFunc: () => void) => PluginListenerHandle
Param Type
eventName PaymentSheetEventsEnum.Completed
listenerFunc () => void

Returns: PluginListenerHandle


addListener(PaymentSheetEventsEnum.Canceled, ...)

addListener(eventName: PaymentSheetEventsEnum.Canceled, listenerFunc: () => void) => PluginListenerHandle
Param Type
eventName PaymentSheetEventsEnum.Canceled
listenerFunc () => void

Returns: PluginListenerHandle


addListener(PaymentSheetEventsEnum.Failed, ...)

addListener(eventName: PaymentSheetEventsEnum.Failed, listenerFunc: () => void) => PluginListenerHandle
Param Type
eventName PaymentSheetEventsEnum.Failed
listenerFunc () => void

Returns: PluginListenerHandle


initialize(...)

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

Interfaces

CreateApplePayOption

Prop Type
paymentIntentClientSecret string
paymentSummaryItems { label: string; amount: number; }[]
merchantIdentifier string
countryCode string
currency string

PluginListenerHandle

Prop Type
remove () => Promise<void>

CreateGooglePayOption

Prop Type
paymentIntentClientSecret string

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
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"
style 'alwaysLight' | 'alwaysDark' iOS Only undefined

CreatePaymentSheetOption

Prop Type Description Default
paymentIntentClientSecret string Any documentation call 'paymentIntent'
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"
style 'alwaysLight' | 'alwaysDark' iOS Only undefined

StripeInitializationOptions

Prop Type
publishableKey string

StripePlugin

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

CapacitorStripeContext

Prop Type
stripe StripePlugin
isApplePayAvailable boolean
isGooglePayAvailable boolean

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

Members Value
Loaded "applePayLoaded"
FailedToLoad "applePayFailedToLoad"
Completed "applePayCompleted"
Canceled "applePayCanceled"
Failed "applePayFailed"

GooglePayEventsEnum

Members Value
Loaded "googlePayLoaded"
FailedToLoad "googlePayFailedToLoad"
Completed "googlePayCompleted"
Canceled "googlePayCanceled"
Failed "googlePayFailed"

PaymentFlowEventsEnum

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

PaymentSheetEventsEnum

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

License

@capacitor-community/stripe is MIT licensed.

About

Stripe Mobile SDK wrapper for Capacitor

Resources

License

Stars

Watchers

Forks

Packages

No packages published

Languages

  • Java 36.4%
  • TypeScript 33.5%
  • Swift 24.3%
  • Objective-C 2.0%
  • Kotlin 1.8%
  • Ruby 1.4%
  • JavaScript 0.6%