Documentation

Interface: IPlan

Description: Defines the structure for a plan object, representing different subscription options available.

Example:

const plan: IPlan = {
  id: 'some-plan-id',
  type: 1,
  name: 'Basic',
  defaultPrice: 10,
  limits: {
    lines: 1000,
    repos: 5
  },
  description: 'A basic plan for individual developers.',
  features: ['private repositories', 'issue tracking']
};

Interface: IPlanProps

Description: Defines the properties used for a plan component.

Example:

const planProps: IPlanProps = {
  plan: {
    id: 'some-plan-id',
    type: 1,
    name: 'Basic',
    defaultPrice: 10,
    limits: {
      lines: 1000,
      repos: 5
    },
    description: 'A basic plan for individual developers.',
    features: ['private repositories', 'issue tracking']
  },
  trial: true,
  subscribe: (plan: IPlan) => {
    // Logic for handling subscription to a plan
  }
};

Interface: ICheckoutProps

Description: Defines the properties used for a checkout component.

Example:

const checkoutProps: ICheckoutProps = {
  classNames: 'checkout-container',
  plan: {
    id: 'some-plan-id',
    type: 1,
    name: 'Basic',
    defaultPrice: 10,
    limits: {
      lines: 1000,
      repos: 5
    },
    description: 'A basic plan for individual developers.',
    features: ['private repositories', 'issue tracking']
  },
  trial: false,
  onClose: () => {
    // Logic for closing the checkout component
  }
};

Interface: IPaymentSession

Description: Defines the structure for a payment session object, containing information related to a payment process.

Example:

const paymentSession: IPaymentSession = {
  status: 'pending',
  email: 'user@example.com',
  metadata: {
    // Additional payment-related information
  },
  secret: 'payment-secret'
};