Skip to content
Back to search

ngx-stripe

Angular 6+ wrapper for StripeJS

Safety scan

A static text scan, not a guarantee. Select the badge to see what was scanned and every finding.

Checked today

Check it deeper on your machine

It has changed since its scan on 11 Nov 2026.

As a Claude Code plugin, install it and then ask Claude Code:

/plugin marketplace add keithmackay/mackayi/plugin install scanskillsafety@mackayiDo a deep scan of https://github.com/richnologies/ngx-stripe with scanskillsafety

Or from a terminal, clone it and run it:

git clone https://github.com/keithmackay/scanskillsafety-skill ~/.claude/skills/scanskillsafetynode ~/.claude/skills/scanskillsafety/cli.cjs --deep 'https://github.com/richnologies/ngx-stripe'

It checks the exact commit: every file, its packages against OSV (api.osv.dev), how it compares with this page's scan (findsafeskills.com receives the repository's address), and, if you agree, Claude reading every file with your own Claude subscription. It never runs the code.

Badge for your README
findsafeskills safety rating

Markdown

[![findsafeskills safety rating](/api/listings/richnologies--ngx-stripe/badge.svg)](/listings/richnologies--ngx-stripe)

HTML

<a href="/listings/richnologies--ngx-stripe"><img src="/api/listings/richnologies--ngx-stripe/badge.svg" alt="findsafeskills safety rating" /></a>

Install

i

Install instructions from the README

As written by the repo's author. findsafeskills has not verified these steps.

npm install ngx-stripe @stripe/stripe-js

`ngx-stripe` version = `{angularMajor}.{stripeJsMajor}.{patch}` (e.g. `22.10.x` = Angular 22 + Stripe.js endive / `@stripe/stripe-js` v10).

Older Angular majors / Stripe trains: use an npm dist-tag or pin a version from the table below. Full setup, **pick your lane**, CSP, and Elements guides: [ngx-stripe.dev/docs](https://ngx-stripe.dev/docs). Minimal Payment Element playground (StackBlitz via GitHub): [`playground/lanes`](./playground/lanes).

npm install ngx-stripe@v22-dahlia @stripe/stripe-js@^9

| Angular | v10 endive | v9 dahlia | v8 clover | v7 basil | v6 acacia | v5 | | --- | --- | --- | --- | --- | --- | --- | | 22 | 22.10.x+ | 22.9.x+ | 22.8.x+ | 22.7.x+ | 22.6.x+ | 22.5.x+ | | 21 | 21.10.x+ | 21.9.x+ | 21.8.x+ | 21.7.x+ | 21.6.x+ | 21.5.x+ | | 20 | 20.10.x+ | 20.9.x+ | 20.8.x+ | 20.7.x+ | 20.6.x+ | 20.5.x+ | | 19 | 19.10.x+ | 19.9.x+ | 19.8.x+ | 19.7.x+ | 19.6.x+ | 19.5.x+ | | 18 | 18.10.x+ | 18.9.x+ | — | — | — | — | | 17 | 17.10.x+ | 17.9.x+ | — | — | — | — | | 16 | 16.x+ | — | — | — | — | — | | 15 | 15.x+ | — | — | — | — | — | | 14 | 14.x+ | — | — | — | — | — | | 13 | 13.x+ | — | — | — | — | — | | 12 | 12.x+ | — | — | — | — | — | | 11 | 11.x+ | — | — | — | — | — | | 10 | 10.x+ | — | — | — | — | — | | 9 | v9-lts / 9.4.0 | — | — | — | — | — | | 8 | v8-lts / 8.2.0 | — | — | — | — | — |

What was scanned

The files the safety scan read, as written by the repository's author and shown as plain text. Lines with a finding are marked.

README.md · README · 198 lines

View this file on GitHub (read at the repository's current version: the scan did not record which commit it read)

  1. Collect Payments with Stripe: The Angular Way
  2. <a href="https://stripe.com/partners/ngx-stripe" target="_blank"><img src="./docs/logos/stripe_partner_badge_verified_blurple.png" alt="Stripe Verified Partner" width="98"/></a>
  3. [![version](https://img.shields.io/npm/v/ngx-stripe.svg)](https://www.npmjs.com/package/ngx-stripe)
  4. [![license](https://img.shields.io/npm/l/ngx-stripe.svg)](https://www.npmjs.com/package/ngx-stripe)
  5. <h1 align="center">
  6. <img width="160" valign="bottom" src="./docs/logos/ngx-stripe-logo.png" alt="ngx-stripe">
  7. </h1>
  8. Angular components and services for [Stripe Elements](https://stripe.com/docs/stripe-js) — a thin, typed wrapper around [Stripe.js](https://stripe.com/docs/js).
  9. **Docs:** [ngx-stripe.dev](https://ngx-stripe.dev/docs) · **First payment:** [guided tour](https://ngx-stripe.dev/docs/first-payment) · **AI:** [llms.txt](https://ngx-stripe.dev/llms.txt) · **Agent Skill:** `npx skills add richnologies/ngx-stripe` · **Stripe.js versioning:** [Stripe policy](https://docs.stripe.com/sdks/stripejs-versioning)
  10. ## Install
  11. ```bash
  12. npm install ngx-stripe @stripe/stripe-js
  13. ```
  14. `ngx-stripe` version = `{angularMajor}.{stripeJsMajor}.{patch}` (e.g. `22.10.x` = Angular 22 + Stripe.js endive / `@stripe/stripe-js` v10).
  15. Older Angular majors / Stripe trains: use an npm dist-tag or pin a version from the table below. Full setup, **pick your lane**, CSP, and Elements guides: [ngx-stripe.dev/docs](https://ngx-stripe.dev/docs). Minimal Payment Element playground (StackBlitz via GitHub): [`playground/lanes`](./playground/lanes).
  16. ```bash
  17. npm install ngx-stripe@v22-dahlia @stripe/stripe-js@^9
  18. ```
  19. <!-- lanes:table:start -->
  20. | Angular | v10 endive | v9 dahlia | v8 clover | v7 basil | v6 acacia | v5 |
  21. | --- | --- | --- | --- | --- | --- | --- |
  22. | 22 | 22.10.x+ | 22.9.x+ | 22.8.x+ | 22.7.x+ | 22.6.x+ | 22.5.x+ |
  23. | 21 | 21.10.x+ | 21.9.x+ | 21.8.x+ | 21.7.x+ | 21.6.x+ | 21.5.x+ |
  24. | 20 | 20.10.x+ | 20.9.x+ | 20.8.x+ | 20.7.x+ | 20.6.x+ | 20.5.x+ |
  25. | 19 | 19.10.x+ | 19.9.x+ | 19.8.x+ | 19.7.x+ | 19.6.x+ | 19.5.x+ |
  26. | 18 | 18.10.x+ | 18.9.x+ | — | — | — | — |
  27. | 17 | 17.10.x+ | 17.9.x+ | — | — | — | — |
  28. | 16 | 16.x+ | — | — | — | — | — |
  29. | 15 | 15.x+ | — | — | — | — | — |
  30. | 14 | 14.x+ | — | — | — | — | — |
  31. | 13 | 13.x+ | — | — | — | — | — |
  32. | 12 | 12.x+ | — | — | — | — | — |
  33. | 11 | 11.x+ | — | — | — | — | — |
  34. | 10 | 10.x+ | — | — | — | — | — |
  35. | 9 | v9-lts / 9.4.0 | — | — | — | — | — |
  36. | 8 | v8-lts / 8.2.0 | — | — | — | — | — |
  37. <!-- lanes:table:end -->
  38. ## Collect your first payment
  39. Four steps from providers to a confirmed PaymentIntent. This matches the [docs guided tour](https://ngx-stripe.dev/docs/first-payment) — Payment Element is the recommended path (cards, wallets, and local methods in one UI). Card Element is still fully supported; the tour covers both.
  40. ### 1. Provide ngx-stripe
  41. Register Stripe in your app config. Only publishable keys (`pk_test_` / `pk_live_`) belong in the browser.
  42. ```ts
  43. import { ApplicationConfig } from '@angular/core';
  44. import { bootstrapApplication } from '@angular/platform-browser';
  45. import { provideNgxStripe } from 'ngx-stripe';
  46. import { AppComponent } from './app/app.component';
  47. export const appConfig: ApplicationConfig = {
  48. providers: [
  49. provideNgxStripe('pk_test_…'),
  50. ]
  51. };
  52. bootstrapApplication(AppComponent, appConfig)
  53. .catch((err) => console.error(err));
  54. ```
  55. ### 2. Create the Elements container
  56. `ngx-stripe-elements` is the shared Stripe Elements context. For Payment Element flows, set `clientSecret` from a PaymentIntent (or SetupIntent) created on your server.
  57. ```ts
  58. import { Component } from '@angular/core';
  59. import { StripeElementsOptions } from '@stripe/stripe-js';
  60. import {
  61. injectStripe,
  62. StripeElementsDirective,
  63. StripePaymentElementComponent
  64. } from 'ngx-stripe';
  65. @Component({
  66. selector: 'app-checkout',
  67. standalone: true,
  68. imports: [StripeElementsDirective, StripePaymentElementComponent],
  69. templateUrl: './checkout.component.html'
  70. })
  71. export class CheckoutComponent {
  72. stripe = injectStripe();
  73. elementsOptions: StripeElementsOptions = {
  74. locale: 'en',
  75. // clientSecret from your server (PaymentIntent / SetupIntent)
  76. clientSecret: '{{CLIENT_SECRET}}',
  77. appearance: { theme: 'stripe' }
  78. };
  79. }
  80. ```
  81. ```html
  82. <ngx-stripe-elements
  83. [stripe]="stripe"
  84. [elementsOptions]="elementsOptions"
  85. >
  86. <!-- Payment Element or Card Element goes here -->
  87. </ngx-stripe-elements>
  88. ```
  89. ### 3. Drop in Payment Element
  90. Mount `ngx-stripe-payment` inside the Elements container once you have a `clientSecret`.
  91. ```html
  92. <form [formGroup]="checkoutForm" (ngSubmit)="pay()">
  93. <input formControlName="name" placeholder="Name" />
  94. <input formControlName="email" type="email" placeholder="Email" />
  95. @if (elementsOptions.clientSecret) {
  96. <ngx-stripe-elements
  97. [stripe]="stripe"
  98. [elementsOptions]="elementsOptions"
  99. >
  100. <ngx-stripe-payment />
  101. </ngx-stripe-elements>
  102. }
  103. <button type="submit" [disabled]="paying">Pay</button>
  104. </form>
  105. ```
  106. Prefer Card Element instead? Swap in `ngx-stripe-card` and confirm with `confirmCardPayment` — same provide + Elements steps. Details in the [tour](https://ngx-stripe.dev/docs/first-payment) and [Card Elements docs](https://ngx-stripe.dev/docs/card-elements).
  107. ### 4. Confirm the payment
  108. Your server creates the PaymentIntent; the browser confirms it through ngx-stripe. Hold a `ViewChild` of the Payment Element so you can pass `elements` into `confirmPayment`.
  109. ```ts
  110. @ViewChild(StripePaymentElementComponent)
  111. paymentElement!: StripePaymentElementComponent;
  112. pay() {
  113. this.paying = true;
  114. this.stripe
  115. .confirmPayment({
  116. elements: this.paymentElement.elements,
  117. confirmParams: {
  118. payment_method_data: {
  119. billing_details: {
  120. name: this.checkoutForm.value.name!,
  121. email: this.checkoutForm.value.email!
  122. }
  123. }
  124. },
  125. redirect: 'if_required'
  126. })
  127. .subscribe((result) => {
  128. this.paying = false;
  129. if (result.error) {
  130. // Show error to your customer
  131. return;
  132. }
  133. if (result.paymentIntent?.status === 'succeeded') {
  134. // Payment succeeded
  135. }
  136. });
  137. }
  138. ```
  139. That’s the whole client path. Wire `clientSecret` to your backend, then [try a live test checkout](https://ngx-stripe.dev/docs/first-payment) with card `4242 4242 4242 4242` (any future expiry, any CVC).
  140. Element reference, service API, and more examples: [ngx-stripe.dev/docs](https://ngx-stripe.dev/docs).
  141. ## Support
  142. MIT-licensed. Sponsors keep the project aligned with Angular and Stripe.js majors: [GitHub Sponsors](https://github.com/sponsors/richnologies).
  143. See [CONTRIBUTING.md](./CONTRIBUTING.md), [SECURITY.md](./SECURITY.md), and the [support policy](https://ngx-stripe.dev/docs/support) on the docs site.
  144. ### Principal Sponsors
  145. <p float="left">
  146. <a href="https://stripe.com" rel="nofollow noopener noreferrer" target="_blank">
  147. <img src="./docs/logos/stripe_blurple.png" width="210" alt="Stripe" />
  148. </a>
  149. <a href="https://www.psi-mobile.com" rel="nofollow noopener noreferrer" target="_blank">
  150. <img src="./docs/logos/psi-logo.png" width="170" alt="PSI" />
  151. </a>
  152. </p>
  153. ## License
  154. MIT © [Ricardo Sánchez Gregorio](mailto:me@ricardosanchez.dev)

Ratings and comments

Sign in to rate this skill.

Sign in

Free to use. If it’s helped, pass it on.