npm package discovery and stats viewer.

Discover Tips

  • General search

    [free text search, go nuts!]

  • Package details

    pkg:[package-name]

  • User packages

    @[username]

Sponsor

Optimize Toolset

I’ve always been into building performant and accessible sites, but lately I’ve been taking it extremely seriously. So much so that I’ve been building a tool to help me optimize and monitor the sites that I build to make sure that I’m making an attempt to offer the best experience to those who visit them. If you’re into performant, accessible and SEO friendly sites, you might like it too! You can check it out at Optimize Toolset.

About

Hi, 👋, I’m Ryan Hefner  and I built this site for me, and you! The goal of this site was to provide an easy way for me to check the stats on my npm packages, both for prioritizing issues and updates, and to give me a little kick in the pants to keep up on stuff.

As I was building it, I realized that I was actually using the tool to build the tool, and figured I might as well put this out there and hopefully others will find it to be a fast and useful way to search and browse npm packages as I have.

If you’re interested in other things I’m working on, follow me on Twitter or check out the open source projects I’ve been publishing on GitHub.

I am also working on a Twitter bot for this site to tweet the most popular, newest, random packages from npm. Please follow that account now and it will start sending out packages soon–ish.

Open Software & Tools

This site wouldn’t be possible without the immense generosity and tireless efforts from the people who make contributions to the world and share their work via open source initiatives. Thank you 🙏

© 2026 – Pkg Stats / Ryan Hefner

@fliinow-com/fliinow-partner-api

v1.3.1

Published

Official TypeScript/JavaScript SDK for the Fliinow Partner API. Easily integrate financing options into your travel platform.

Readme

@fliinow-com/fliinow-partner-api

Official TypeScript/JavaScript SDK for the Fliinow Partner API. Easily integrate travel financing options into your platform.

npm version License: MIT

Installation

npm install @fliinow-com/fliinow-partner-api
# or
yarn add @fliinow-com/fliinow-partner-api
# or
pnpm add @fliinow-com/fliinow-partner-api

Quick Start

import { FliinowClient } from '@fliinow-com/fliinow-partner-api';

const fliinow = new FliinowClient({
  apiKey: 'fk_test_your_api_key',  // fk_test_* for sandbox, fk_live_* for production
  sandbox: true,                    // true for sandbox, false for production
});

// Create a financing operation
const operation = await fliinow.operations.create({
  externalId: 'BOOK-2026-00123',
  client: {
    firstName: 'Juan',
    lastName: 'García López',
    email: '[email protected]',
    prefix: '+34',
    phone: '612345678',
    documentId: '12345678A',
    documentValidityDate: '31-12-2030',
    gender: 'MALE',
    birthDate: '15-03-1985',
    nationality: 'ESP',
    address: 'Calle Mayor 1',
    city: 'Madrid',
    postalCode: '28001',
    countryCode: 'ES',
  },
  packageName: 'Viaje romántico a París',
  packageTravel: true,
  travelersNumber: 2,
  flightDtoList: [],
  hotelDtoList: [],
  serviceDtoList: [
    {
      type: 'CRUISE',
      description: 'Mediterranean Cruise - 7 nights',
      startDate: '2026-06-15',
      endDate: '2026-06-22',
      isRefundable: true,
      price: 1200.00,
    },
    {
      type: 'TRANSFER',
      description: 'Airport transfer round-trip',
      startDate: '2026-06-15',
      endDate: '2026-06-22',
      isRefundable: false,
      price: 80.00,
    },
  ],
  totalPrice: 1280.00,
  // Optional: Callback URLs for redirect after financing
  successCallbackUrl: 'https://yoursite.com/booking/success',
  errorCallbackUrl: 'https://yoursite.com/booking/error',
});

// Redirect user to financing checkout
window.location.href = operation.financingUrl;

Features

  • 🔐 Secure Authentication - API key-based with sandbox/production separation
  • 📦 Full TypeScript Support - Complete type definitions included
  • 🔄 Promise-based API - Modern async/await interface
  • 🛡️ Error Handling - Structured error types for easy debugging
  • 🌍 Multi-environment - Sandbox and production support

API Reference

Operations

// Create an operation
const operation = await fliinow.operations.create({
  externalId: 'ORDER-12345',
  client: { /* ClientDto */ },
  packageName: 'Trip to Paris',
  packageTravel: true,
  travelersNumber: 2,
  totalPrice: 1500.00,
  totalReserve: 1500.00,
});

// Check API health
const health = await fliinow.health();

// Get operation by external ID (your reference)
const operation = await fliinow.operations.getByExternalId('BOOKING-12345');

// Get operation by ID
const operation = await fliinow.operations.get('abc123xyz');

// Get operation status
const status = await fliinow.operations.getStatus('abc123xyz');
// status.status: 'GENERATED' | 'PENDING' | 'FAVORABLE' | 'CONFIRMED' | 'REFUSED' | ...

// List operations with filters
const { content, totalElements } = await fliinow.operations.list({
  status: 'FAVORABLE',
  from: '2026-01-01',
  page: 0,
  size: 20,
});

// Cancel an operation
await fliinow.operations.cancel('abc123xyz');

Plans (Advanced Flow)

// Get available financing plans
const plans = await fliinow.operations.getPlans('abc123xyz');

// Display plans to user
for (const plan of plans) {
  console.log(`${plan.installments} installments: ${plan.commonQuota.amount}€/month`);
  console.log(`  APR: ${plan.apr}%`);
  console.log(`  Provider: ${plan.financingProvider.name}`);
}

Financing (Advanced Flow)

// Start financing with selected plan
const result = await fliinow.operations.startFinancing('abc123xyz', {
  financialProviderId: 1,  // From plan.financingProvider.id
  installments: 6,
  successCallbackUrl: 'https://yoursite.com/success',
  errorCallbackUrl: 'https://yoursite.com/error',
});

// Redirect to provider checkout
window.location.href = result.checkout.redirectUrl;

Error Handling

import { FliinowClient, FliinowError } from '@fliinow-com/fliinow-partner-api';

try {
  const operation = await fliinow.operations.create({ ... });
} catch (error) {
  if (error instanceof FliinowError) {
    console.error(`Error ${error.code}: ${error.message}`);
    
    switch (error.code) {
      case 'INVALID_AMOUNT':
        // Handle validation error
        break;
      case 'RATE_LIMIT_EXCEEDED':
        // Handle rate limiting - use error.retryAfter
        break;
      case 'UNAUTHORIZED':
        // Check API key
        break;
    }
  }
}

TypeScript Types

All types are exported for your convenience:

import type {
  OperationResponse,
  OperationStatus,
  PlanResponse,
  ClientDto,
  FlightDto,
  HotelDto,
  CreateOperationRequest,
  ListOperationsParams,
  PagedOperationsResponse,
  FinancingProviderInfo,
  HealthResponse,
  ServiceDto,
  ServiceType,
} from '@fliinow-com/fliinow-partner-api';

Configuration Options

const fliinow = new FliinowClient({
  apiKey: 'fk_test_xxxxx',  // Required: Your API key
  sandbox: true,             // Optional: Use sandbox environment (default: false)
  timeout: 30000,            // Optional: Request timeout in ms (default: 30000)
  baseUrl: 'https://...',    // Optional: Custom base URL (overrides sandbox)
});

Environments

| Environment | Base URL | API Key Prefix | |-------------|----------|----------------| | Sandbox | https://demo.fliinow.com/integration-api/v1 | fk_test_* | | Production | https://app.fliinow.com/integration-api/v1 | fk_live_* |

Documentation

Support

License

MIT © Fliinow