Skip to content
Back to skills

Ngx Stripe Ngx Stripe

ASecurity

Integrate ngx-stripe in an Angular application: provideNgxStripe, injectStripe, StripeService Observables, and ngx-stripe-* Elements. Use when adding payments to an app, installing ngx-stripe, wrapping Stripe Elements, Payment Element, Express Checkout, or picking an ngx-stripe version lane. Do not use when maintaining the ngx-stripe library itself.

  • 177 stars
  • 0 votes
  • 0 copies
  • 0 views
  • Added December 5, 2026
ai-agentsbashangularexpressgit

Works with

  • cli

Security analysis

A92/100
  • mediumInstalls packages at runtime which could introduce malicious dependencies

Pro shows the line behind each finding and how to fix it

Scanned December 5, 2026

npx -y skills add aicodedecode/awesome-muse-skills --skill ngx-stripe-ngx-stripe --agent claude-code

Installs into .claude/skills of the current project.

Are you the author of Ngx Stripe Ngx Stripe?

Add the live security badge to your README. It updates with every re-scan.

Security grade badge for Ngx Stripe Ngx Stripe
[![Security: A — Skills Directory](https://www.skillsdirectory.com/api/skills/aicodedecode-ngx-stripe-ngx-stripe/badge)](https://www.skillsdirectory.com/skills/aicodedecode-ngx-stripe-ngx-stripe)

More formats (shields.io, HTML) on the badges page. Keep it an A: scan every change in CI with Pro.

Download with Pro
SKILL.md
---
name: ngx-stripe
description: >-
  Integrate ngx-stripe in an Angular application: provideNgxStripe,
  injectStripe, StripeService Observables, and ngx-stripe-* Elements.
  Use when adding payments to an app, installing ngx-stripe, wrapping Stripe
  Elements, Payment Element, Express Checkout, or picking an ngx-stripe version
  lane. Do not use when maintaining the ngx-stripe library itself.
---

# ngx-stripe (consumer)

ngx-stripe wraps Stripe.js for Angular. It does **not** own types, Element UI, payment methods, or PCI.

This is an [Agent Skill](https://agentskills.io) (`SKILL.md`). Install from GitHub into any editor that supports the format:

```bash
npx skills add richnologies/ngx-stripe
```

- Types: `@stripe/stripe-js` only. Do not invent parallel interfaces.
- Install: `ng add ngx-stripe --publishable-key pk_test_…` (installs both packages and adds `provideNgxStripe`), or `npm install ngx-stripe @stripe/stripe-js` and set up by hand.
- Version: `{angularMajor}.{stripeJsMajor}.{patch}` — e.g. `22.10.x` is Angular 22 + Stripe.js v10 (endive CDN).
- Setup: `provideNgxStripe('pk_…')` in `appConfig.providers`, then `injectStripe()`. Keep `NgxStripeModule.forRoot()` only for existing NgModule apps.
- Service methods return **Observables** (`from(stripe.method()).pipe(first())`). Subscribe or convert; do not treat them as Promises.
- Elements: put hosts inside `<ngx-stripe-elements [stripe]="stripe" [elementsOptions]="elementsOptions">`. Implicit `[stripe]` on the child is deprecated.
- Split Card (`ngx-stripe-card-number` / `expiry` / `cvc`) must be wrapped in `ngx-stripe-card-group`.

## clientSecret

If the Element needs an Intent, set `elementsOptions.clientSecret` **before** the parent Elements instance is created. Nested Elements cannot update `clientSecret` later.

```html
@if (elementsOptions.clientSecret) {
  <ngx-stripe-elements [stripe]="stripe" [elementsOptions]="elementsOptions">
    <ngx-stripe-payment />
  </ngx-stripe-elements>
}
```

Payment Element also has `doNotCreateUntilClientSecretIsSet` for the implicit (no parent) path.

## Ownership

| ngx-stripe | Stripe.js |
| --- | --- |
| DI, CDN loader, Observables, host components | Appearance, options, validation copy, payment methods |

Link Stripe docs for styling/options. Link ngx-stripe docs for selectors and Angular lifecycle.

## Do not

- Use `ngx-stripe-payment-request-button` on Stripe.js v10 / ngx-stripe `*.10` (removed; use Express Checkout or Payment Element, or stay on a dahlia lane). Old URLs: https://ngx-stripe.dev/docs/payment-request-button
- Duplicate Stripe types inside the app.
- Call `elements.update({ clientSecret })` on an already-created nested Elements group.

## Resources

- Docs: https://ngx-stripe.dev
- Machine index: https://ngx-stripe.dev/llms.txt
- Full element map: [elements.md](elements.md)

Attribution

Is this your skill, or is something wrong with this listing? Request removal or report an issue. Author removals are honored within 72 hours.

View all in ai-agents →

Comments

Loading comments…

Newsletter

Get the weekly list of safe new skills, and the ones we pulled.