Requires I0S 9.x +
tns plugin add nativescript-stripe
tns plugin add email@example.com
tns plugin add firstname.lastname@example.org
Stripe Android v10.2.1 SDK is being used
Stripe iOS 19.0.1 SDK (pod) is being used
To use the Custom Integration's CreditCardView in Angular,
register the Angular wrapper in the main module (typically
app.module.ts), as follows:
IMPORTANT: Make sure you include
xmlns:stripe="nativescript-stripe" on the Page tag
Using from view
Add extra details to card
const ccView = page;const cc = ccViewcard;ccname = "Osei Fortune";
;;;cc.name = "Osei Fortune";
Using from code
;;cc.name = "Osei Fortune";
demo-angular folders contain demos that use the Standard Integration.
They can be used as a starting point, and provide information on how to invoke the
Standard Integration components. For more information, see the README in the
Set Stripe configuration values:
StripeConfig.shared.backendAPI = Your API Service;StripeConfig.shared.publishableKey = Your Stripe Key;StripeConfig.shared.companyName = Your Company Name;// To support Apple Pay, set appleMerchantID.StripeConfig.shared.appleMerchantID = Your Apple Merchant ID;
Create a Customer Session
Create a Payment Session
See Stripe Docs for more information.
Strong Customer Authentication
PSD2 regulations in Europe will require Strong Customer Authentication
for some credit card purchases. Stripe supports this, though most of the work to make it happen is
required on the backend server and in the mobile app, outside the
To support SCA, follow the instructions for iOS
and Android on using
of tokens when interacting with your backend server. The
nativescript-stripe plugin has
cross-platform data structures and method calls that might be helpful. In
PaymentMethodand related classes
StripePaymentIntentand related classes
Handling secondary customer input
SCA requires the customer to enter additional information with some charge cards. Stripe takes care of this
if you properly handle the redirect from the
StripePaymentIntent returned from the server.
If you're using the automatic confirmation flow,
confirmSetupIntent will automatically manage the SCA validation by showing and validating the payment authentification.
If you're using the manual confirmation flow, where back-end creates the
SetupIntent and requires an Intent authentification from the customer,
authenticateSetupIntent will allow to manage that extra step before sending back the Intent to your server.
demo-angular now supports
PaymentIntent SCA integration. Any credit card verification will be automatically prompted to the user.
const enum not found
When building with NativeScript v6, it builds using the webpack-only flow in "transpileOnly" mode. A webpack issue means that
const enum values cannot be found in the final output.
This problem is not present in Angular projects and likely won't be an issue if you do not use any of the exported enums.
Unfortunately, the only fix I've found for this is to follow the advice in that issue and modify
webpack.config.js in your app to set
Note: This may no longer be needed once this TypeScript bug is fixed.
- Android Pay
- Apple Pay (supported by Standard Integration, not by Custom Integration)