Payments

Configure code repository purchase options

The payments configuration defines options for code repository purchases, including pricing tiers and repository details.

Location

/config/payments.ts

Key Components

Code Repository Configuration

export const codeRepository: CodeRepository = {
  id: "nestsaas",
  product: "nestsaas",
  name: "NestSaaS Complete Code",
  description:
    "Get the complete source code of NestSaaS, including all features and components",
  owner: "nestsaas",
  repo: "nestsaas",
  
  pro: {
    priceId: "price_1RHIl0FWZZWHBTTtoPT7O8wX",
    priceOrigin: 369,
    price: 239,
  },
  enterprise: {
    priceId: "price_1RHIl0FWZZWHBTTtoPT7O8wX",
    priceOrigin: 899,
    price: 539,
  },
  
  currency: "USD",
}

Usage

Refer to the NestSaaS code sales to learn more about the configuration usage:

app/(home)/home1/sections/pricing-landing

Integration with GitHub

The code repository configuration is designed to work with the GitHub API for automatic repository access after purchase. The repository should:

  1. Be within the same GitHub account as configured in GITHUB_PERSONAL_TOKEN
  2. Be a private repository

Integration with Stripe

The configuration uses Stripe price IDs for payment processing:

  • Update the priceId values with your actual Stripe price IDs for each tier
  • The priceOrigin and price fields can be used to display original and discounted prices

On this page