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

flow-sdk-v2

v2.0.8

Published

Flow SDK (Not Official)

Downloads

157

Readme

Flow SDK v2

Welcome to the new version of the 'flow-sdk', designed to simplify your experience of accepting payments, generating plans, enrolling subscribers and more. In the next image you can see a short example of how to use the 'flow-sdk-v2' package:

alt text

Installation

The 'flow-sdk-v2' package can be installed via npm and yarn, executing one of the following commands:

  npm install flow-sdk-ts
  # or
  yarn add flow-sdk-ts

Clients and methods

Before we list all the clients and their respective methods methods you can read the official flow documentation in the following link to get more information.

Payment client

Allows the management of regular payments or email payments.

Available methods

  • getPaymentOrderStatus(): Retrieves the status of a payment order.
  • getExtendedPaymentOrderStatus(): Retrieves the extended status of a payment order.
  • getPaymentOrderStatusByFlowOrder(): Retrieves the extended status of a payment order by flow order.
  • getExtendedPaymentOrderStatusByFlowOrder(): Retrieves the extended status of a payment order by flow order.
  • getPaymentOrderStatusByCommerceId(): Retrieves the status of a payment order by commerce ID.
  • generatePaymentOrder(): Generates a new payment order based on the provided properties.

Refund client

Allows the management of refund orders.

Available methods

  • generateRefund(): Generates a refund for a payment based on the provided properties.
  • cancelRefund(): Cancels a refund with the given token.
  • getRefundStatus(): Retrieves the status of a refund with the given token.

Example

  const response = flow.refunds.desiredMethod(props);

Customer client

Allows the creation of clients to make recurring charges or subscribe them to subscription plans.

Available methods

  • generateCustomer(): Creates a new customer.
  • editCustomer(): Edits an existing customer's information.
  • deleteCustomer(): Deletes a customer.
  • getClient(): Retrieves a customer's information.
  • getCustomersList(): Retrieves a list of customers based on filters.
  • generateRegisterLink(): Generates a registration card link for a customer.
  • getRegisterStatus(): Retrieves the registration card status of a customer.
  • unRegisterCustomer(): Unregisters a customer's card.
  • chargeCustomersCreditCard(): Charges a customer's credit card.
  • chargeCustomer(): Charges a customer.
  • batchChargeCustomers(): Batch charges multiple customers.
  • getBatchChargeStatus(): Retrieves the status of a batch charge.
  • reverseCharge(): Reverses a customer charge.
  • getCustomerCharges(): Retrieves a list of charges for a customer.
  • getCustomerChargeAttempts(): Retrieves a list of charge attempts for a customer.
  • getCustomerSubscriptions(): Retrieves a list of subscriptions for a customer.

Example

  const response = flow.customers.desiredMethod(props);

Plan client

Management of subscription plans.

Available methods

  • generatePlan(): Generates a subscription plan.
  • getPlanDetails(): Retrieves details of a subscription plan.
  • editPlanDetails(): Edits details of a subscription plan.
  • deletePlan(): Deletes a subscription plan.
  • listPlans(): Lists plans based on provided properties.

Example

  const response = flow.plans.desiredMethod(props);

Subscription client

Allows the subscription of clients to plans.

Available methods

  • generateSubscription(): Creates a new subscription.
  • getSubscription(): Retrieves a subscription by its ID.
  • getSubscriptions(): Retrieves a list of subscriptions based on filters.
  • changeTrialDays(): Changes the trial period days of a subscription.
  • cancelSubscription(): Cancels a subscription.
  • addDiscountCoupon(): Adds a discount coupon to a subscription.
  • deleteDiscountCoupon(): Deletes a discount coupon from a subscription.

Example

  const response = flow.subscriptions.desiredMethod(props);

Coupon client

Allows the creation of discount coupons to be applied on subscriptions or costumers.

Available methods

  • generateDiscountCoupon(): Generates a new discount coupon.
  • editDiscountCoupon(): Edits an existing discount coupon.
  • deleteDiscountCoupon(): Deletes a discount coupon by its ID.
  • getDiscountCoupon(): Retrieves a discount coupon by its ID.
  • getListOfDiscountCoupons(): Retrieves a list of discount coupons based on filters.

Example

  const response = flow.coupons.desiredMethod(props);

Invoice client

Allows the retrieval of the payments generated through subscriptions.

Available methods

  • getInvoice(): Retrieves an invoice by its ID.
  • getOverDueInvoices(): Retrieves a list of overdue invoices based on provided filters.
  • cancelInvoice(): Cancels an invoice by its ID.
  • outsidePayment(): Records an outside payment for an invoice.
  • retryToCollectInvoice(): Retries to collect payment for an invoice.

Example

  const response = flow.invoices.desiredMethod(props);

Settlement client

Allows to retrieve the liquidations of payments made by Flow.

Available methods

  • getSettlements(): Retrieves a list of settlements based on the provided filters.
  • getSettlement(): Retrieves details of a specific settlement by its ID.

Example

  const response = flow.settlements.desiredMethod(props);

Merchant client

Allows the management of associated businesses.

Available methods

  • generateAssociatedCommerce(): Creates a new associated commerce.
  • editAssociatedCommerce(): Edits an existing associated commerce.
  • deleteAssociatedCommerce(): Deletes an associated commerce by its ID.
  • getAssociatedCommerce(): Retrieves an associated commerce by its ID.
  • getListOfAssociatedCommerces(): Retrieves a list of associated commerces based on filters.

Example

  const response = flow.merchants.desiredMethod(props);

Author