Collect your first payment

A short guided path from provideNgxStripe() to confirming a PaymentIntent — then try it live. Standalone setup only for now; choose Payment Element or classic Card after the Elements step.

Provide ngx-stripe

Step 1 of 3

Install 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));