Course lesson 53 · Payments with Stripe

Better Auth Stripe Integration

One study unit · Read, recall, then practice · Original video 00:15:57

The Better Auth Stripe plugin is added to the shared authentication configuration, first to create Stripe customers and then to support subscriptions. Each configuration change is used to regenerate the authentication schema and produce the corresponding database alteration. The lesson also separates generation-time Stripe setup from runtime configuration so the deployed application can receive its own key and webhook settings.

Primary source: course video 53 · Supplied English subtitles · 00:15:57.

Understand the idea

What the course does

  1. Install Stripe and the Better Auth Stripe plugin alongside the matching Better Auth version used by the lesson.
  2. Extend the shared authentication factory to accept Stripe configuration and enable customer creation at signup.
  3. Create a Stripe sandbox and provide the key required by this generation setup.
  4. Regenerate the schema and apply the user customer-ID column alteration to stage and production D1.
  5. Enable subscriptions, regenerate again, and create the subscription table in both databases.
  6. Rebuild the shared package and allow runtime Stripe configuration to be supplied by the consuming application.

Watch for

Recall before revealing

Why does adding the Stripe plugin require database work?

Reveal the explanation

The plugin needs persistent customer and subscription state, so its configuration introduces columns and tables the database must actually contain.

Try it

Compare the schema changes caused by enabling customer creation and by enabling subscriptions.

Check your result

You identify the user’s Stripe customer-ID field for the first and the subscription table for the second.

Practice prompts and answer checks are added teaching material. Answer from memory first, then compare and explain any difference.

Rewatch only what you need

Open this lesson in your original course library and seek to the times below. Videos are not hosted on this site.

Companion primary documentation: Better Auth Stripe plugin. For recorded API names, commands, limits, and prices, check the version you use.

← Previous   Next →