Collect your first payment
A short guided path from
Provide ngx-stripe
Step 1 of 3Install peers and register Stripe in your standalone app config.
- Add ngx-stripe and @stripe/stripe-js that match your Angular major and Stripe.js lane.
- Put provideNgxStripe() in your ApplicationConfig providers, then pass that config to bootstrapApplication.
- Never put secret keys in the browser — only pk_test_ / pk_live_.
import { ApplicationConfig } from '@angular/core';
import { bootstrapApplication } from '@angular/platform-browser';
import { provideNgxStripe } from 'ngx-stripe';
import { AppComponent } from './app/app.component';
export const appConfig: ApplicationConfig = {
providers: [
provideNgxStripe('pk_test_…'),
]
};
bootstrapApplication(AppComponent, appConfig)
.catch((err) => console.error(err));