Introduction

What is ngx-stripe

Ngx Stripe is a comprehensive library designed to integrate Stripe's payment processing capabilities into your Angular applications seamlessly. Ngx Stripe leverages the powerful features of StripeJS, making it easier to build robust, secure, and scalable payment solutions.

The Stripe.js reference covers complete Elements customization details.

You can use Elements with any Stripe product to collect online payments. To find the right integration path for your business, explore Stripe Docs.

Key Features:

  • Angular Components for Stripe Elements: Ngx Stripe provides a set of Angular components, each corresponding to a specific Stripe Web Element. These components are designed to simplify the integration of Stripe's UI elements, ensuring a smooth and consistent user experience.
  • Seamless Integration with StripeJS: Aligning closely with StripeJS, Ngx Stripe ensures that you have access to the latest features and updates from Stripe, directly within your Angular application.
  • Lazy Loading of StripeJS: Enhance your application's performance by lazy loading the StripeJS JavaScript. This feature ensures that the StripeJS library is loaded only when needed, optimizing loading times and improving the overall user experience.
  • Customizable and Flexible: Customize the look and feel of your payment forms to match your application's design. Ngx Stripe components are highly flexible, allowing for extensive customization and styling.
  • Strongly Typed for Angular Development: Benefit from TypeScript in your payment integration. Ngx Stripe is strongly typed, making your development process more efficient and less prone to errors.

Stripe Elements and Angular Components

Each Stripe Element has an ngx-stripe host. The recommended checkout path is Payment Element (ngx-stripe-payment). The full list of selectors lives on the Elements catalog.

  • Payment Element (ngx-stripe-payment) — cards, wallets, and local methods in one Element.
  • Express Checkout (ngx-stripe-express-checkout) — Apple Pay / Google Pay / Link (replaces Payment Request Button on Stripe.js v10).
  • Card Element (ngx-stripe-card) — still supported; split fields use ngx-stripe-card-group.