npm package discovery and stats viewer.

Discover Tips

  • General search

    [free text search, go nuts!]

  • Package details

    pkg:[package-name]

  • User packages

    @[username]

Sponsor

Optimize Toolset

I’ve always been into building performant and accessible sites, but lately I’ve been taking it extremely seriously. So much so that I’ve been building a tool to help me optimize and monitor the sites that I build to make sure that I’m making an attempt to offer the best experience to those who visit them. If you’re into performant, accessible and SEO friendly sites, you might like it too! You can check it out at Optimize Toolset.

About

Hi, 👋, I’m Ryan Hefner  and I built this site for me, and you! The goal of this site was to provide an easy way for me to check the stats on my npm packages, both for prioritizing issues and updates, and to give me a little kick in the pants to keep up on stuff.

As I was building it, I realized that I was actually using the tool to build the tool, and figured I might as well put this out there and hopefully others will find it to be a fast and useful way to search and browse npm packages as I have.

If you’re interested in other things I’m working on, follow me on Twitter or check out the open source projects I’ve been publishing on GitHub.

I am also working on a Twitter bot for this site to tweet the most popular, newest, random packages from npm. Please follow that account now and it will start sending out packages soon–ish.

Open Software & Tools

This site wouldn’t be possible without the immense generosity and tireless efforts from the people who make contributions to the world and share their work via open source initiatives. Thank you 🙏

© 2024 – Pkg Stats / Ryan Hefner

@crowdfarming/stripe-app

v0.0.20

Published

Stripe SDK bindings for Capacitor Applications

Downloads

5

Readme

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 | | | | | ApplePay | Not supported | | beta. | | GooglePay | | Not supported | |

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: (error: string) => void) => PluginListenerHandle

| Param | Type | | ------------------ | ------------------------------------------------------------------------------ | | eventName | ApplePayEventsEnum.FailedToLoad | | listenerFunc | (error: string) => 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: (error: string) => void) => PluginListenerHandle

| Param | Type | | ------------------ | ------------------------------------------------------------------------ | | eventName | ApplePayEventsEnum.Failed | | listenerFunc | (error: string) => void |

Returns: PluginListenerHandle


addListener(ApplePayEventsEnum.DidSelectShippingContact, ...)

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

| Param | Type | | ------------------ | ------------------------------------------------------------------------------------------------ | | eventName | ApplePayEventsEnum.DidSelectShippingContact | | listenerFunc | (data: DidSelectShippingContact) => void |

Returns: PluginListenerHandle


addListener(ApplePayEventsEnum.DidCreatePaymentMethod, ...)

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

| Param | Type | | ------------------ | ------------------------------------------------------------------------------------------------ | | eventName | ApplePayEventsEnum.DidCreatePaymentMethod | | listenerFunc | (data: DidSelectShippingContact) => void |

Returns: PluginListenerHandle


addListener(ApplePayEventsEnum.DidUpdateAmount, ...)

addListener(eventName: ApplePayEventsEnum.DidUpdateAmount, listenerFunc: (data: DidUpdateAmount) => void) => PluginListenerHandle

| Param | Type | | ------------------ | --------------------------------------------------------------------------------- | | eventName | ApplePayEventsEnum.DidUpdateAmount | | listenerFunc | (data: DidUpdateAmount) => 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: (error: string) => void) => PluginListenerHandle

| Param | Type | | ------------------ | -------------------------------------------------------------------------------- | | eventName | GooglePayEventsEnum.FailedToLoad | | listenerFunc | (error: string) => 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: (error: string) => void) => PluginListenerHandle

| Param | Type | | ------------------ | ------------------------------------------------------------------------------------ | | eventName | PaymentFlowEventsEnum.FailedToLoad | | listenerFunc | (error: string) => void |

Returns: PluginListenerHandle


addListener(PaymentFlowEventsEnum.Opened, ...)

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

| Param | Type | | ------------------ | ------------------------------------------------------------------------------ | | eventName | PaymentFlowEventsEnum.Opened | | 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: (error: string) => void) => PluginListenerHandle

| Param | Type | | ------------------ | ------------------------------------------------------------------------------ | | eventName | PaymentFlowEventsEnum.Failed | | listenerFunc | (error: string) => 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: (error: string) => void) => PluginListenerHandle

| Param | Type | | ------------------ | -------------------------------------------------------------------------------------- | | eventName | PaymentSheetEventsEnum.FailedToLoad | | listenerFunc | (error: string) => 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: (error: string) => void) => PluginListenerHandle

| Param | Type | | ------------------ | -------------------------------------------------------------------------------- | | eventName | PaymentSheetEventsEnum.Failed | | listenerFunc | (error: string) => void |

Returns: PluginListenerHandle


initialize(...)

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

| Param | Type | | ---------- | ----------------------------------------------------------------------------------- | | opts | StripeInitializationOptions |


handleURLCallback(...)

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

iOS Only

| Param | Type | | ---------- | ----------------------------------------------------------------------------- | | opts | StripeURLHandlingOptions |


Interfaces

CreateApplePayOption

| Prop | Type | | ----------------------------------- | ------------------------------------------------------------------------------------------------------------- | | paymentIntentClientSecret | string | | paymentSummaryItems | { label: string; amount: number; }[] | | merchantIdentifier | string | | countryCode | string | | currency | string | | requiredShippingContactFields | ('postalAddress' | 'phoneNumber' | 'emailAddress' | 'name')[] | | cfCartInfo | [{ masterBox: string; numMasterBoxes: number; selectedDate: string; type: string; up: string; }] | | cfCountryError | string | | cfAuthorization | string | | cfAmountError | string | | cfMinAmount | number |

PluginListenerHandle

| Prop | Type | | ------------ | ----------------------------------------- | | remove | () => Promise<void> |

DidSelectShippingContact

| Prop | Type | | ------------- | ----------------------------------------------------------- | | contact | ShippingContact |

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 |

DidUpdateAmount

| Prop | Type | | ------------ | ------------------- | | amount | number |

CreateGooglePayOption

| 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 |

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" | | returnURL | string | | "" | | style | 'alwaysLight' | 'alwaysDark' | iOS Only | undefined | | withZipCode | boolean | Platform: Web only Show ZIP code field. | true |

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 | | | 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 |

StripeInitializationOptions

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

StripeURLHandlingOptions

| Prop | Type | | --------- | ------------------- | | url | string |

StripePlugin

| Method | Signature | Description | | --------------------- | -------------------------------------------------------------------------------------------------------- | ----------- | | initialize | (opts: StripeInitializationOptions) => Promise<void> | | | handleURLCallback | (opts: StripeURLHandlingOptions) => Promise<void> | iOS Only |

CapacitorStripeContext

| Prop | Type | | -------------------------- | ----------------------------------------------------- | | stripe | StripePlugin | | isApplePayAvailable | boolean | | isGooglePayAvailable | boolean |

Type Aliases

ApplePayResultInterface

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

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

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.