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 🙏

© 2024 – Pkg Stats / Ryan Hefner

fluidpay-js

v1.0.0

Published

SDK for the fluidpay API in javascript

Downloads

153

Readme

fluidpay-js

This is the official SDK for the Fluid Pay API written in JavaScript programming language using promises.

Getting started

After installing the SDK with npm install fluidpay-js you first need to initiate the package.

import Fluidpay from 'fluidpay-js'

const fp = new Fluidpay({
  apiKey: 'yourApiKey',
  environment: // optional - default production - options ('production' or 'sandbox')
})

General usage

All communication with the API is through fetch, so it's promise based. Requests and responses are handled by interfaces.

fp.getCurrentUser()
.then((res: any) => {
  // handle response
})
.catch((err: Error) => {
  // Non success base responses
  // handle error, if returned
})

Function list

fp.createKey(reqBody: KeyRequest) // creates a new api key, response should be handled as KeyResponse

fp.getKeys() // returns all keys for the current user, response should be handled as KeysResponse

fp.deleteKey(apiKey: string) // deletes the key, response should be handled as KeyResponse

fp.obtainJWT(reqBody: JwtTokenRequest) // returns a new JWT token, response should be handled as JwtTokenResponse

fp.forgottenUsername(reqBody: ForgottenUsernameRequest) // sends an email with the username, response should be handled as GeneralResponse

fp.forgottenPassword(reqBody: ForgottenPasswordRequest) // sends an email with the password, response should be handled as GeneralResponse

fp.passwordReset(reqBody: PasswordResetRequest) // resets password, response should be handled as GeneralResponse

fp.tokenLogout() // logs out the JWT token, response should be handled as GeneralResponse

fp.createCustomer(reqBody: CreateCustomerRequest) // creates a new customer token, response should be handled as CustomerResponse

fp.getCustomer(customerId: string) // returns the customer token, response should be handled as CustomerResponse

fp.updateCustomer(reqBody: UpdateCustomerRequest, customerId: string) // updates the customer token, response should be handled as CustomerResponse

fp.deleteCustomer(customerId: string) // deletes the customer token, response should be handled as CustoemrResponse

fp.createCustomerAddress(reqBody: CustomerAddressRequest, customerId: string) // creates a new address token, response should be handled as CustomerAddressResponse

fp.getCustomerAddress(customerId: string, addressId: string) // returns the address token, response should be handled as CustomerAddressResponse

fp.getCustomerAddresses(customerId: string) // returns all address tokens, response should be handled as CustomerAddressesResponse

fp.updateCustomerAddress(reqBody: CustomerAddressRequest, customerId: string, addressId: string) // updates the address token, response should be handled as CustomerAddressResponse

fp.deleteCustomerAddress(customerId: string, address: string) // deletes the address token, response should be handled as CustomerAddressResponse

fp.createCustomerPayment(reqBody: CustomerPaymentRequest, customerId: string) // creates a new payment token, response should be handled as CustomerPaymentResponse

fp.getCustomerPayment(customerId: string, paymentType: string, paymentId: string) // returns the payment token, response should be handled as CustomerPaymentResponse

fp.getCustomerPayments(customerId: string, paymentType: string) // returns all payment tokens, response should be handled as CustomerPaymentsResponse

fp.updateCustomerPayment(reqBody: CustomerPaymentRequest, customerId: string, paymentType: string, paymentTokenId: string) // updates the payment token, response should be handled as CustomerPaymentResponse

fp.deleteCustomerPayment(customerId: string, paymentType: string, paymentId: string) // deletes the payment token, response should be handled as CustomerPaymentResponse

fp.createAddOn(reqBody: RecurrenceRequest) // creates a new add on, response should be handled as RecurrenceResponse

fp.getAddOn(addOnId: string) // returns the add on, response should be handled as RecurrenceResponse

fp.getAddons() // returns all add ons, response should be handled as RecurrencesResponse

fp.updateAddOn(reqBody: RecurrenceRequest, addOnId: string) // updates the add on, response should be handled as RecurrenceResponse

fp.deleteAddOn(addOnId: string) // deletes the add on, response should be handled as RecurrenceResponse

fp.createDiscount(reqBody: RecurrenceRequest) // creates a new discount, response should be handled as RecurrenceResponse

fp.getDiscount(discountId: string) // returns the discount, response should be handled as RecurrenceResponse

fp.getDiscounts() // returns all discounts, response should be handled as RecurrencesResponse

fp.updateDiscount(reqBody: RecurrenceRequest, discountId: string) // updates the discount, response should be handled as RecurrenceResponse

fp.deleteDiscount(discountId: string) deletes the discount, response should be handled as RecurrenceResponse

fp.createPlan(reqBody: PlanRequest) // creates a new plan, response should be handled as PlanResponse

fp.getPlan(planId: string) // returns the plan, response should be handled as PlanResponse

fp.getPlans() // returns all plans, response should be handled as PlansResponse

fp.updatePlan(reqBody: PlanRequest, planId: string) // updates the plan, response should be handled as PlanResponse

fp.deletePlan(planId: string) // deletes the plan, response should be handled as PlanResponse

fp.createSubscription(reqBody: SubscriptionRequest) creates a new subscription, response should be handled as SubscriptionResponse

fp.getSubscription(subscriptionId: string) // returns the subscription, response should be handled as SubscriptionResponse

fp.updateSubscription(reqBody: SubscriptionRequest, subscriptionId: string) // updates the subscription, response should be handled as SubscriptionResponse

fp.deleteSubscription(subscriptionIs: string) // deletes the subscription, response should be handled as SubscriptionResponse

fp.getTerminals() // returns all terminals, response should be handled as TerminalsResponse

fp.doTransaction(reqBody: TransactionRquest) // initiates a transaction, response should be handled as TerminalResponse

fp.getTransactionStatus(transactionId: string) // returns the state of the transaction, response should be handled as TransactionResponse

fp.queryTransaction(reqBody: TransactionQueryRequest) // returns the qualified transactions, response should be handled as a TransactionResponse

fp.captureTransaction(reqBody: TransactionCaptureRequest, transactionId: string) // captures the transaction, response should be handled as a TransactionResponse

fp.voidTransaction(transactionId: string) // voids the transaction, response should be handled as a TransactionResponse

fp.refundTransaction(reqBody: TransactionRefundRequest, transactionId: string) // refunds the transaction, response should be handled as a TransactionResponse

fp.changePassword(reqBody: ChangePasswordRequest) // changes the password, response should be handled as UserResponse

fp.createUser(reqBody: CreateUserRequest) // creates a new user, response should be handled as UserResponse

fp.getCurrentUser() // returns the currently active user, response should be handled as UserResponse

fp.getUser(userId: string) // returns the user, response should be handled as UserResponse

fp.getUsers() // returns all users, response should be handled as UsersResponse

fp.updateUser(reqBody: UpdateUserRequest, userId: string) // updates the user, response should be handled as UserResponse

fp.deleteUser(userId: string) // deletes the user, response should be handled as UserResponse

Documentation

Further information can be found on the Fluid Pay website.