AI Income LabJoin AI Income Lab ↗

OpenCode adds Stripe billing to a SaaS app: build and fixes

Jump to video chapters

Watch on YouTube ↗ Subscribe on YouTube ↗

By · · 9:24 · 2,239 views

Written guide: OpenCode Stripe Billing Build: A SaaS Case Study

Use OpenCode in the terminal to add a Stripe subscription system to the TubeAnalytics.net SaaS app, with Gemini Code Assist for quick fixes and PM2 to keep the app running. The build fails along the way on a Prisma schema issue and missing Stripe dependencies, which OpenCode then fixes.

Video summary

OpenCode makes it easy to build SaaS apps in minutes: redesign a landing page, add Stripe subscriptions, install OpenCode in the terminal, wire Google OAuth / YouTube API, manage .env keys, run with PM2, and fix Prisma/npm issues. Free Claude Code alternative for shipping SaaS faster.

OpenCode tutorial — live TubeAnalytics.net automation build from UI to production.

The video covers 11 parts: Live Build: Automating TubeAnalytics.net, Switching to OpenCode (Free Claude Code Alternative), Landing Page Redesign & Pricing Strategy, Building the Stripe Subscription System, How to Install & Use OpenCode in the Terminal, Quick Fixes with Gemini Code Assist in VS Code, Huge Update: Google OAuth & YouTube API Approval, Managing Stripe API Keys & .env Setup, Build Process & Running Production Apps with PM2, Fixing Prisma Database & NPM Dependency Issues, and Final Thoughts: Launching Your SaaS Faster.

What this video covers

What you build

A Stripe subscription and billing system for TubeAnalytics.net, with a pricing page, a checkout success page, a billing invoices page and an environment variable setup file.

Tools used

Compare pricing: OpenCode. Some ↗ links are affiliate links, so I may earn a commission or credit. See every tool I recommend →

Key steps

Not covered

Summary written from the video's transcript and chapters.

In this video

  1. 0:00 Live Build: Automating TubeAnalytics.net
  2. 0:24 Switching to OpenCode (Free Claude Code Alternative)
  3. 0:50 Landing Page Redesign & Pricing Strategy
  4. 1:32 Building the Stripe Subscription System
  5. 2:33 How to Install & Use OpenCode in the Terminal
  6. 4:19 Quick Fixes with Gemini Code Assist in VS Code
  7. 5:05 Huge Update: Google OAuth & YouTube API Approval
  8. 6:32 Managing Stripe API Keys & .env Setup
  9. 7:19 Build Process & Running Production Apps with PM2
  10. 7:40 Fixing Prisma Database & NPM Dependency Issues
  11. 8:33 Final Thoughts: Launching Your SaaS Faster

Questions and answers

Is OpenCode free?

It seems essentially free because no API keys had to be connected, Mike says. He uses it here while Claude Code credits are waiting to reset.

How do you install OpenCode?

Run the one-line curl command from opencode.ai, or install it with npm, bun or brew. It runs in the terminal, the browser or as an extension in VS Code, Google Antigravity or Cursor.

Does the Stripe checkout work by the end of the video?

A working checkout is not shown. The video ends while OpenCode is still fixing build errors in the billing code.

Gemini Code Assist for individuals

Google has deprecated Gemini Code Assist for individuals. Google’s documentation says that starting June 18, 2026, Gemini Code Assist IDE extensions stopped serving requests for the Gemini Code Assist for individuals, Google AI Pro, and Google AI Ultra tiers. Login with Google no longer works for those IDE extensions or Gemini CLI. Read Google’s deprecation page.

Transcript

Hey there, welcome to the channel. In this video, I'm going to be taking you through a live build of my software as a service platform which is called tubeanalytics.net. I think this is going to be the most powerful platform that I've ever built and I'm using no code solutions in order to do it. So, I don't have to know how to write a single line of code.

In this case, we're going to be using OpenCode because I'm currently waiting on my credit limit to reset in claude code. We're going to be integrating Stripe in this case so that people can actually make payments through the website. Pricing plans start at $19 per month and they go up to $149 per month. I'm offering a 7-day free trial. Let me know in the comments below and I'd be happy to share it with you. And with that being said, let's start the tutorial.

Read the rest of the transcript

This is my software as a service powerful analytics platform that I'm building for YouTube. And I've just redesigned the landing page using OpenCode. I just use all of the standard conventions to build out this landing page for my software as a service. You see that we've got our pricing here as well, starting at $19 a month going up to $149 per month. If I go ahead and click on start free trial, that part doesn't work because the signup page is not connected properly.

But overall, uh the website is looking really really nice. So right now, we're just going through and continuing to build out from our master prompt that I've generated over here inside Claude using the Opus 4.6 model. And I'm just working my way through this. It's a very long prompt, but essentially what I'm doing is I'm just copying and pasting each of these prompts into either Claude Code or OpenCode in this case. And currently I'm building out a subscription and billing system.

So I just went ahead and copied in this prompt right here. Now it's just building out all of the Stripe functionality so that people can actually make the payments on the website. So, if we come over here to VS Code, you can see it's added the subscription models. And it's also updated a few other files here as well. And it's just going through and doing this in OpenCode. So, that means that I don't have to use my Claude Code credits.

I can just build all of this out in OpenCode, which is essentially free as far as I can tell because I don't have to connect up any sort of API keys or anything. It's just using OpenCode. and you can read through all of their documentation. It's just a oneline curl command that you use to install it. And then you can either run this in your browser or you can also install an extension over here in VS Code which will run OpenCode inside your IDE over here.

So if I go ahead and open that up, it actually can't find the OpenCode command for some reason. But yeah, so you can install it over here as well, but for the most part, I usually just use it in the terminal. It works really, really well. You just have to make sure not to accidentally quit out while it's running something. So, if we go through this, uh, you can see that it has now built out the pricing page, which is at source app pricing.

So, if we come on over to our files, we can go to source app, and then it's building out this page right here using OpenCode. And I personally do not understand what a lot of this does, but the fact of the matter is I don't have to understand it because OpenCode can just write all of the code for me. So you can see they've got the payment plans in here starting at $19 going up to 49 for the business plan.

And then they should have the 149 plan in here as well. And basically what it's doing is it's just adding in all of the Stripe functionality. You can see here that it's calling the module right here, which it looks like it can't actually find that module. If I want to go ahead and fix that, I can click here and we can fix that using the Gemini code extension that is built into VS Code. And that will basically just fix that particular line right here.

You can see it added some extra logic using the Gemini extension over here. If you want to install that, you just come on over to extensions, search for Gemini, and then you're just going to install Gemini Code Assist. So, that will allow you to fix up anything quickly and easily. Again, you don't have to know how to write any code. You can just use Gemini Code Assist to fix it up for you.

So, a lot of these things, they're not actually going to start loading until I get authorized by Google. So, I'm currently still waiting on approval for Google OOTH over here in Google Cloud Console. And that's supposed to take about three to four weeks. I'm not exactly sure why it takes so long, but in order to actually test my website, I need access to Google Oath so that I can log in. And over here, it looks like it did. They did review everything.

And it says, "Oh, your app has met branding guidelines requirements successfully." I've also met the privacy policy requirements which you need to include uh on your website. So down here you need to include terms and conditions and then also privacy policy uh in order to get accepted by Google. And it looks like I have now uh gotten approved and I think the next step is I need to allow data access.

So basically I can add all of the uh YouTube APIs that I want access to over here. So if I just go ahead and search for YouTube, I can add all of those. But it looks like good news is I am approved now for Google Oath, which means once this is working correctly, I will be able to allow people to sign in with their Google accounts. They can start using the platform right away. So that's definitely good news. Let's just come back over here to OpenCode.

You can see it's adding the billing invoices uh page right here. Uh it's creating the success page for the checkout completion. So that's something that it's done and it's just going through and writing everything for me. So now it's creating the environment. What did I say? Environment variables documentation. It's going to update the main navigation to include the billing links. So right now it's updating my ENV setup file.

If I come over here to VS Code, we can see that there's a new file here called ENV setup. And what this has, it has a lot of the Stripe uh API keys, secret keys, everything here. So that I've just got one easy to access source for all of these keys right here. And obviously in your ignore file, you're going to want to make sure to add that so that nobody can get access to those API keys. So, make sure to add that.

It's getting close to finished with the Stripe integration. And now it's just going to run the npm run build in order to make sure that the project can build, which I can also do myself over here as well. If I want to go ahead and run that, I can do it from the command line. And then I'm also using PM2 to make sure that the app is always running.

So, we just have to make sure to build it and then we can restart it using PM2 so that the app is always running and then if it does crash, it will automatically restart it as well. So, I highly recommend using PM2. And now it says good, the file was already updated with a fix. Now, it's going to regenerate the Prisma client and check the build again. So, Prisma is essentially the database model that it's using. Uh, looks like there was an issue with the schema.

It's going to fix that. It found the issue and it's just going to fix that up over here. You can see it's doing everything. And I don't have to use claw code. I'm just using OpenCode in this case because I'm waiting for my credits to renew which are going to renew tomorrow. And then if I have to fix up anything in Claude Code, uh, I can easily do so. So it says the Stripe dependencies aren't installed. So the build is failing.

So it's going to go ahead and install the Stripe dependencies. And now it has some issue in the billing page file. So it's going to fix that up. And yeah, as you can see, I don't have to write a single line of code. I could just use OpenCode to do everything for me. So if you want to go ahead and check out OpenCode, just go to opencode.ai. You can easily install it again just with this curl command.

Or you can install it using npm or bun or brew. Lots of different ways to install it. And then you just run it either in your command line or you can install an extension in VS Code or Google Antigravity or uh what's the other one? Cursor and then just run it from there. So hopefully this has been helpful. Go ahead, drop a comment down below if you would get like to get access to this YouTube analytics platform once it is all finished.

Uh, again, prices start at $19 per month and then I'm also going to offer a free trial for about 7 days as well if you'd like to test it out. And with that being said, I'm going to sign off. Thanks so much for watching. See you in the next video. Peace from Tyler.

Not ready to join? Get the weekly build notes: new guides and tested builds in one short email.

You may also like