DEV Community

Sachin Dilshan
Sachin Dilshan

Posted on

๐Ÿš€ Introducing ngxsmk-stripe: A Modern Angular Stripe Plugin

Iโ€™m excited to share my latest open-source project: ngxsmk-stripe, an Angular 17+ plugin that makes integrating Stripe payments simple, customizable, and future-proof.


๐Ÿ’ณ Why I Built This

If youโ€™ve ever tried to integrate Stripe into an Angular app, you know it can feel a bit overwhelming. I wanted a solution that was:

  • โœ… Angular-first (built with standalone components)
  • โœ… Future-proof (compatible with Angular 17+)
  • โœ… Flexible (one-time payments + subscriptions)
  • โœ… Customizable (SCSS theming + Stripe Appearance API)
  • โœ… Developer-friendly (success/error event emitters)

Thatโ€™s how ngxsmk-stripe was born!


๐Ÿ”‘ Key Features

  • ๐Ÿ’ณ One-time payments via Stripe PaymentElement
  • ๐Ÿ”„ Subscription & recurring billing with SetupIntent
  • ๐ŸŽจ Theme customization using SCSS + Stripe Appearance API
  • ๐ŸŒ Localization support (locale input)
  • โšก Standalone Angular components (no NgModule required)
  • ๐Ÿ“ค Event emitters for handling success and error states

โšก Quick Example

Hereโ€™s how easy it is to drop a payment form into your Angular app:

<ngxsmk-stripe-payment
  [publicKey]="publicKey"
  [clientSecret]="paymentClientSecret"
  [returnUrl]="returnUrl"
  [appearance]="appearance"
  (paymentSuccess)="onPaymentSuccess($event)"
  (paymentError)="onPaymentError($event)">
</ngxsmk-stripe-payment>
Enter fullscreen mode Exit fullscreen mode

And for subscriptions:

<ngxsmk-stripe-subscription
  [publicKey]="publicKey"
  [clientSecret]="subscriptionClientSecret"
  [returnUrl]="returnUrl"
  [appearance]="appearance"
  (subscriptionSuccess)="onSubSuccess($event)"
  (subscriptionError)="onSubError($event)">
</ngxsmk-stripe-subscription>
Enter fullscreen mode Exit fullscreen mode

๐ŸŽจ Customization

  • Use SCSS variables for button styles, colors, and typography
  • Leverage Stripeโ€™s Appearance API for advanced UI theming

๐Ÿ“ฆ Installation

npm install ngxsmk-stripe @stripe/stripe-js
Enter fullscreen mode Exit fullscreen mode

๐Ÿ›  Contributing

Iโ€™d love to see the community extend this plugin with new features (like saved payment methods, invoicing tools, etc.). PRs are welcome!

Repo ๐Ÿ‘‰ GitHub: ngxsmk-stripe


๐Ÿ“œ Closing Thoughts

With ngxsmk-stripe, you can focus on building your product while handling payments securely and elegantly in Angular. I hope this saves other devs the hours I spent piecing everything together!

๐Ÿš€ Try it out, give it a โญ on GitHub, and let me know your feedback!

Top comments (0)