Skip to main content

Installation

Terminal
npm install solifyn

Quickstart

Initialize the client with your secret API key. You can retrieve one from the developer settings in your dashboard.
index.js
import { Solifyn } from 'solifyn'

const solifyn = new Solifyn({
  apiKey: process.env.SOLIFYN_API_KEY || 'your_api_key_here',
  baseURL: process.env.SOLIFYN_API_URL || 'https://api.solifyn.com' // Optional
})

async function run() {
  try {
    // List products
    const products = await solifyn.products.list()
    console.log('Products:', products)

    // Validate a license key
    const validation = await solifyn.licenses.verify({
      key: 'LF-XXXX-XXXX-XXXX',
      increment_use_count: true
    })
    console.log('License is valid:', validation.valid)
  } catch (error) {
    console.error('Error calling Solifyn API:', error)
  }
}

run()

Service Methods

All APIs are modularly exposed via properties on the main client instance:
  • solifyn.products - Manage products and pricing structures
  • solifyn.licenses - Issue, revoke, and toggle software license keys
  • solifyn.checkoutLinks - Create and manage checkout links
  • solifyn.checkout - Initiate custom checkouts and session retrievals
  • solifyn.customers - Handle customer accounts and billing data
  • solifyn.collections - Manage grouped collections of products
  • solifyn.subscriptions - Pause, cancel, and retrieve subscription plans
  • solifyn.discounts - Create and validate discount coupon codes
  • solifyn.meters - Track usage events for usage-based pricing models
  • solifyn.balances - Query financial balance status and reports
  • solifyn.digitalFiles - Manage and serve digitally delivered assets
  • solifyn.developer - Manage webhooks and developer API credentials
  • solifyn.disputes - Retrieve and submit evidence for transaction disputes
  • solifyn.refunds - Process order refunds
  • solifyn.orders - Retrieve detailed customer invoice and order records
  • solifyn.brands - Configure multiple vendor/storefront branding assets